Open source debugging

Contrary to another popular debugging tool Black Magic Probe is completely open source; the schematics and the source code for it can be found on GitHub.
To try out the BMP I used a 1Bitsy open-source debuggable ARM development board. Since this board is made by the same people who make the Black Magic Probe things should work smoothly.

The 1Bitsy board — version 1.0d in my case — is a pretty simple board as it is nothing more than a microcontroller — a powerful STM32F415RG —, a USB interface, a voltage regulator, and, of course, a JTAG connector. This is the same tiny 2x5-way header as sits on the BMP and a cable for it is included with the BMP. Note that a small adapter board for this kind of connector is included too so you can easily create a suitable adapter for your hardware.

 
black magic probe v2.1 kit contents
Black Magic Probe v2.1 kit contents.

Just connect it

Installing the Black Magic Probe on a computer is easy, just connect it. I tried Windows 10 and Ubuntu and it worked immediately in both cases. The device shows up as two serial ports: one for the debugger and the other a complementary USB-to-serial converter. A cable to use this serial port is included with the BMP.

To get started with debugging requires an ARM toolchain compatible or — even better — including GDB (most probably do). The recommended toolchain is gcc-arm-embedded, available for Linux macOS and Windows. I started out on Windows but I ran into compilation problems of the example programs for the 1Bitsy board unrelated to Black Magic Probe, and so I switched to Ubuntu. On this platform everything compiled fine, providing me with plenty of executables for my board to debug.

GNU Debugger (GDB) required

To connect to the BMP you first start GDB (arm-none-eabi-gdb), and from then on you type the commands in the GDB terminal. On Windows this worked fine in a normal command line (CMD) window (make sure the ARM toolchain is in the system path, use the batch file ‘bin\gccvar.bat’ if necessary); on Ubuntu I had to “sudo” the GDB start command in order to get permission to access the BMP.