My FreeRTOS code works perfectly when flashed alone (starts from 0x00000000).
When bootloader is flashed first, then application (at 0x00008000), FreeRTOS doesn’t run — it doesn’t enter tasks.
FreeRTOS tasks not running after bootloader jump (SAMC21, app at 0x8000)
Microcontroller: SAMC21N18A
Compiler/IDE: Atmel Studio
FreeRTOS version (10)
Bootloader used (custom)
I’m using a custom bootloader on a SAMC21N18A microcontroller with FreeRTOS. The bootloader starts at 0x00000000 and jumps to the application at 0x00008000. When I flash only the application (starting at 0x00000000), FreeRTOS works fine.
But when I flash the bootloader at 0x00000000 and the application at 0x00008000, FreeRTOS doesn’t run — no tasks are executed, and it seems interrupts aren’t firing
A very possible reason is that the vector table is not correctly setup because FreeRTOS requires some ISRs to be installed correctly. Did you try my above suggestions?
Vector table is correctly setup,
I have configured FreeRTOS version 10 in Atmel Start. What other tools do I need to install for FreeRTOS to work properly?
int main(void)
{
atmel_start_init();
Initialization(); // This includes print statements
// Task creation for Task 1 to Task 6
vTaskStartScheduler();
}
In my FreeRTOS code, I added print statements inside the Initialization() function (which runs outside the RTOS). I can see those print statements through Data Visualizer, so I know it’s being called.
However, the tasks are not being created — they are not running.