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 PSP Code



Hi,

 

I've got in my believe a simple question: How can I debug the SPI driver code? I've tried to modify the file  "config.bld", adding "--symdebug:dwarf -g" to C674.ccOpts.suffix. Afterwards I went to the SPI directory and recompiled the driver ("xdc clean && xdc") but without success: When I try to debug the code in CCS it only knows the function names as symbols in the C Code where I can set breakpoints. But I can't set breakpoints inside the actual code of such a function neither can I step through it.

Do you have any suggestions for me here? Any help on this issue would be very appreciated.

TIA,

Steve

  • Steve,

    First of all, please mention the BIOS PSP version which you are using?

    Please be sure that you use all the tools, which are mentioned in the userguide.

    In genral, to debug any driver you need to load the debug image (of the sample application) and putting the breakpoint in the driver [in CCS4 (if at all there is a project for CCS4)it may asks to locate the source file]. 

    Thanks and Regards,

    Sandeep K

  • Hi Sandeep,

     

    thanks for your fast answer. Iam using the tools mentioned in the user guide, but most of them in a newer version, because I thought it should be downward compatible. An exception is emda3_lld which is used in the mentioned version (02.10.02.03). However my BIOS PSP version is 02.10.01.

     

    Furthermore, Iam using my own sample application which was configured according to the sample application provided by the PSP. Debugging the provided sample application including the driver routines seems to work like you mentioned, but how can I configure my own example application to be able to debug the driver code? It does not seem to work for that one.

     

    Thanks,

    Steve

  • Steve,

    A quick suggestion would be to use the .map files available in the ccs project which you have created.

    The .map file will have the corresponding address of the each function, [load the executable], this address can be put in the disassembly and put breakpoint there. Once you run the application after these steps, the execution asks for source file, then mention the appropriate source file. Once you reach this point, you should be able to continue the debugging.

    If the above steps does not work, is it possible you to share the CCS project which you are using?

    Could you please share the config.bld as well?

    Thanks and Regards,

    Sandeep K

  • 8715.spit.zip

    It does not seem to work. It halts at the address but CCS does not show the code neither it asks for the source. I've attached my project using the export feature. Furthermore I've attached config.bld. Hope that helps you finding the issue.

    8032.config.bld.txt

    Thanks,

    Steve7268.spit.zip

  • Ok it works now. The thing was that I've compiled my project using the 'whole_program' profile. When switching to 'debug' profile debugging of the libraries seems to work as well.

     

    Thanks for your effort and time Sandeep.

     

    Kind Regards,

    Steve

  • Thats great!!! :)

    Regards,

    Sandeep K