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.

TMS570LS0914: FreeRTOS Porting

Part Number: TMS570LS0914
Other Parts Discussed in Thread: HALCOGEN, TMS570LS1224

Hello,

We are trying to port the Halcogen TMS570LS0714PGE_FreeRTOS to the TMS570LS0914PZ. We are following spna237 step by step, but if we start more than two tasks a data abort is generated (probably by an stack overflow), it happen in the function portSAVE_CONTEXT:

R0 is corrupted and its value is 0x20202020. If we enabled the StackOverflow hook of FreeRTOS it is latched also. 

According to the DS this micro has 1024 Kb of Flash and 128Kb of Ram, so we think that Sys_link.cmd should be the following:

In addition all the code is running correctly in another board (with another PN).

Please, Can you give us a hand with this?

Ty.

Aizkibel

  • Hi Aizkibel,

    The linker cmd file looks fine to me. 

    But you use different package (PZ) for LS0914. The CPU speed is 100mHz for PZ, and 160MHz for PGE package. Did you change the PLL configuration?

  • Hello QJ, thanks for you tip, however I think that it's well configured:

    Halcogen LS0914:

    Halcogen FreeRTOS LS0714 PGE:

    In the FreeRTOS config I have changed the RTI1CLK to 100M.

    Aizkibel

  • Finally I resolved the issue:

    I follow the stack overflow up to the root, the following function:

    pxCurrentTCBConst was ok before "taskSelectHIGHEST_PRIORITY_TASK()" was executed and corrupted after the return

    Looking for this function in the FreeRTOS forum I read that can generate failures if the task is not created with enough stack space... Now I have duplicated the memory for both task (from configMINIMAL_STACK_SIZE to configMINIMAL_STACK_SIZE*2) and it's working. However I cannot understand why the same code works for TMS570LS1224.... 

    As always, thanks for the support QJ.


    Aizkibel