CODECOMPOSER: Stepping through user assembly code.

Part Number: CODECOMPOSER
Other Parts Discussed in Thread: MSPM0G3519

Tool/software:

Hello,

CCS 20.0.2.5__1.6.2

MSPM0G3519 with ti-cgt-armllvm_4.0.1.LTS

I have GNU assembly files, but CCS cannot step in them. It looks like there is no debug information or CCS is not seeing it?

Command line:

 tiarmclang.exe  -march=thumbv6m -mcpu=cortex-m0plus -mthumb -gdwarf-3 -save-temps=obj -c -x assembler my_assembly.s

I can open file in CCS and set BP in it. I also can step in Disassembly but not in the file itself.

What is interesting that some files are working, and others do not.

What am I missing in options to get compiler to add correct debug information visible to CCS to assembly files?

Regards,

Eugene

  • Hello Eugene,

    Can you provide a small test case? I believe you do not build with CCS projects so I would need the executable and relevant source files

    Thanks

    ki

  • Hi Ki,

    Not sure it is easy to do. I have two images loaded from S-records and then symbols added with GEL script. In one image I can step through assembly and in the other I cannot.

    I can share the whole set up but it is quite big. It is easy to use though. Or I can provide you with images and source. Let me know how.

    Regards,

    Eugene

  • I'll take anything that can reproduce the issue. I'm hoping the basic test case can be simplified (single image to flash + source files) but if not then I will take what I can get.

    Are you building with default optimization? I didn't see any specific optimization level set in the build command you mentioned.

  • This is assembly. Not sure there is any optimization to it?

  • Yes, you are correct. Sorry about that.

    Please start a private E2E conversation with me for the test case. Please not that I only have a G3519 LaunchPad so any test case would need to be simple enough to run on it.

  • Hi Ki,

    I see that with lates 20.1.0.6__1.7.0 assembly stepping seems to be fixed and correlation between disassembly and assembly source is working .... but inline assembly is broken? No setting BPs or stepping in HLL source with inline assembly :-)

    Eugene

  • I see that with lates 20.1.0.6__1.7.0 assembly stepping seems to be fixed and correlation between disassembly and assembly source is working

    Oh that is good to hear. We have noted several disassembly debug issues and some were addressed on 20.1.0 while the rest are targeted for 20.2.0.

    but inline assembly is broken? No setting BPs or stepping in HLL source with inline assembly :-)

    I'm trying to recall if the inline assembly issues are targeted for 20.2.0. I will need to investigate.

  • Hi Ki,

    There is another issue here. When C code calls a function which is written in assembly there is no stepping into it. It is always step-over as if called function does not have debug information, but it does because I can step in it.

    Regards,

    Eugene

  • When C code calls a function which is written in assembly there is no stepping into it. It is always step-over as if called function does not have debug information, but it does because I can step in it.

    Yes, I see this too. I assume you are trying the source step-in (F11) which ends up stepping over while the assembly step in option in the disassembly view will step into the routine fine?

  • Yes, F11 in C source

  • I'm trying to recall if the inline assembly issues are targeted for 20.2.0. I will need to investigate.

    It is not in any current plans. Hence I filed a bug for this. Tracking link: https://sir.ext.ti.com/jira/browse/EXT_EP-12224

  • Hi Ki,

    FYI, I loaded ELF into different debugger, and it seems to have the same inline assembly single step issue. The required debug information is missing from compiler generated DWARF-3 data.

    It looks like compiler issue rather than debugger one. How do you want to proceed?

    Regards,

    Eugene

  • Thank you for the additional inputs! I have added that information to the internal notes of that ticket. It is likely CCS engineering will reassign the ticket to the compiler team.