Black Magic Probe (and Zubax BugFace BF1)
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).
Zubax BugFace BF1
The Zubax BugFace BF1 (formerly known as "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.
INFO
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
INFO
To debug STM32F7 or later (FMUv5 and newer) the Zubax BugFace BF1 / Blackmagic probe likely requires a firmware update. You can find how to update the blackmagic probe here.
To use a Zubax BugFace BF1 with GDB, start GDB with the exact ELF file that is currently flashed on the autopilot:
sh
arm-none-eabi-gdb build/px4_fmu-v5_default/px4_fmu-v5_default.elf
Then, you have to select the Zubax BugFace BF1 interface, on Linux this is e.g.:
sh
target ext /dev/serial/by-id/usb-Black_Sphere_Technologies_Black_Magic_Probe_f9414d5_7DB85DAC-if00
그런 다음 대상을 스캔합니다.
sh
monitor swdp_scan
다음과 같은 내용이 표시되어야 합니다.
sh
Target voltage: 3.3V
Available Targets:
No. Att Driver
1 STM32F76x M7
일부 자동조종장치는 0.0V를 표시하지만, 후속 단계는 그럼에도 불구하고 작동합니다.
이제 해당 대상에 연결할 수 있습니다.
sh
attach 1
이제 연결되어야 합니다.