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.

Postmortem debugging MSP430



Has anyone tried postmortem debugging in CCS with the MSP430?  Tried creating a postmortem debug configuration, but got stuck at the "Select Corefile" dialog.

I tried selecting the .out binary as the corefile, but that didn't work.  I also tried searching the compiler and linker documentation for producing a corefile, and I haven't found anything.

Can someone please bring me up to speed on corefiles, how they are generated, and what the format is?

Thanks,

Mateja

  • Mateja,

    Where do you see the postmortem debug configuration?

    John

  • In the Debug perspective, Target > Debug...

    On the left-hand side of the screen, you can double-click C/C++ Postmortem debugger

    I created a configuration here, the only option I changed was under the Main tab, I changed C/C++ Application to point to my application, then I hit Debug, and then I get the Select corefile dialog box.

    Thanks,

    Mateja

  • I see.  Unfortunately you won't be able to use that.  It is something that can be used to do post-mortem debug when you are debugging linux apps (get the core dump when a process crashes & then load into gdb) but it is not connected at all to the CCS debugger.  There are a few things like that buried in the Debug... dialog since there are a number of different types of debuggers that can be integrated into Eclipse.

     

    Regards,

    John

  • OK well maybe you can help me address the bigger picture.

    Say we get a module back from a client who says, "it broke".  How do I attach a debugger to it without loading new firmware?

    Thanks,

    Mateja

  • One possible procedure would be:

    • Create (or reuse) a target configuration for the specific device on your module.
    • Launch a debug session for this target (right click on the target configuration and select "Launch selected configuration", or use "Launch TI debugger" from the Target menu which will use the default configuration)
    • Connect to the device by clicking the connect button.
    • Load the symbols for the firmware flashed on the device (from target menu)
  • I have tried this and I am able to connect to the target and load symbols -- Thank you.

    Is there also a way to enable the stack trace that is available during a normal debug session, as shown in the picture? When I connect to the target manually, I only get to see the stack frame of the top function.

    Thanks,

    Mateja

  • If the target code has been compiled with debugging information enabled, and the code is not highly optimized, there should be enough frame information available for the debugger to construct the call stack. Are you seeing a difference between the case where you have flashed a program and just loaded the symbols for the same program?

    One case you may run into is for inlined functions. As an inlined function is truly “inlined”, it will not show up on the call stack.