Go ahead and plug in the following. This will be necessary for all debugging sessions.
- Micro USB Feather <--> USB Computer
- Segger J-Link USB <--> USB Computer
- Make sure JST 2-pin connector is plugged in
- Make sure J-Link is connected to Adafruit Board and the SWD 2x5 ribbon is connected to the FeatherWing Header Board we have made.
$ sudo /usr/local/bin/JLinkGDBServer \ -device Cortex-M0 -speed auto -if SWD
Launch the J-Link GDB server from the command line.
This is what it looks like when the GDB Server is launched and waiting for a the GDB client to connect.
target remote localhost:2331 monitor device Cortex-M0 monitor speed auto file /var/folders/_t/fsyrnxxs53v59j1l1xkn9k8r0000gp/T/arduino_build_244528/feather-m0.ino.elf load monitor reset
A .gdbinit file in your home directory ~/.gdbinit will greatly improve your quality of life when debugging. It gets around the problem of needing to remember the command sequence, connection ports and file paths to get the debugger going.
$ /usr/local/bin/arm-none-eabi-gdb
The above command will start the gdb client.
and we are off...Now the code is running in full debug mode on our Feather M0 board.