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.

How to debug a crashed/locked up firmware with CCS?

Expert 1960 points
Other Parts Discussed in Thread: CONTROLSUITE

Dear CCS Gurus,

We have firmware running in our customized board with TI F28xx MCU. After running correctly for a while, the firmware locks up somehow.   It's probably due to stack overflow or something, but we'd like to confirm and find a solution on how to fix it. I tried to use CCS with JTAG to connect to the board manually, and bring up ROV (RTOS Object Viewer) to see details, e.g. stack usage in each task. But I never got it working correctly. For one thing CCS becomes very very slow whenever I click on something. After I got the ROV/task details, it simply shows an error message as shown below.

I was wondering if I did it correctly. Otherwise how to debug a software after it locks up? I'd like to keep the "crime scene" so I did not want to reset MCU easily. Thanks for your help and any useful info!

  • Hello, can someone share some experience on this issue, i.e. to connect a running MCU with CCS via JTag? Whenever I connected to the board via JTAG, it always stopped the execution, and shows something like "No source available for 0x3ff16a" and there is no info in the ROV, as described above. I checked settings in Debug Options -> Auto Run and Laugnch Options (TMS320C28XX) and unchecked option for "Halt the target before debugger access". and also unchecked the option "Halt the target on a connect". But somehow it still halts the execution and shows no data when I connect to the target while it's running. What did I miss here? Any help or suggestions are appreciated here! Thanks!
  • Did you have real-time mode enabled prior to launching your debug session?

    Please take a look at the Real-Time Debug section of this wiki link. It has a ink to a video that shows the CCS settings for attaching to, and debugging code that is already flashed to the device. Hope that helps get you to a point where you can "inspect" your code. 

  • Hi AartiG,

    Thanks for your reply and link. I did not have real-time mode enabled earlier, and just kept everything "Debugger Options" as default. Since you mentioned it, I tried to enable realtime mode in "Tools-> Debugger Options-> Auto Run and Launch Options.  I also un-checked option for "Halt target on a coonnect" in Connection Options. But somehow as soon as I connect the target, the program will stop, as I can see it from LED blinking stopped. Sometimes it gave me an error right away when I tried to connect the debugger. Please see the following error message in the screenshot. I'm using F28377D MCU and tried with 2 different emulators, XDS200 and XDS560. But so far still unable to connect to a running board to debug. By the way, I used Sys/BIOS as part of my application program. 

    I wonder if anyone has tried it to debug a running board successfully, and please give me a hint on how to get it working for SYS/BIOS? Thanks!

  • Dear AartiG and All,

    To verify if I could get a simple example working, I tried the basic LED blinking example (blinky_cpu01) from latest ControlSuite, and followed the exact procedure as described in TI wiki page for Real-Time Debugging. But it still would not work. I tried both onboard XDS100v2 and also an external emulator XDS200, but got the same error.  I start to wonder if this is related to the MCU F28377D since it's a new chip? Has anyone ever tried real-time debugging with F28377D? Many thanks!

    Here is the error message when i tried to connect to the TI evaluation board running Blinky example:

    After I pressed "Rude Retry", it connected and ended up in an illegal ISR: