FreeRTOS v10.2.1 creating the last task again

bdouram wrote on Monday, October 14, 2019:

I’m a beginner in FreeRTOS plaftorm , developing it in a Cortex-M4 and i have a trouble.

I used some macro traces avaliable here:, and i build a buffer to see in Cortex the time of context switching.

I have two tasks," A" and “B”.

void prvSetupTasks()

When i use the macro traceTASK_CREATE(xTask) to look the timestamps, the order of creation is:

“A” task created.
“B” task created.
“B” task created again.
Scheduler Task Created.

Is this right?

Thank you!

rtel wrote on Monday, October 14, 2019:

Does not look right. Are those the only two tasks you are creating in
your system? Could it be third task is the idle or timer task being
created? Are you sure it is not your implementation of the macro that
is causing confusion? Put a break point in the implementation to see
where it is getting called from and exactly what it is doing.

bdouram wrote on Monday, October 14, 2019:

Hi Richard

Thanks for your response. I saw that in fact the new task being created is the idle thread, however, in debugging, inside the traceTASK_CREATE (xTask) macro, the name that is in pxCurrentTCB-> pcTaskName when creating the idle thread is the name of the task "B "and not idle thread or something.

Tasks are created only once before scheduler execution, just as I presented above. Please, is there any way to know that task “B” is being created only once and not twice?

Thanks again.

rtel wrote on Tuesday, October 15, 2019:

You can use
to see how many tasks are created, or to get details on
each task in the system. Alternatively, depending on your IDE, you can
view task information in a FreeRTOS aware IDE plug-in.

bdouram wrote on Tuesday, October 15, 2019:

It works! Thanks!