explaingit

blackmagic-debug/blackmagic

Analysis updated 2026-07-03

3,713Audience · developerComplexity · 3/5Setup · hard

TLDR

An open-source debugger for ARM Cortex and RISC-V microcontrollers that runs as firmware on a USB probe or as a desktop app, exposes a GDB server, and auto-detects the connected chip with no configuration files required.

Mindmap

mindmap
  root((Black Magic Debug))
    Deployment forms
      Probe firmware USB
      BMDA desktop app
    Supported chips
      ARM Cortex
      RISC-V
    Protocols
      JTAG
      SWD
    Features
      GDB server built-in
      Auto chip detection
      No config files
    Tools
      bmpflash SPI Flash
      Meson build system
Click or tap to explore — scroll the page freely

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Connect a Black Magic Probe to an ARM Cortex microcontroller and use GDB to set breakpoints, inspect registers, and step through code.

USE CASE 2

Use the BMDA desktop app with an existing ST-Link or J-Link probe to get a GDB debug session without buying dedicated hardware.

USE CASE 3

Flash external SPI memory chips on a target board using the companion bmpflash tool.

USE CASE 4

Debug RISC-V embedded projects over JTAG or SWD without writing any configuration files.

What is it built with?

CGDBMesonJTAGSWD

How does it compare?

blackmagic-debug/blackmagic1024-lab/smart-admindongyubin/iptv
Stars3,7133,7133,712
LanguageJava
Setup difficultyhardhardeasy
Complexity3/54/51/5
Audiencedeveloperdevelopergeneral

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · hard Time to first run · 1h+

Building the firmware requires an ARM cross-compilation toolchain and Meson, physical probe hardware is needed to debug real microcontrollers.

In plain English

Black Magic Debug is an open-source debugger for microcontrollers, specifically targeting ARM Cortex and RISC-V processors. Microcontrollers are small chips found in embedded devices like circuit boards, sensors, and custom hardware, and debugging them requires specialized tools to inspect what the chip is doing while it runs. The project works in two forms. The first is firmware that runs on a small hardware device called the Black Magic Probe, a USB dongle that physically connects to your microcontroller and bridges between your development computer and the chip being debugged. The second is the Black Magic Debug App (BMDA), a program that runs on your computer and communicates with a variety of existing debug probe hardware, including ST-Link, J-Link, and CMSIS-DAP compatible probes. Both forms expose a GDB server, where GDB is the standard command-line debugger used with C and C++ code. A notable feature is that the tool requires no configuration files and auto-detects the connected target chip. When you connect your probe and ask it to scan, it identifies which chip is attached and configures itself accordingly. This is designed to reduce the setup time that often frustrates developers working with embedded hardware. The project supports debugging over both JTAG and SWD, which are the two standard physical protocols used to communicate with microcontroller debug interfaces. A companion tool called bmpflash handles programming of external SPI Flash memory chips. Building the firmware requires a cross-compilation toolchain for ARM, and the project uses the Meson build system. The BMDA application builds with standard system compilers and dependencies. Both paths are documented in detail in the README, including OS-specific notes for Linux, macOS, and BSD systems.

Copy-paste prompts

Prompt 1
Walk me through using GDB with the Black Magic Probe to set a breakpoint in my STM32 firmware and inspect local variables at that point.
Prompt 2
How do I build and run the Black Magic Debug App (BMDA) on Linux so I can connect it to my existing ST-Link probe?
Prompt 3
Show me the GDB commands to connect to a target chip via the Black Magic Probe GDB server and flash new firmware onto it.
Prompt 4
How do I use bmpflash to program an external SPI Flash chip attached to my embedded board through the Black Magic Probe?
Prompt 5
What Meson build commands do I run to compile the Black Magic Probe firmware for a specific ARM Cortex-M target?

Frequently asked questions

What is blackmagic?

An open-source debugger for ARM Cortex and RISC-V microcontrollers that runs as firmware on a USB probe or as a desktop app, exposes a GDB server, and auto-detects the connected chip with no configuration files required.

How hard is blackmagic to set up?

Setup difficulty is rated hard, with roughly 1h+ to a first successful run.

Who is blackmagic for?

Mainly developer.

Open on GitHub → Explain another repo

This repo across BitVibe Labs

Scan in gitsafehub Deploy in gitdeployhub blackmagic-debug on gitmyhub

Verify against the repo before relying on details.