This is an old revision of the document!
KiCAD 7.x for Team Configuration
Using Git Server with KiCAD
- Each functional PCB is a repository and each revision is a folder
.gitignore file
# Blacklist everything * # Whitelist all directories !*/ # Project files !*.kicad_pro # Schematic files !*.kicad_sch # PCB files !*.kicad_pcb # Sym lib table !sym-lib-table # Footprint lib table !fp-lib-table # Custom rules !*.kicad_dru # Schematic change list !SCH_Changelist.csv # PCB change list !PCB_Changelist.csv # Readme file !README.md # Ignor file !.gitignore
Python Scripting
Library Database Setup
Objectives
- Everyone uses the same library (symbol, footprint, 3D model)
- Only admins and librarians are allowed to create or modify library
- When a part is updated in the library, everyone gets the latest version automatically
- Fully specified parts (atomic)
- No duplications of symbols
- Automatic BOM generation without manual adjustment
- Extensible structure for new field to be added in the future
Folder Structure
- symbols - Holds generic schematic symbols in “.kicad_sym” files. Each file represents a category of parts. E.g. passives, ICs, diodes, magnetics, connectors, …
- footprints - Holds “.pretty” folders that hold footprint files (.kicad_mod files). Each “.pretty” folder represents a category of parts.
- 3dmodels - Holds “.3dshapes” folders than hold 3d model files (.step and .wrl files). Each “.3dshapes” folder represents a category of parts.
The folders shall resides on a centralized network server that is read only to most users.
MariaDB Database Structure
- create “kicad” database with utf8_general_ci collation
- create table “resistors” with columns (VARCHAR type) “epn” (key), “symbol”, “value”, “pkg”, “footprint”, “datasheet”, “mfg”, “mpn”, “descr”, “status”
- “status” can be “production”, “development”, “obsolete”, “restricted”
- “mfg” is manufacturer name
- “epn” is a unique internal part number. it is the database key
- “descr” is description
ODBC Connection
https://help.interfaceware.com/v6/connect-to-postgresql-from-windows-with-odbc
kicad_dbl file
{
"meta": {
"version": 0
},
"name": "EE Components",
"description": "EE Components",
"source": {
"type": "odbc",
"dsn": "KiCad_DB",
"username": "",
"password": "",
"timeout_seconds": 2,
"connection_string": ""
},
"libraries": [
{
"name": "Resistors",
"table": "Resistors",
"key": "EPN",
"symbols": "Symbol",
"footprints": "Footprint",
"fields": [
{
"column": "MPN",
"name": "MPN",
"visible_on_add": false,
"visible_in_chooser": true,
"show_name": false
},
{
"column": "Value",
"name": "Value",
"visible_on_add": true,
"visible_in_chooser": true,
"show_name": false
},
{
"column": "Pkg",
"name": "Pkg",
"visible_on_add": false,
"visible_in_chooser": true,
"show_name": false
},
{
"column": "MFG",
"name": "MFG",
"visible_on_add": false,
"visible_in_chooser": true,
"show_name": false
},
{
"column": "Status",
"name": "Status",
"visible_on_add": false,
"visible_in_chooser": true,
"show_name": false
}
],
"properties": {
"description": "Descr"
}
},
{
"name": "Diodes",
"table": "Diodes",
"key": "EPN",
"symbols": "Symbol",
"footprints": "Footprint",
"fields": [
{
"column": "MPN",
"name": "MPN",
"visible_on_add": false,
"visible_in_chooser": true,
"show_name": false
},
{
"column": "Value",
"name": "Value",
"visible_on_add": false,
"visible_in_chooser": true,
"show_name": false
},
{
"column": "Pkg",
"name": "Pkg",
"visible_on_add": false,
"visible_in_chooser": true,
"show_name": false
},
{
"column": "MFG",
"name": "MFG",
"visible_on_add": false,
"visible_in_chooser": true,
"show_name": false
},
{
"column": "Status",
"name": "Status",
"visible_on_add": false,
"visible_in_chooser": true,
"show_name": false
}
],
"properties": {
"description": "Descr"
}
},
{
"name": "Capacitors",
"table": "Capacitors",
"key": "EPN",
"symbols": "Symbol",
"footprints": "Footprint",
"fields": [
{
"column": "MPN",
"name": "MPN",
"visible_on_add": false,
"visible_in_chooser": true,
"show_name": false
},
{
"column": "Value",
"name": "Value",
"visible_on_add": true,
"visible_in_chooser": true,
"show_name": false
},
{
"column": "Pkg",
"name": "Pkg",
"visible_on_add": false,
"visible_in_chooser": true,
"show_name": false
},
{
"column": "MFG",
"name": "MFG",
"visible_on_add": false,
"visible_in_chooser": true,
"show_name": false
},
{
"column": "Status",
"name": "Status",
"visible_on_add": false,
"visible_in_chooser": true,
"show_name": false
}
],
"properties": {
"description": "Descr"
}
}
]
}
References
Useful Git Options
.gitignore
# Blacklist everything * # Whitelist all directories !*/ # Whitelist the file you're interested in. !*.cocci
git clone -b mybranch --single-branch git://sub.domain.com/repo.git
How to git clone only a specific file or directory
Git does not directly support cloning only a specific file or directory from a repository. However, you can use –depth 1 to clone only one specific revision (as opposed to the entire history) and use –no-checkout followed by git sparse-checkout set to checkout not the entire file tree but only a specific file.