Skip to content

Instantly share code, notes, and snippets.

@pietgeursen
Last active June 26, 2017 03:27
Show Gist options
  • Select an option

  • Save pietgeursen/cbc576af12b066d3692f501bb0e94c12 to your computer and use it in GitHub Desktop.

Select an option

Save pietgeursen/cbc576af12b066d3692f501bb0e94c12 to your computer and use it in GitHub Desktop.

Connect

Start gdb server

JLinkGDBServer -device NRF51 -if SWD

Start gdb

arm-none-eabi-gdb <build-dir>/*.out 

Connect and reset

target remote localhost:2331 // connects to server
mon reset 0 // reset target

Reset

mon reset 0

Debug

Set a breakpooint:

break main.c:25

Run to breakpoint c

List locals in scope info locals

List all variables in scope info variables

List args info args

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment