The SEGGER J-Link is the recommended tool for debugging baremetal applications created using the Cascoda SDK. The SEGGER J-Link has good integration to gdb, using a ‘GDB Server’ program to bridge the hardware to the gdb tool.
Connecting to J-Link... J-Link is connected. Firmware: J-Link V10 compiled Jun 9 2020 13:38:07 Hardware: V10.10 S/N: xxxxxxxx Feature(s): GDB Checking target voltage... Target voltage: 3.28 V Listening on TCP/IP port 2331 Connecting to target... Connected to target Waiting for GDB connection...
arm-none-eabi-gdb -ex "target remote localhost:2331" bin/mac-dongle
monitor resetcommand to reset the target. Other useful commands:
|load||Download the binary onto device flash|
|monitor reset||Reset and halt the target device|
|c||Continue a halted device|
||Set a breakpoint at the location (can be function name, filename:linenum, and more)|
||Print the value of a symbol (can also use other forms like p/x to print in hexadecimal)|
||Examine the memory values at an address (can also use other forms like x/10xb to print 10 bytes in hex)|
GDB is a very powerful tool, there are many guides on the internet that will provide more detail, including the GDB documentation itself.