Shared KiCad 10 symbol / footprint library
  • Python 93.6%
  • Nix 6.4%
Find a file
sid cc97d59a59
All checks were successful
Build parts database / build-parts-db (push) Successful in 3s
add stm32g474ret6
2026-10-26 09:59:31 +01:00
.forgejo/workflows add stm32g474ret6 2026-10-26 09:59:31 +01:00
3dmodels add stm32g474ret6 2026-10-26 09:59:31 +01:00
footprints/Team.pretty add stm32g474ret6 2026-10-26 09:59:31 +01:00
symbols add stm32g474ret6 2026-10-26 09:59:31 +01:00
tests add stm32g474ret6 2026-10-26 09:59:31 +01:00
.envrc add stm32g474ret6 2026-10-26 09:59:31 +01:00
.gitignore add stm32g474ret6 2026-10-26 09:59:31 +01:00
build_parts_db.py add stm32g474ret6 2026-10-26 09:59:31 +01:00
flake.lock add stm32g474ret6 2026-10-26 09:59:31 +01:00
flake.nix add stm32g474ret6 2026-10-26 09:59:31 +01:00
fp-lib-table add stm32g474ret6 2026-10-26 09:59:31 +01:00
parts.kicad_dbl add stm32g474ret6 2026-10-26 09:59:31 +01:00
parts.yaml add stm32g474ret6 2026-10-26 09:59:31 +01:00
README.md add stm32g474ret6 2026-10-26 09:59:31 +01:00
requirements.txt add stm32g474ret6 2026-10-26 09:59:31 +01:00
sym-lib-table add stm32g474ret6 2026-10-26 09:59:31 +01:00

kicad-libs

Shared KiCad 10 symbol / footprint library.

The catalogue is a KiCad database library. parts.yaml in this repo is the source of truth. build_parts_db.py validates it against the symbol, footprint and 3D-model files and generates build/parts.sqlite. KiCad reads that database through parts.kicad_dbl, registered in the shared sym-lib-table. CI builds the database and attaches it to a release, but every user can also build it locally.

Building the parts database

nix run .

-> build/parts.sqlite

Pip

With Python 3.11+:

python3 -m pip install -r requirements.txt
python3 build_parts_db.py

-> build/parts.sqlite

One-time setup for each user

KiCad 10 is required.

  1. Clone the repo to a fixed path (e.g. C:\kicad-libs / ~/kicad-libs):

    git clone https://git.sid.ovh/sid/kicad-libs.git ~/kicad-libs
    
  2. Define a path variable so all paths resolve the same on every machine:

    • Preferences -> Configure Paths... -> add KICAD_LIBS = the clone path.
  3. Register the shared symbol table:

    • Preferences -> Manage Symbol Libraries... -> Add empty row to table
    • Library Path: ${KICAD_LIBS}/sym-lib-table
    • Open Library Table to verify
  4. Register the shared footprint table:

    • Preferences -> Manage Footprint Libraries... -> Add empty row to table
    • Library Path: ${KICAD_LIBS}/fp-lib-table
    • Open Library Table to verify

Adding / updating a part

  1. Add or edit the symbol under symbols/, its footprint under footprints/, and its 3D model under 3dmodels/ (referenced from the footprint).
  2. Add a part entry to parts.yaml with the symbol LIB_ID, one or more footprints, and one or more MPNs.
  3. Run python3 build_parts_db.py to validate and rebuild locally.
  4. Push to a branch, open a merge request, and merge into master.
  5. Everyone else pulls and re-runs the builder (or downloads the parts database from the release page).

MPN variants

One symbol can serve many MPNs and several footprints. parts.yaml groups them:

version: 1
parts:
  - id: STM32G474RET6
    symbol: Team_MCUs:STM32G474RET6
    value: STM32G474RET6
    description: ARM Cortex-M4 MCU, 512KB flash, 128KB SRAM, 170MHz, LQFP-64
    datasheet: https://www.st.com/resource/en/datasheet/stm32g474cb.pdf
    keywords: STM32G474RET6 STM32G4 Cortex-M4 MCU LQFP-64
    footprints:
      - footprint: Team:QFP50P1200X1200X160-64N
        package: LQFP-64
        mpns:
          - mpn: STM32G474RET6
            manufacturer: STMicroelectronics

Each MPN belongs to the footprint for its exact package. Do not share a footprint between different pin counts (such as a 64-pin and a 100-pin MCU).

The builder emits one database row per MPN.