nobody wrote on Friday, October 21, 2005:
I’m using the IAR debugger - I’ve noticed the following:
The last task created seems to execute at least once before the debugger starts.
I have counters in my tasks that will count how many times they run, errors, etc. similar to those in the example code.
I’ve noticed that the last task created seems to execute at least once before the debugger starts (halts the system - that is, for a debugging session).
Since the scheduler is started in main() - and that isn’t called (allegedly) before the debugger starts - I don’t know how vTaskStartScheduler() gets called before the debugger starts.
xTickCount shows something like 10 and the run counter
for the last task created shows 1.
Just wondering if anyone else has seen something similar and can give any insight as to what’s going on.
It obviously seems that the scheduler starts somehow before the debugger begins.
The other odd thing here is that the last task created seems to be the one that runs - even though vTaskSuspend() is immediately called after it’s created.