217 words
1 minutes
MCU Auto Fan-Out Tool

CubeMX + KiCAD#

This script automatically fans out MCUs in KiCAD according to the pin-out files exported from STM32 CubeMX, based on API provided by Static Badge

  1. Start with a CubeMX project. Other software will be supported in future. Do Pinout->Export pinout without Alt. Functions

  1. Get your KiCAD schematic ready.

  2. Run MCUFanout.py, enter paths to schematic file (*.kicad_sch) and the pinout file exported from CubeMX.

    Fanout Length: The length of fan-out wire, 1 unit = 50 mils (the recommended grid length of KiCAD).

    Component Key: Reference means finding the MCU component by its reference (designator), regex is supported; Value Prefix means finding by the prefix of value of components. e.g. when designating Value Prefix = STM32 the script will fan out all components with values begin with ‘STM32’, like ‘STM32F103…’ or ‘STM32H750…’.

    Enable Global/Local Label: Whether a global/local label showing the functions of pins should be created.

    With the configuration in below, the script will fan out 1000-mils-long wires with both global & local labels from component U1, according to pinout.csv.

  1. Press Run, then re-open the schematic in KiCAD.

CubeMX + Altium Designer#

This script automatically fans out MCUs in Altium Designer according to the pin-out file exported from STM32 CubeMX.

  1. Starting from a CubeMX project, do Pinout->Export pinout without Alt. Functions

  1. Load EETools.PrjScr to your workspace.

  1. Run MCUFanout.pas, fill in pinout file path, fanout length and MCU type, click Run.

  1. Finished.

MCU Auto Fan-Out Tool
http://tsaoo.github.io/resrvplot/posts/cad/mcu-auto-fanout/
Author
Zhiyang Cao
Published at
2025-04-17
License
CC BY-NC-SA 4.0