Freertos static data type usage


what is the difference between task declaration using static void versus void. What data type of tasks functions I should use?

For example:

void vTaskName(void *pvParameters){
//task content


static void vTaskName(void *pvParameters){
//task content

My tasks are created using xTaskCreate and never deleted.

The static keyword/specifier is related to C-language and works as defined in the standard. It’s unrelated to and doesn’t change the task function type.

The keyword “static” when applied to something at the “file-scope”, like a function definition (which is what a task essentially is) just affects the availability of the name of that thing, making it only accessible in that file, and not from other translation units. (The object might still be, if its address is passed to something, like is done when creating the task). The only affect of making the task function static is to mean the call to xTaskCreate will need to be from something in that file, and not a “cross-file” reference to that function.

“static” is a somewhat overloaded word in “C” (and more so in C++) with different meaning in different contexts.