b57dab125f
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
1.9 KiB
1.9 KiB
STM32 Pin Validator
KiCad pcbnew action plugin that validates STM32 MCU pin assignments by comparing three sources:
- PCB layout - pad net names (via pcbnew API)
- Schematic - pin names and labels (parsed from
.kicad_sch) - STM32CubeMX - GPIO signals and labels (parsed from
.ioc)
Results are shown in a colour-coded table so mismatches are easy to spot.
Features
- Colour-coded status: green (match), yellow (review), red (PCB/IOC only), grey (power)
- Filter to show warnings only
- Handles pin remapping and GPIO aliases (e.g. PA9/PA11)
- Traces schematic wires to find connected labels (both local and global)
- Normalises naming conventions (
+/P,-/M, leading/) - Remembers previously used
.iocfile paths
Installation
Manual
Copy the contents of plugins/ into a stm32_pin_validator folder inside your KiCad scripting plugins directory. The plugins directory location depends on your OS and KiCad version — you can find it in KiCad under Preferences > Configure Paths (look for KICAD_USER_PLUGIN_DIR).
KiCad PCM
Search for "STM32 Pin Validator" in KiCad's Plugin and Content Manager.
Usage
- Open your PCB in KiCad pcbnew
- Click the STM32 Pin Validator toolbar button (or find it under Tools > External Plugins)
- Select the MCU footprint and browse to the matching
.iocfile - Review the results table
Status column
| Status | Meaning |
|---|---|
| Match | Schematic label or PCB net matches IOC label/signal |
| Review | Both sides have signals but names differ |
| PCB Only | Pin connected in PCB but not configured in IOC |
| IOC Only | Pin configured in IOC but unconnected in PCB |
| NC | Not connected on either side |
| Power | Power pin (VDD, VSS, etc.) - skipped |
Requirements
- KiCad 9.0 or later
- An STM32CubeMX
.iocfile for the target MCU
License
GPL-3.0-or-later