| name | embedded-firmware-debugging |
| description | Debug embedded C, C++, or Rust firmware, RTOS tasks, drivers, DMA, interrupts, peripherals, and board bring-up. Use when tracking timing bugs, register misconfiguration, boot failures, memory corruption, peripheral deadlocks, or hardware-software integration issues on MCUs, SoCs, and edge devices. |
Embedded Firmware Debugging
Use this skill when the boundary between firmware and hardware is the actual bug.
Core Workflow
- Reproduce with the exact board, clock tree, power path, firmware revision, and toolchain.
- Build the boot path or event timeline.
- Check registers, pin mux, clocks, interrupts, DMA, caches, and memory ownership with
references/bringup-checklist.md.
- Reduce to the smallest failing case.
- If
platformio, cmake, cargo, or vendor tools exist, use them; otherwise focus on static review and logs.
- End with one best next probe, not a long list of guesses.
Execution Rules
- Keep ISR work minimal.
- Verify volatile and atomic usage where concurrency exists.
- Treat undefined behavior, stack issues, and memory ownership as first-class suspects.
- Separate electrical uncertainty from firmware uncertainty.
- Prefer timestamped traces and register snapshots over intuition.
Output Contract
Return:
- Reproduction facts.
- Fault tree.
- Suspect list.
- Best next probe.
- Code, config, or instrumentation changes.