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.

Dis-assembly and source code not lining up (codesourcery baremetal toolchain)



Hi,

  I setup CCS to build projects for ARM A8 using codesourcery baremetal tool chain (arm-none-eabi). When I load the program and try to single step the dis-assembly window is not lining up correctly with the source code. Additionally I am also unable to link any of my assembly source files to the dis-assembly, I do not see any of the labels defined in the assembly code file in the dis-asssembly window.

Are there any flags or options that must be enabled for this to work?

Thank you.

Regards,

Sudhanand.

  • Sudhanand,

    I haven't used the Codesourcery tools for native ARM code (baremetal), but are you using GDB or the JTAG debugger? If using the JTAG debugger, the executable will have to carry absolute address information to allow a proper source code and memory correlation, but I don't know how if the CodeSourcery linker works. If using GDB, then you need to check the CodeSourcery documentation for details regarding the debugging process.

    Regarding the assembly files, although it seems there is an issue in performing source-level debugging in CCS (check this post), I can see the assembly symbols in the debugger. In this case, can you check if you have -g3 option enabled in your project?

    Cheers,

    Rafael

     

  • Rafael,

     I am using the JTAG debugger. The following are my compile flags:

    "-I"C:\Program Files\CodeSourcery\Sourcery G++ Lite\arm-none-eabi\include" -O0 -g3 -Wall -c -fmessage-length=0 -mtune=cortex-a8 -march=armv7-a"

    As you can see I am setting the debug level to '. Should I also use DWARF or some other flags to retain the absolute address information.

     

    Regards,

    Sudhanand.

  • Sudhanand,

    That should be enough to see the debug information, as the -g option should enable one debug format (I guess DWARF is enabled by default), but apart from that I really can't comment on specifics of the baremetal Codesourcery tools, as the Sourcery G++ Lite tools' documentation specifies GDB as their supported debugger.

    Regards,

    Rafael