After months of STM32 firmware development with PlatformIO, I got tired of
describing bugs to the AI in plain text. So I built an MCP bridge that connects
Claude Code directly to Cortex-Debug.
What it does:
- Sets/removes breakpoints programmatically
- Reads live variables, ARM registers, and memory in real time
- Injects values directly into variables via GDB while running
- Writes directly to peripheral registers (GPIO, SPI, I2C) without halting firmware
- Works with any ARM Cortex-M board via ST-Link, J-Link, or CMSIS-DAP
Real demo I ran today:
Firmware had a counter firing every 10 cycles (~5 seconds). Asked Claude to force
it to trigger immediately. It paused, injected count=9 via GDB, resumed — LED
toggled instantly.
How it works:
STM32 ──(ST-Link)── Cortex-Debug ──(DAP)── Extension ──(MCP/SSE)── Claude Code
Runs a local MCP server on port 7580. Claude Code connects via SSE and gets
access to 23 debug tools.
Install: search Embedded AI Debug on VS Code Marketplace (publisher: paulopalaoro)
Tested on STM32F4 + PlatformIO. Any Cortex-M should work.