Automating Firmware Generation from Schematics for
Microcontroller based Designs
PLUTO's Power Conditioning and Distribution Unit (PCDU)
- PCDUs similar between satellites
- Custom hardware/firmware
- Snippet based hardware design: design PCDUs from snippets, not individual components
- Problem: firmware development from scratch
→ laborious, hardware/firmware inconsistencies
Example ADC Snippet
- Idea: generate firmware based on data in schematics
- Simple example:
pindefinition.h
- Many details in schematic irrelevant
→ abstract to Group
- Group similar to Snippet but for firmware generation
Example Group Netlist
- Abstraction of entire schematics: what Groups are there, how do they interconnect
- Tool agnostic
- Firmware language agnostic
KiCad Annotations
kicad_firmware_generation
- Idea: a Jinja2 template for each Group Type
- Generate firmware from Group Netlist and Jinja2 templates
- Key advantage: fully deterministic
→ suitable for CI-pipeline
- Successfully integrated into PLUTO's PCDU development
- Found hardware fault in PCDU
Systematic Fault Injection
- Inject faults into PCDU schematics:
swap labels, delete cables
- 8885 unique faults
- Result: detected up to 75% of otherwise not found Group Pin swaps
- Also: benchmark shows generation runtime below 1sec
Synthetic Benchmark
Group Netlist
kicad_firmware_generation