Skip to content

Eclipse OpenOCD Debugging Tutorial

pixhawk-students edited this page Sep 29, 2011 · 4 revisions

The Eclipse Debug view allows to use graphical debugging while still retaining the power of the GDB command line.

Eclipse Debuggin view

Mike Smith has provided a number of very helpful commands on the GDB command line (type them in the bottom line, they will appear in green):

showtasks - Shows the FreeRTOS / PiOS tasks and their states
showtask <address> - Shows one task, e.g. "showtask 0x20004688"
unwind - Unwind the stack - very helpful after a hard fault

Advanced Debugging

If you ran into a hard fault, you will see this message in GDB from the JTAG DCC interface:

HARD FAULT

The first value is the address where the error occured. You can get the code line information for it by typing:

info line *0x<number from hard fault handler>

It is of course also relevant to know what led to this fault. To get the stack trace, type:

unwind

If you're inside the fault handler, it should provide you the stack trace.

Clone this wiki locally