Datasheet

GDB Debugging
The definitive guide to GDB is available here:
ftp://ftp.gnu.org/old-gnu/Manuals/gdb/html_chapter/gdb_toc.html
Starting the Debugger
You can start GDB (GNU Debugger) with newt with the following command, with a
JLink connected to the target device:
# Optionally build and flash the image
$ newt build target_name
$ newt create-image target_name 0.0.0
$ newt load target_name
# Start GDB
$ newt debug target_name
You can then start and stop code execution on the target MCU via:
(gbd) monitor halt
and
(gbd) monitor go
You can also start a fresh run of the code via:
(gbd) monitor reset
(gdb) c
You can check if the OS is running by executing the following code, which
will display the OS time counter:
(gdb) p/d g_os_time
Displaying Values
To display the current state of a struct or global variable, use the print
[name] (or p [name] ) command.
Basic Example
The example below halts the processor and then prints a struct instance named
ble_phy_stats .
> Tip: You can optionally enable pretty printing via set print pretty on
GDB debugging will require a Segger JLink for the GDB Server and debug port access
© Adafruit Industries https://learn.adafruit.com/adafruit-nrf52-pro-feather Page 70 of 87