rtel wrote on Thursday, July 24, 2008:
Sorry for very quick response, I’m just on my way to an appointment…
The idle task is unlikely to be task 0 as it is created when the scheduler is started so there should be more tasks created before it. If you are using V5.0.2 of FreeRTOS.org please make sure that portREMOVE_STATIC_QUALIFIER is not defined anywhere as this could cause problems with task numbers (this will be fixed in the next release). You will see that portREMOVE_STATIC_QUALIFIER is referenced from the top of task.c, so if in doubt you could just remove its usage directly in there.
Here is an example that I used just yesterday to demonstrate task execution patterns:
PORTACLR = 0x0F;
PORTASET = 0x01 << pxCurrentTCB->uxTCBNumber;
The first line clears all the digital outputs on port A. The second line sets the digital output in accordance with the number of the task that runs. Putting a logic analyzer or scope on the outputs gives you a clear picture of the task execution and timing.
Hope this helps.