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.

CCS4 and setting break points in source files.

I am using CCS4 with a custom made DM6446 board and XDS560R emulator.  I have the Codec Engine with iUniversal example applications built and working.  I followed the steps in http://processors.wiki.ti.com/index.php/Debugging_the_DSP_side_of_a_CE_application_on_DaVinci_using_CCS  and have succeeded with all the steps.  I can step through and set break points in  the Assembly code and see the output in my terminal screen.  The problem I am having is after loading the symbol file I can't set break points or step through using source files.  Has anyone debugged the iUniversal example fir with CCS4 and stepped through source files successfully?  If so can I get details with each step performed or any ideas of what I am missing.  A video tutorial would be awesome :).

  • Hello,

    I am guessing that after program load, and when you set a breakpoint, the breakpoint has a warning overly icon. If this is the case, than you need to set your up source lookup mapping with module mapping. You can right clicks on one of the element (stack, thread) in the debug view and select edit source lookup, than you can define your module mapping.

    Setting breakpoint by double clicking in the editor required the file to be properly resolved with the current symbol file, this is to prevent the debugger from guessing which source file you are referring to if there is duplicate source file with the same name. You can bypass this by setting source line breakpoint from the breakpoints view, click on the new breakpoint button in the breakpoints view and enter "foo.c, line 100". The debugger will set breakpoint on the first file that match the name for the loaded symbol.

    I hope this help.

    Patrick

  • Is you application built with optimization enabled? That would explain while you can step and set breakpoints in the assembly code but not on a per source line level. In the Disassembly view, enable mixed-mode and see how the source line and associated disassembly is interleaved.

    ki

  • It looks like I have the -o2 enabled during my build.  I was wondering where should the -g option be turned on?  I am using the codec_engine_2_23_01. and building the iUniversal fir example.

  • Use -g if you want full debug enabled. This includes full source line stepping. As you start enabling optimization, you lose some debugging visbility. See:

    http://processors.wiki.ti.com/index.php/C6000_Compiler:_Best_Options_for_Performance#Definitely_use_the_following:

    -o2 is function level is function level optimization. So source stepping through a function will not really be possible.

    Thanks

    ki

  • In case you were asking where the option is to enable -g, it is:

  • Yes I am asking where to turn on debugging but I am using Linux to build the Codec Engine with the iUniversal Example.  I am using a custom made DM6446 build running Linux accessing the DSP via the Codec Engine.

  • You may want to try posting questions regarding the iUniversal example in the DaVinci forum. They should be able to guide you to the answers you seek.

    Thanks

    ki