- Useful GDB Commands
- GDB/Flash Automation
- TRACESWO support
- Using PlatformIO
- Target specific usage
Clone this wiki locally
The Black Magic Probe is a modern, in-application debugging tool for embedded microprocessors. It allows you see what is going on 'inside' an application running on an embedded microprocessor while it executes. It is able to control and examine the state of the target microprocessor using a JTAG or Serial Wire Debugging (SWD) port and on-chip debug logic provided by the microprocessor. The probe connects to a host computer using a standard USB interface. The user is able to control exactly what happens using the GNU source level debugging software, GDB.
- Targets ARM Cortex-M and Cortex-A based microcontrollers.
- Connects to the target processor using the JTAG or Serial Wire Debug (SWD) interface.
- Provides full debugging functionality, including: watchpoints, flash memory breakpoints, memory and register examination, flash memory programming, etc.
- Semihosting / Host IO support as well as Serial Wire Debug TRACESWO support.
- Interface to the host computer is a standard USB CDC ACM device (virtual serial port), which does not require special drivers on Linux or OS X.
- Implements the GDB extended remote debugging protocol for seamless integration with the GNU debugger and other GNU development tools.
- Implements USB DFU class for easy firmware upgrade as updates become available.
- Works with Windows, Linux and Mac environments.
- Load your application into the target Flash memory or RAM.
- Single step through your program.
- Run your program in real-time and halt on demand.
- Examine and modify CPU registers and memory.
- Obtain a call stack backtrace.
- Set up to 6 hardware assisted breakpoints.
- Set up to 4 hardware assisted read, write or access watchpoints.
- Set unlimited software breakpoints when executing your application from RAM.
The Black Magic Probe firmware supports a large selection of host hardware. You can find an in depth description of supported Debugger-Hardware on its own wiki page. There is also "native" hardware which you can buy from a few vendors, and it was specifically designed with Black Magic Probe in mind.
The official Black Magic Probe hardware is available from these distributors in alphabetical order:
- DE: 1BitSquared Germany Black Magic Probe V2.1 (Newest)
- NZ / AU: Greenstage Black Magic Probe V1.0
- USA: 1BitSquared US Black Magic Probe V2.1 (Newest)
- USA: Adafruit Industries Black Magic Probe with JTAG Cable and Serial Cable - V2.1 (Newest)
- USA: Hackerwarehouse Black Magic Probe V2.1 (Newest)
By buying the official hardware you are supporting the continued development of the Black Magic Probe software. Thank you! :)
Stlinkv21 and V3 based boards with a PC-hosted variant of the BMP (PROBE_HOST=pc-stlinkv2)
Libftdi based based boards boards with a PC-Hosted variant of the BMP (PROBE_HOST=libftdi)
StlinkV2 based boards with BMP stlink firmware (PROBE_HOST=stlink) with BMP own bootloader flashed to the board.
STM8S Discovery (StlinkV1) and Bluepill board with BMP swlink firmware (PROBE_HOST=swlink)
F4 Discovery (STM32F407) with BMP f4discovery firmware (PROBE_HOST=f4discovery)
launchpad-icdi with BMP launchpad-icdi firmware (PROBE_HOST=launchpad-icdi)
BMP firmware dongles, FTDI adapters, CMSIS-DAP, Jlink(slow) and StlinkV2/3 (only STM devices) with blackmagic_hosted (make PROBE_HOST=hosted). Run and develop anything beside the basic JTAG/SWD communication on the PC with debug output and debugging BMP itself on the PC. Command line interaction e.g for flashing ("blackmagic <file.bin>") is provided beside starting the gdb server on the PC ("blackmagic"). For windows you can also compile hosted w/o the need for libusb by restricting it to firmware probes only (make PROBE_HOST=hosted HOSTED_BMP_ONLY=1)
- If you have questions or suggestions feel free to join us in our chat
- There is also a mailinglist