We have created a sample application project and are using it as the bootloader. The actual application project is identical, with the only difference being the flash start address.
The bootloader successfully jumps to the application, and the application starts executing. However, within the application, the xTaskCreate() function does not executed.
Is there any additional configuration required when jumping from a bootloader to a FreeRTOS-based application? For example, are there any startup, interrupt, vector table, stack pointer, or scheduler-related configurations that must be performed before the application can create and execute FreeRTOS tasks?
I referred the Unified bootloader Demo ticket from community. I didn't get the solution. Issue is only when we include FreeRTOS, without RTOS the application is working fine.
Its working for S32K344 not for NXPS32K358.
Please let me know if any additional information is required.
Hi @Indhumathi,
This "xTaskCreate() does not execute" is ambiguous and could mean different things.
Can you check the following?
1. Execution never reaches xTaskCreate()
The application starts, but something hangs or faults before the call.
2. xTaskCreate() is called but returns an error
The function is called and returns an error, for example errCOULD_NOT_ALLOCATE_REQUIRED_MEMORY.
3. Tasks are created, but the scheduler never runs them
xTaskCreate() succeeds (returns pdPASS) and the tasks are created, but vTaskStartScheduler() is never called, fails, or SysTick/PendSV are not operating correctly after the bootloader jump. As a result, the tasks remain in the Ready state and never get CPU time.
Also, is vApplicationMallocFailedHook() called?
Which heap implementation are you using?
What is the state of CM7_2? Is it running, held in reset, or started by the bootloader?
Thank you,
BR, Daniel
Bootloader-to-Application Jump Code Used in Our Project: