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.

No Code associated with CPP-Source File on setting Debug Breakpoints

Other Parts Discussed in Thread: SYSCONFIG

Hello,
suddenly out of the blue I cannot set breakpoints anymore in new code using CCS 11.2
and debugging with XDS110 JTAG-debug probe on an AM243x board.

I can set breakpoints in code I wrote a few months ago, but for new code the debugger says

"No Code associated with <mySourceFile>"

when I try to enable the breakpoints after starting the debug process and loading the firmware image.

The project is not a CCS project, as I am building in the terminal using the TI-ARM-clang compiler (ti-cgt-armllvm_1.3.0.LTS).
The "-O0"-Option is set for our debug build, so there is no compiler optimization as was the case here:

https://e2e.ti.com/support/tools/code-composer-studio-group/ccs/f/code-composer-studio-forum/682807/ccs-cc2640r2f-setting-breakpoints-on-my-own-new-code-are-not-in-debug-context

as far as I understood that case.

When I right click a working breakpoint and choose "Breakpoint Properties", and then on the right side in the Properties table look in "Hardware Configuration" -> Location,
the working breakpoints have a valid address and a symbolic showing, as I interpret it, the function scope the breakpoint is in plus the relative offset address from the beginning of the function.
Whereas for the not working breakpoints the address is 0x0 and the symbolic are empty.

I am currently at my wits end as I fail to see the difference between the new code and the old code.
Thank you for your help.


Best regards

Philip.

  • Hello Philip,

    the debugger is unable to associate the source file in question with the loaded debug symbols. This is a fairly common issue and the root cause can vary. The thing that is a bit unusual is that everything was working fine until recently.

    Please provide more details on your debug flow and how you are setting the breakpoints. For example, Are you starting a project-less debug session,manually loading the code, then manually opening a source file and trying to set a source line breakpoint by toggling in the editor margin of the source file? You also explicitly mention CPP. Is the issue only specific to CPP files and other files like C or asm do not have an issue?

    Also, which host OS are you using?

    Thanks

    ki

  • Hello Ki,
    thank you for your answer.

    I am normally starting CCS on my Windows 10 machine.
    I use WSL 1 (Linux Subsystem for Windows) for the build process.
    I do a 2 step process first building with CMake then with Make.

    In CCS I created a new Empty project and provided the folder to my sources for the already existing source code files.

    Then I created a debug configuration set with an CCXML target configuration looking like this:


    Also we are using a launch script, which on start of the debugging process is used to set the board into no-boot mode,
    and then checks if the board-config ELF-file and sysfw.bin are present and afterwards connects the target.

    After another CPU reset then I load the ELF-file which I compiled in WSL before.
    The build is done in debug mode, there is no stripping of debug symbols and processor optimization is off.

    One thing that +has changed from before is that I rebuilt the SYSFW board config using this procedure

    https://dev.ti.com/tirex/explore/content/mcu_plus_sdk_am64x_08_02_00_28/docs/api_guide_am64x/TOOLS_SYSFW.html#BOARCFG_GEN

    as I am still trying to get my interrupt routing to work which uses TSICI requests that rely on the SYSFW board config.
    What is strange is that I am still able to put in new breakpoints, but only into older code as it seems.

    Also I am using headers generated by SysConfig, but I use those in the old code as well.
    I would be greateful if you would have even a wild guess in which direction I might look.
    Thank you for your time and trouble.


    Best regards

    Philip.

  • What is strange is that I am still able to put in new breakpoints, but only into older code as it seems.

    What is the exact procedue you use to set new breakpoints? Are you opening the source from your dummy (debug) project in CCS and then trying to set a breakpoint in the editor margin?

    Is the older code (which has no issues setting breakpoints) also CPP files?

  • Hello Ki,
    the procedure is that I right-click on the line number and then choose to set a breakpoint like in the following:

    Then they are normally inactive.
    When I restart my debugging process (normally, since it was told me in the past there were problems in CCS with just terminating and restarting the debug process, I unplug the Debug probes USB connector from the computer. Then I restart CCS. Then I power cycle the target board and plug in the USB into the computer again. Then I choose again Run -> Debug Configurations... Then select my debug configuration and press "Debug") I select all breakpoints with Ctrl+A and then right-click and choose "Enable".

  • I can imagine it may be quite hard for you to provide a solid answer with so vague information.
    I will first try switching out files from our git develop branch with my feature branch,
    to see if the breakpoints work with a previous version and what change might have caused the problems.

    I will come back to you when I have results concerning that.
    Thank you for your patience.


    Best regards

    Philip.

  • Ok, so taking a previous version of a file that I was able to set breakpoints in before but cannot do so now, does not work.
    Maybe I need to empty the CCS cache, will try that.

  • Checking out the whole develop branch makes said files breakpoints working again.
    Guess a complete diff of both branches should do the trick.

    I will publish the results here once I find out about the causation.


    Best regards

    Philip.

  • Checking out the whole develop branch makes said files breakpoints working again.

    This is interesting. It seems like there is some file mismatch between the loaded debug symbols and the files.

    I will publish the results here once I find out about the causation.

    Please keep me posted and thank you for your investigations.

    ki

  • Hello Ki,
    sorry to have wasted your time. The error was pretty stupid.
    The debugger was absolutely right. There was really no code associated with the breakpoints.
    As we have this initialization C++-source file where all the objects for our tests where initialized.

    Recently the other developers switched to the more careful approach where to put an #ifdef with a define-flag around their initialization,
    so that only the tests needed would be initialized and not all of them.
    I adapted that practize for my tests but then forgot to actually define my test-flag resulting in the code really having no address within the executable program.

    Sorry that it was not something spectacular in the end.
    I wonder if maybe we should delete this whole question, so that in the future people who have a similar problem won't waste their time with this.
    You decide.


    Best regards

    Philip.

  • Glad to hear you resolved the issue and thank you for the update!

    I'll keep the thread here. There is good information regarding source code correlation that can be useful to others.

    Thanks

    ki