forked from zhao0079/openpilot
-
Notifications
You must be signed in to change notification settings - Fork 0
Eclipse OpenOCD Debugging Tutorial
qgc edited this page Oct 25, 2011
·
4 revisions
The Eclipse Debug view allows to use graphical debugging while still retaining the power of the GDB command line.
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
showheap - Show heap and free space
If you ran into a hard fault, you will see this message in GDB from the JTAG DCC interface:
HARD FAULT
0801b2ce
40000000
The first value is the address where the error occured. You can get the code line information for it by typing:
info line *0x<first number from hard fault handler, in this case "0801b2ce">
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.