STM32 Debug AI Assistant
AI-powered debugging assistant for STM32 microcontrollers.
Ask questions about your firmware in natural language — the assistant reads live registers, memory, and source code from your running target and explains what's happening.
Demo
Watch demo video
What you can ask
"Why is USART1 not transmitting?"
→ Reads peripheral registers, checks clock/init code, finds the issue
"Analyze this HardFault"
→ Decodes CFSR/HFSR, inspects stack frame, points to the faulting instruction
"What does TIM1 configuration look like?"
→ Reads registers live and explains each field
"Step through MX_GPIO_Init and show GPIOA state"
→ Sets breakpoints, steps through code, reads registers automatically
Why this is different
Most AI tools only see your source code.
This assistant also reads real hardware state:
- CPU registers (PC, SP, LR, etc.)
- Peripheral registers (via SVD)
- Memory from the running target
- Fault context (CFSR, HFSR, stack frame)
This allows it to analyze actual runtime behavior, not just static code.
Getting Started
- Open Command Palette →
STM32 Debug: Open Panel
- Start your debug session (OpenOCD)
- Send your first message
You'll be prompted for your API key on first use.
Requirements
- OpenOCD + debug probe (ST-Link / J-Link / CMSIS-DAP)
- ELF file with debug symbols (
-g)
- SVD file (auto-download available)
- Anthropic API key
Configuration
Project settings are stored in .stm32-debug.json:
{
"mcuName": "STM32F411RET6",
"svdFile": "STM32F411.svd",
"elfFile": "build/firmware.elf",
"sourceDirectories": ["src", "lib"],
"openocd": { "host": "localhost", "port": 6666 }
}
Telemetry
This extension collects anonymous usage telemetry to understand how the tool is used.
What is collected:
extension_activated — extension version, VS Code version
chat_message_sent — tool call count, duration, success flag
tool_called — tool name, duration, success flag
error_occurred — error category, recoverable flag
What is NOT collected: prompt contents, AI responses, register values, memory contents, file paths, chip part numbers, API keys, error messages, or stack traces.
How to disable:
stm32-debug.telemetry.enabled: false
- Or globally:
telemetry.telemetryLevel: off