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.

RTOS/AM5728: HeapMem down to zero after program restart

Part Number: AM5728
Other Parts Discussed in Thread: BEAGLEBOARD-X15,

Tool/software: TI-RTOS

Hi all,

I have observed that the action of restarting a loaded program (Run->Restart) during a debug session changes the available HeapMem to zero, so program is unable to create tasks and/or start SYS/BIOS.

Steps to reproduce the issue:

1. Build the IPC example project (it uses HeapMem): C:\ti\ipc_3_50_03_05\examples\AM572X_bios_elf\ex02_messageq\

2. Launch target configuration and connect to Cortex-A15 core 0

3. Load the HOST program to the A15 core: C:\ti\ipc_3_50_03_05\examples\AM572X_bios_elf\ex02_messageq\host\bin\debug\app_host.xa15fg

4. Run the program to the main() function

5. Show ROV and check the value of HeapMem, my values are:

,0x8b03af98,,0x8b041e48,8,,0x8000,0x7d28,0x7d28

So there is 0x7d28 available memory in heap

6. No execution of the program is required, just restart the program by clicking Run->Restart

7. Check ROV, in my case I have no available space in heap, my values:

,0x8b03af98,,0x8b041e48,8,,0x8000,0x0,0x0

So, I cannot run the program after Run->Restart. I must reset the core first, then load the program again to be able to execute program. Why this happens? Should I config something?

AM5728 on BeagleBoard-X15

CCS 7.2.0.00013

bios_6_75_02_00

ipc_3_50_03_05

Thanks!

  • Hello,

    Generally speaking, performing a restart is not enough to reload a program on a Cortex-A15 core.

    In order to cleanly reload a program, we need to make sure that the caches are clean. If the currently running program enables the cache, the cache is most likely dirty. Performing a CPU reset on the Cortex-A15 target only disables the cache and does not actually clean the cache lines. It is necessary to perform a System Reset to clean the cache.

    Steps to perform a System Reset and reload a new program:

    1. Disconnect from all the A15 targets.

    2. Click on the reset dropdown menu and select "System Reset."

    3. Re-connect to the A15 target.

    4. Reload and run the program.