AM263P4: CCS cannot parse the call stack correctly

Part Number: AM263P4

Hi Experts,

I find the CCS sometimes can not parse the call stack correctly.

Below is an example:

image.png

There is some issues in the adc reference hardware, so my code get stuck in the assert statement in the ADC intialization, which is expected.

When we connected to the target, we saw the CPU is stuck in the infinte loop in the assert, the next we do is following the call stack to see what's entering that assert. As the picture shows, the second level of the call stack is "Diver_open()", however, CCS can not parse this call stack correctly to show me which line in the Driver_open() leads to the assert. It only points to the beginning of the source file.

Below is a project to reproduce the issue.ipc_notify_echo_am263px-cc_r5fss0-0_freertos_ti-arm-clang.zip

 

Could you please help looking into this issue?

Regards,

Hang

  • Hi Hang,

    Q1. Does this issue occur in Debug mode or Release mode? Is any optimization in compiler enabled via compiler flags that reduces debug-ability of code by optimization of symbols.When compiler optimization is enabled (such as -O1, -O2, or -Os), tiarmclang frequently inlines DebugP_assert() or merges multiple assert calls into a single shared while(1) trap block at the end of Drivers_open(). Because multiple lines share one machine instruction address, CCS defaults to the start of the function or file.

    Q2. Have you tried to remove symbols and re-load them (will work only in case of un-optimized code)? Steps to do so are:

    Remove symbols:

    1. Click on the CPU in the debug window.

    2. On the top pane, go to RUN -> LOAD -> Remove all symbols

    3. Then again, go to RUN -> LOAD -> LOAD SYMBOLS -> Choose the .out file for that CPU

    Regards,
    Shaunak

  • Hi Shaunak,

    This is in Debug mode and the optimization is left as empty. Optimization don't seem to be the problem as the other source files are parsed correctly.

    Even with optimization, the CCS should still be able to parse the call stack. It may not be able to have accurate 1v1 map, but it should be able to match on certain nodes. No matter how far it goes inlining assert, it would still be in driver_open(), at least it should show it's in the Driver_open().

    We use lots of optimization in other projects, other device, and we don't usually see CCS completely not parsing it and just point to the begining.

    Meanwhile, removing and reloading symbol shows the same result.

    Regards,

    Hang

  • Hang, we are passing this to SDTO team to take a look at, may be a ccs bug

  • Hang,

    What version of CCS IDE are you using? If you are not using the latest 21.1.0, can you give it a try?

    Thanks

    ki

  • Below is a project to reproduce the issue.ipc_notify_echo_am263px-cc_r5fss0-0_freertos_ti-arm-clang.zip

    I imported your project into my CCS 21.1.0 workspace. I then rebuilt it as is and then loaded the program and debugged it. I found no issue with the call stack: