Will timer task be created twice for smp x2 freertos
fanghuaqi opened this issue · comments
According to the source code here
Lines 294 to 301 in 067d04e
When configNUMBER_OF_CORES = 1 and configUSE_CORE_AFFINITY = 0, it will go to above lines, and this xTimerCreateTimerTask
function will be call in each cpu via vTaskStartScheduler
called from main.
Lines 3665 to 3690 in 067d04e
But it seems it doesn't create different stack for different cpu's timer task like the idle task, is it made on intent?
Thanks
I checked other porting code, found that only main core need to execute main
function, which including task creating and vTaskStartScheduler, other cores should only execute xPortStartScheduler
and some other code to initialize required core interrupt controller.
FreeRTOS-Kernel/portable/ThirdParty/GCC/RP2040/port.c
Lines 370 to 391 in 839ccb7