Skip to end of metadata
Go to start of metadata

This guide demonstrates how to debug embedded targets using Dronecode Probe (or Black Magic Probe in general) and the Eclipse IDE.

  1. Open your Eclipse project.
  2. Go Window → Preferences → Run/Debug → Launching → Default Launchers:
    1. Select GDB Hardware Debugging → [Debug], then tick only Legacy GDB Hardware Debugging Launcher, and make sure that the option for GDB (DSF) is disabled.
  3. Go Run → Debug Configurations:
    1. Invoke the context menu for GDB Hardware Debugging, select New.
    2. Tab Debugger:
      1. Set the field GDB Command to arm-none-eabi-gdb (or other if necessary).
      2. Untick Use remote target.
    3. Tab Startup:
      1. If a boot loader is used, make sure that Image offset is configured correctly.
      2. [Optional] Enter the following line in the field Run Commandsrun.
      3. Enter the following in the field Initialization Commands:
# Make sure to select the correct port here
target extended /dev/ttyACM0
# Use jtag_scan instead of swdp_scan if necessary
monitor swdp_scan
attach 1

You should keep in mind that Eclipse IDE is extremely unreliable in general, and especially so when it comes to debugging embedded targets via GDB. Sometimes it may just stop working, in which case you should perform the following steps to revive it:

  1. Power down the target.
  2. Disconnect the debugger from USB.
  3. Shut down Eclipse and double check that all of its processes have terminated (killall eclipse && killall java).
  4. Connect the debugger back and start up Eclipse again.
  5. Power up the target.