embedded-firmware-from-hardware
Installation
SKILL.md
Embedded Firmware From Hardware
Core Rule
Treat the schematic/PCB as the source of truth for pins and nets, and treat vendor libraries as state machines with required setup, service, restart, and IO-bias contracts. Do not replace a vendor peripheral flow with intuition such as "this should be high impedance" unless the working reference, datasheet, or measured behavior supports it.
Workflow
- Extract hardware evidence
- Build a pin map: MCU pin, alternate function, schematic net, series parts, destination component, PCB pad, and uncertainty.
- Trace each user-visible function end-to-end: input electrode/switch -> resistor/filter -> MCU pin -> firmware symbol -> behavior.
- Mark polarity, pull state, power domain, level shifting, reset/default state, and "needs measurement" items.
- For MCU datasheets, app notes, and vendor PDFs, extract text first; if text is sparse or screenshots contain instructions, render pages as images and read the visual content before deciding the implementation. Prefer
scripts/pdf_evidence.pyfor repeatable extraction/rendering. For Chinese filenames on Windows, enumerate PDFs with PythonPath.glob()or use a Python launcher/environment that preserves Unicode paths.