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 with mpm and an emulator

I have having trouble debugging a DSP application on the K2H.  The program uses IPC, and therefore must be loaded through mpm so that Linux knows about it and can talk to it. 

According to http://processors.wiki.ti.com/index.php/MCSDK_UG_Chapter_Developing_Transports#KeyStone2_Specific_Details I should be able to load the program via mpmcl, then attach to the core and load symbols.  Sometimes this works on first boot, if I run "mpmcl load; mpmcl run".  But if I ever run "mpmcl reset" then the Blackhawk can no longer talk to the core.  If I was already connected, it stays connected, but if I wasn't yet connected, or dissconnect and try to reconnect, it fails.  Even if I stay connected, it is not able to halt or reset the core.

Am I doing something wrong?  What needs to happen for mpm to give up control of the core so that the Blackhawk/Code Composer doesn't think that the core is in reset.  Is there anyway to load the program via mpm and then start running it with the emulator?  This would be ideal since I am debugging some initialization.

  • Hi,

    Have you referred  below link about MPM, Loading images from CCS and FAQ? If not, please refer from below link.

    http://processors.wiki.ti.com/index.php/MCSDK_UG_Chapter_Developing_System_Mgmt#Multiple_Processor_Manager

    Thank you.

  • I have read that page.  I have the variable set in uboot, and have no problem loading stand-alone programs with the blackhawk.  I also have no problem loading programs using mpmcl.  I only run into a problem once I try to debug a core that has previously been loaded with mpmcl.

    Ideally I would be able to load the program with mpmcl, then connect, then tell the core to run from CCS.  However, once I use mpmcl, the core icon in CCS changes from paused to running, and the text to the right says "In reset".  Even after running "mpmcl run dsp0" CCS can not reliably take control of the core.

  • Hi, Derrick,

    DSP is still in reset state after "reset" and "load" commands. Please run the dsp code, "mpmcl run", so it will be out of reset state, then connect to dsp core. Once connected, change the while loop value so you can step out of the while loop to the code in main().

    If you keep having issue to connect after running dsp code, try to restart CCS. Sometimes, CCS may get into a bad state if you try to connect when DSP is in reset.

    Rex

  • I think the problem was that CCS was in a bad state.  It happens especially often if try to reload a program manually, since the DSP sits in the reset state longer than if I reload it via a script. 


    Is there a way to use mpmcl to pass arguments to main?  That way I can decide at run time if I want the program to wait in main for me to connect with the debugger, or if I just want to it run normally.