create_pinout_schematic
Generate a KiCad schematic from a firmware pinout by mapping pin names to net names. Automatically adds wires, net labels, power symbols, and writes the .kicad_sch file without launching KiCad.
Instructions
Create a .kicad_sch from a firmware pinout by importing a symbol from a KiCad library.
assignments maps pin names or numbers to net names, e.g. {"IO4": "LED_STATUS", "GPIO_8": "SPI_MOSI"}.
Matching ignores case, underscores and hyphens, so IO4/GPIO_4/io4 all work.
Assigned pins get a wire and a net label; power pins get power symbols and PWR_FLAG automatically.
The file is written directly and does not need KiCad running.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| title | No | ||
| output | Yes | ||
| footprint | No | ||
| reference | No | U1 | |
| mcu_lib_id | Yes | ||
| assignments | Yes | ||
| project_dir | No | ||
| connect_power | No |