• Resolved

[FAQ] How to Trick the CCS debugger into providing a blocked TI-RTOS (SYS/BIOS) task call stack on Cortex-M devices

Guru 88190 points

Replies: 3

Views: 366

Beginning with SYS/BIOS release 6.35.02.45, the Task module provides a non-invasive per task CallStack ROV view.

The instructions below are for SYS/BIOS versions before 6.35.02.45 (that do not support these built in ROV views).

After connecting to the Cortex-M core:

  1. Using the disassembly window, find the address of this symbol: ti_sysbios_knl_Task_swapReturn
  2. Put that address + 4 into the PC register.
  3. In the Task ROV 'Raw' view, find the 'context' field of the task Instance State you're interested in.
  4. Place the value of 'context' into both the MSP and PSP registers.
  5. Single step ONE instruction (using "Assembly Step Into") for M3/M4 targets or TWO instructions for M4F targets. The debugger window should now show you a rough approximation of the task's call stack. The program is NOT continue-able at this point because the register context at the point of halting the CPU is lost.

  • Thanks

  • ToddMullanix
     The program is NOT continue-able at this point because the register context at the point of halting the CPU is lost.

    Is there a way the CCS debugger could be enhanced to restore the register context from where SYS/BIOS presumably saves them (in order to allow SYS/BIOS to perform context switches)?

    I made a similar suggestion in the past in Is it possible for CCS 6.1.2 to switch the debug context to a blocked TI-RTOS task?, but didn't receive a response.

  • Guru 127070 points

    In reply to Chester Gillon:

    Chester,

    Basically this would be task level debugging in CCS.  There are some capabilities in CCS from many years back but this is not something supported today.  While we have no immediate plans to bring this feature back it is possible that may change due to some other things that we need to support.

    John

     


    If my reply answers your question please click the "This resolved my issue" button