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.

debugging programs run by on-chip boot loader



I have a new board. I can connect to it using JTAG. I can download and run programs using JTAG, including a flash programmer. I can write a program to flash that the on-chip boot loader will run out of reset without JTAG intervention.

Next step is that I would like to be able to debug programs that have been run from reset.

The closest I have to that is that I can stop and start a program using pause/resume, and I can step through the disassembly, but there is no source level debugging. From the debug configuration I set the loading options to load symbols only.

Is source level debugging possible for programs started by the on-chip boot loader? I'm using CCSv5.2 with the C5504.

  • Hi John,

    You need to load the debug symbols for the program that is running from flash and then point the debugger to where the source files are.

    After you have started the debugger and connected to the target, go to 'Run -> Load -> Load Symbols' and select the file that has the debug symbols (*.out file for TI compilers).

    Once the symbols are loaded, CCS will need to know where the related source files are. If you have a CCS project, then this is pretty easily done. Just have the CCS  project open the the workspace. The debugger then can access all those source files in the project.

    If you do not have a CCS project open (or simply do not want to have it open), you can point CCS to the location of the source files.

    See slides 48-53 of: http://software-dl.ti.com/dsps/dsps_public_sw/sdo_ccstudio/presentations/CCSv5_Tips_&_Tricks.pdf

    The method in slide 49 is recommended.

    Thanks

    ki

  • Hi Ki

    Thanks for your reply. The problem here was the .gel script I was using, which is C:\ti\ccsv5\ccs_base\emulation\boards\evm5515_v1\gel\evm5515.gel with some modifications for C5504 and our board. I think this script does way too much in OnTargetConnect, and what is there should be moved to OnPreFileLoaded, except possibly for the GEL_TextOut. This way if you debug symbols only, it doesn't take over and trash the current state of the DSP.

    Do you agree?

  • John Fisher said:

    I think this script does way too much in OnTargetConnect, and what is there should be moved to OnPreFileLoaded, except possibly for the GEL_TextOut. This way if you debug symbols only, it doesn't take over and trash the current state of the DSP.

    Do you agree?

    Oh yes! When you want to debug programs running from flash, you often do not want to use the same startup GEL file (or many not any GEL file at all). The startup GEL files often do target initialization that you do not need anymore and end up actually trashing the current state when it reruns initialization routines.

    ki

  • I'm happy to call this a bug in evm5515.gel. The other .gel scripts I've inspected don't do it this way. It is convenient when changing from running from JTAG to running from flash, to only have to change the loading options in the debug configuration from Load program to Load symbols, and vice versa. I'd prefer not to have to detach or attach the gel script as well.