Skip to content

Getting Started

Gareth McMullin edited this page Aug 3, 2014 · 19 revisions

To use the Black Magic Probe, you will need an ARM cross toolchain for developing and debugging Cortex-M3 applications on your computer. The gcc-arm-embedded toolchain is recommended.

When connected via USB, the Black Magic probe will enumerate as a CDC-ACM device which the OS should present as a tty device or serial port. The GDB remote debugging protocol is implemented over this virtual character stream. To connect your ARM GDB to the target device use the following commands:

(gdb) target extended-remote /dev/ttyACM0
(gdb) mon jtag_scan
(gdb) attach 1

The command mon swdp_scan may be used to use the Serial-Wire Debug Protocol instead of JTAG to connect to the target.

Once attached, all the standard GDB commands may be used to start and control the execution of the embedded application. Useful GDB Commands provides a quick introduction.

Note: On Mac OS X use the /dev/cu.usbmodem<somenumber>. Don't use the tty version of this device as this one will freeze gdb when it tries to open it.

A Windows driver is available here. After installing the driver, the device should appear in the device manager as a serial port (COMx). Use this instead of /dev/ttyACM0 on Windows.

NOTICE: The content of this wiki has been moved to http://black-magic.org website. Please update your links.

Clone this wiki locally