Black Magic/DroneCode Probe
The Black Magic Probe is an easy to use, mostly plug-and-play, JTAG/SWD debugger for embedded microcontrollers. Since the Black Magic Probe is a generic debug probe, you will need an adapter to connect to Pixhawk flight controllers, which can be purchased here:
Drone Code Debug Adapter (1 BIT SQUARED).
Dronecode Probe
The Dronecode Probe is a specialization of the Black Magic Probe for debugging PX4 autopilots.
The probe's USB interface exposes two separate virtual serial port interfaces: one for connecting to the System Console (UART) and the other for an embedded GDB server (SWD interface).
The probe provides a DCD-M connector cable for attaching to the Pixhawk Debug Mini.
:::note The 6-pos DF13 connector that comes with the probe cannot be used for SWD debugging (it is for using the System Console). :::
Using the Probe
:::note To debug STM32F7 or later (FMUv5 and newer) the Dronecode probe / Blackmagic probe likely requires a firmware update. You can find how to update the blackmagic probe here. :::
To use a Dronecode probe with GDB, start GDB with the exact ELF file that is currently flashed on the autopilot:
Then, you have to select the Dronecode probe interface, on Linux this is e.g.:
Then you scan for the target:
And you should see something like:
Note that for some autopilots it shows 0.0V but the subsequent steps work nevertheless.
You can now attach to that target:
And now you should be connected.
Last updated