This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

TDA4VM: free rtos can not be started. crash occur when "xSchedulerRunning = pdTRUE"

Part Number: TDA4VM

Hi expert.

in SDK8.1,I meet one strange issue:

use SBL to load SDK8.1 “mcusw\mcuss_demos\boot_app_mcu_rtos”(freertos),success

but in function calling "OS_start --> vTaskStartScheduler" ,when execute "xSchedulerRunning = pdTRUE;",it looks that 'crash' occur.

I also do following test:

1)use SDK8.1 SBL to load SDK7.3 "mcusw\mcuss_demos\boot_app_mcu_rtos"(tirtos),success, and "mcusw\mcuss_demos\boot_app_mcu_rtos" running well.

2)i change xSchedulerRunning definition from "PRIVILEGED_DATA static volatile BaseType_t xSchedulerRunning = pdFALSE;" to "PRIVILEGED_DATA static volatile BaseType_t xSchedulerRunning = pdTRUE"

   crash occur ahead.....

xNextTaskUnblockTime/xTickCount,the similar statement,but no crash....it is very strange.

can you give me some tips?

  • Hello,

    These changes you made are in the PDK package of the SDK, correct? kernel/freertos/FreeRTOS-LTS/FreeRTOS-Kernel/tasks.c

    Does the example ( SDK8.1 “mcusw\mcuss_demos\boot_app_mcu_rtos”(freertos) ) work before you make the changes in the FreeRTOS code? or it does not work either way?

    1)use SDK8.1 SBL to load SDK7.3 "mcusw\mcuss_demos\boot_app_mcu_rtos"(tirtos),success, and "mcusw\mcuss_demos\boot_app_mcu_rtos" running well.

    This makes sense, the apps are loaded by SBL, so if the app was working previously it should be loaded OK.

    Regards,

    Erick

  • Hi Erick

    it is my mistake which lead to one buffer overflow before calling Os_Start

    now,it is working.