Zubax DroneCode Probe is a generic JTAG / SWD + UART console adapter compatible with most ARM Cortex based designs and in particular with hardware maintained by the DroneCode project.
The design is based on Black Magic Probe and is distributed under open source licenses. Additional description of its features can be found at the Black Magic Probe home page: http://www.blacksphere.co.nz/main/blackmagic.
The schematics and PCB sources can be found at the project repository: https://github.com/Zubax/dronecode_probe.
DroneCode Probe will be detected by the host as two virtual serial port devices. The port with the lower number is connected to the GDB server on the debugger. The port with the higher number is connected to the UART interface.
For example, the host may represent the debugger as follows:
COM3(on Windows), or
/dev/ttyACM0(on Linux) - GDB interface. Baud rate and other parameters of a typical serial port are irrelevant for this interface.
COM4(on Windows), or
/dev/ttyACM1(on Linux) - UART interface. This is a typical USB-UART adapter interface.
DroneCode Probe does not require drivers on Linux and Mac, since it uses standard CDC-ACM USB profile.
Windows drivers can be downloaded from the Black Magic Probe home page: http://www.blacksphere.co.nz/main/blackmagic.
This section documents the available debug interfaces and their connectors, except micro-USB since its purpose is evident.
Both connectors DCD-M and DCD-S feature the same pinout, documented in the table below. They expose both SWD and UART interfaces to the target, where UART is typically used to access the debug serial console of the target. DCD stands for DroneCode Debug, and the letters M and S mean medium and small, respectively.
||Target power sense; also can be used to power the target|
||SWD data line|
||SWD clock line|
Connector part numbers are as follows:
|DCD-M||JST||BM06B-SRSS-TB (top entry); or SM06B-SRSS-TB (side entry)||1 mm||http://www.jst-mfg.com/product/pdf/eng/eSH.pdf|
This is the standard ARM Cortex M Debug Connector that can be seen on many other ARM debuggers.
This connector exposes only serial interface. It can be used as a general UART interface, and its pinout is compatible with the debug serial port on Pixhawk v1.
||Optional 5V output to the target directly from USB. Disabled by default; refer to the schematic to see what hardware modifications are required to enable it.|
Also see the Black Magic Probe wiki: https://github.com/blacksphere/blackmagic/wiki.
First, start GDB and pass the path to the ELF as a command line argument. For example:
Then, execute the following in the GDB’s internal command line:
tar ext /dev/ttyACM0 # Or another port mon swdp_scan attach 1 load
GDB Hardware Debugging→
[Debug], then tick only
Legacy GDB Hardware Debugging Launcher, and make sure that the option for GDB (DSF) is disabled.
GDB Hardware Debugging, select New.
arm-none-eabi-gdb(or other if necessary).
Use remote target.
Image offsetis configured correctly.
# 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
Examples below are for the GDB’s internal command line.
(gdb) monitor tpwr enable # Enabling the power (it's always disabled by default) (gdb) monitor tpwr # Requesting the status Target Power: enabled (gdb) monitor tpwr disable # Disabling the power (gdb) monitor tpwr Target Power: disabled
First, clone the firmware source repository from the link provided at the end of this page.
Connect the board to USB while holding the button
BOOT. The red LED on the board should start blinking.
If you’re running Linux, the system will report the device as follows:
$ dmesg usb 2-6.2.3: new full-speed USB device number 12 using ehci-pci usb 2-6.2.3: New USB device found, idVendor=1d50, idProduct=6017 usb 2-6.2.3: New USB device strings: Mfr=1, Product=2, SerialNumber=3 usb 2-6.2.3: Product: Black Magic Probe (Upgrade) usb 2-6.2.3: Manufacturer: Black Sphere Technologies usb 2-6.2.3: SerialNumber: B5DCABF5
Then go to the directory with firmware sources and execute the following script,
src/blackmagic.bin is the path to the firmware image:
sudo scripts/stm32_mem.py src/blackmagic.bin
Disconnect the board afterwards.
Alternative instructions for this step are available from: http://px4.io/dev/jtag/black_magic_probe.