rtel wrote on Tuesday, June 14, 2011:
The only port layers that define portREMOVE_STATIC_QUALIFIER, and have therefore been tested with portREMOVE_STATIC_QUALIFIER, are the three that use MPLAB (PIC18, PIC24/dsPIC and PIC32).
However, variables should be explicitly initialised at the point of declaration as a matter of course, and this is the aim in FreeRTOS. Sometimes it is not possible, if, for example, a variable is inside a structure for packing reasons, or the variable itself is a structure. Some compilers even complain when you try using valid syntax to clear an array to zero. In these cases the variables/structures are (should be) initialised manually in the code itself.
Looking at tasks.c, the only variables I can see that are not initialised at the point of declaration are structures of type xList, and these are initialised by the function prvInitialiseTaskLists(), which is called when the first task is created.
Which variable in tasks.c is causing you a problem?
By removing the static key word you are making what were file scope variables into global variables. In both cases, the variables, if uninitialised, should go in the .bss section, and get set to 0 by the C start up code (before main() is called). Can you look at your start up code to see why that is not happening. Maybe there is an option to set, or, as per the STARTUP_FROM_RESET definition provided by Rowley, a definition that must be made.