embedded-debug-optimization

Installation
SKILL.md

Embedded Debugging & Resource Optimization

Follow this systematic triage workflow for firmware crashes, watchdog resets, and Flash/RAM/timing optimization.

Workflow

  1. Capture exact failure evidence

    • Obtain the full crash dump, reset reason (esp_reset_reason(), STM32 RCC->CSR flags), register dump (PC, LR, SP, CFSR, HFSR, EXCVADDR), and the exact matching .elf binary built from the same commit.
    • If live hardware is connected, capture logs safely using serial_capture.py (never hang on an interactive monitor).
  2. Decode crash addresses to source lines

    • Run decode_crash.py against the crash log and .elf file:
      python scripts/decode_crash.py --elf path/to/firmware.elf --log crash.txt
      
    • Alternatively pass raw hex addresses via --addrs 0x400d1234 0x08004abc.
    • Consult Fault Triage Reference to classify the root cause (null/unaligned pointer, stack overflow, bus fault, cache-disabled flash access in ISR, watchdog starvation).
Installs
1
First Seen
Today