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.

CCS/AM3517: Debugging IAR image in CCS

Guru 20755 points

Part Number: AM3517

Tool/software: Code Composer Studio

Hello,

I try to debug a binary which was build in IAR with c source code.

Is it possible to view it c source code or only assembly ?

I first load and run the binary on target (without using CCS).

Then in CCS I choose (load only symbols).

And I can connect with debugger, but I only see assembly.

And in "source" tab of debugger window it shows "RTS libarary - cannot identify the compiler tool for the project"

Does it mean that it's it possible to see C source code ?

Thank you!
Ran

  • Hi Ran,
    This is support on on ARM targets. See the below video:
    www.youtube.com/watch

    Thanks
    ki
  • Sorry I didn't answer the second part of your question directly. yes C source level debug is supported as you can see in the above video. As long as the application is built with debug symbols and the debugger can find the source files.
  • Hi Ki,

    Thank you very much for the quick reply!

    I understand that c source code debugging is possible with CCS. I've done that before.
    But now I try to debug a binary which was build in another tool -IAR.

    I see in "source" tab the following message:
    "RTS libarary - cannot identify the compiler tool for the project"

    What does it mean ?

    Thank you,
    Ran

  • Sorry, I misunderstood your question.

    To clarify:

    ranchu said:
    I see in "source" tab the following message:
    "RTS libarary - cannot identify the compiler tool for the project"

    The below screenshot is what you are referring to, correct?

    That list is the source file lookup paths for the debugger. By default, CCS will normally add the path to the source files of the RTS lib when halted in the RTS code. It tries to detect which compiler you are using and then adjusts the path accordingly for that compiler version. In your case, it doesn't not recognize the compiler tool used to generate the executable, hence it is unable to resolve the path. It makes sense since you didn't use a compiler that is recognized by CCS (TI or standard GCC compiler). Hence the message and that is what it means. In your case, to debug code in the RTS, you can add the path that contains the source files for the RTS lib used when you built it with IAR. This will allow the debugger to find it.

  • Ki,

    Thanks a lot. Now it works like magic.
    If I can please ask on the matter the following just for my understanding :

    The "load image" option means that the debugger will download image to target memory.
    But What does it mean "load symbold only" ? Does debugger(jtag) load something to target memory ?

    Thank you,
    Ran
  • ranchu said:
    But What does it mean "load symbold only" ? Does debugger(jtag) load something to target memory ?

    "Load Symbols Only" will only load the debug symbols of the executable file to the debugger. It will NOT load anything on to the target.

    You typically want to only load symbols when you want to debug code that you already have flashed on to the target (or something similar). There is no need to to reflash the code again to the target. But you still need to load the debug symbols to the debugger so that you will have proper debug visibility (i.e. source line debug, etc).

    Thanks

    ki

  • Hi Ki,

    Thanks a lot.

    One last on this , just for my understanding:

    in "loading options" in "debug configuration"

    "Load program" - load symbols to debugger and load program to RAM ?

    "Load symbols only" - load symbols to debugger.

    Is the above correct ?

    Thanks again.

    Ran

  • Mostly correct with one slight change to the below

    ranchu said:
    "Load program" - load symbols to debugger and load program to RAM ?

    Load program will load the symbols to the debugger and load the code to RAM or on-chip flash (for most MCU devices). 

    Thanks

    ki