This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

Debugging RTX code

Hi,

I'm trying to debug a sample RTX code running on MCBTMS570 board using uVision 4 and Segger J-Link jtag pod.
The code compiles fine an runs if I start from a reset. (LEDs are blinking as they are supposed).
If I halt and resume, the code fails in undefined handler.
Also, if I set a breakpoint in one of the task, and start from reset, the code will runs correctly up to the breakpoint, but will fail if I resume execution.

If tried the same bin code using TI CCS the code runs fine, and breakpoint/resume are also working.

Any ideas?

Thanks and Regards,

Jean-Marc Mifsud

  • I guess I'd start by making sure I had the most up to date firmware and drivers for my J-Link.

    I'd make sure I had all fault handlers in my code set up to catch and dump faulting conditions in a human readable form.

    I'd check if there are any other timers, counters, watchdogs, or interrupts ticking that might object to being jammed up by dead stopping the machine in the debugger, and enable any on chip debug functions that suspend such timers/counter/interrupt during such conditions.

    In debugging real time systems one might also want to pipe debug data out a serial link, SWV/DCC, log to memory/file, and invest in a trace pod.

  • Thanks for your advise, but unfortunately, it did not help.
    As I said in my previous post, the same binary code can be debugged correctly using Code Composer Studio (TI IDE).
    Maybe you can explain the way uVision interracts with an application running RTX.
    In the project properties, I did select the RTX in one of the tab. (without, the SWI handler is not present and the application does not run).
    I've noticed that when within the debug session, whenever I open the RTX window, the application does not run real time anymore. I assume, the debugger is setting some kind of breakpoint and reads the target to figure out the state of the different task.
    Of course in CCS, I don't have this support.

    So in summary, I'm stuck here. In fact, this is a question from one of our customer, using TMS570 devices under uVision. Any help will be appreciated.

    Also, I've compiled and used another demo code (blinky) that is not using RTX. This code runs fine and debug is possible. So I really think there is something related to RTX that I don't understand.

    Thanks and Regards,

    Jean-Marc Mifsud

  • Suggest you communicate this with your support contact at Keil.