153 lines
6.8 KiB
Markdown
153 lines
6.8 KiB
Markdown
# KiCad Library Configuration
|
|
|
|
Diese Dateien helfen beim Setup der Custom Library in KiCad.
|
|
|
|
## Symbol Libraries (sym-lib-table)
|
|
|
|
Fügen Sie diese Zeilen zu Ihrer `sym-lib-table` hinzu:
|
|
|
|
```
|
|
(lib (name "Custom_Amplifiers")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/symbols/Amplifiers_Custom.kicad_sym")(options "")(descr "Custom Amplifiers"))
|
|
(lib (name "Custom_Communication")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/symbols/Communication_Custom.kicad_sym")(options "")(descr "Custom Communication ICs"))
|
|
(lib (name "Custom_Connectors")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/symbols/Connectors_Custom.kicad_sym")(options "")(descr "Custom Connectors"))
|
|
(lib (name "Custom_Display")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/symbols/Display_Custom.kicad_sym")(options "")(descr "Custom Display Components"))
|
|
(lib (name "Custom_Logic")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/symbols/Logic_Custom.kicad_sym")(options "")(descr "Custom Logic ICs"))
|
|
(lib (name "Custom_MCU")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/symbols/MCU_Custom.kicad_sym")(options "")(descr "Custom Microcontrollers"))
|
|
(lib (name "Custom_Memory")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/symbols/Memory_Custom.kicad_sym")(options "")(descr "Custom Memory Components"))
|
|
(lib (name "Custom_Power")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/symbols/Power_Custom.kicad_sym")(options "")(descr "Custom Power Management"))
|
|
(lib (name "Custom_RF")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/symbols/RF_Custom.kicad_sym")(options "")(descr "Custom RF Components"))
|
|
(lib (name "Custom_Sensors")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/symbols/Sensors_Custom.kicad_sym")(options "")(descr "Custom Sensors"))
|
|
(lib (name "Logos_Artwork")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/symbols/Logos_Artwork.kicad_sym")(options "")(descr "Logos and Artwork"))
|
|
```
|
|
|
|
## Footprint Libraries (fp-lib-table)
|
|
|
|
Fügen Sie diese Zeilen zu Ihrer `fp-lib-table` hinzu:
|
|
|
|
```
|
|
(lib (name "Custom_BGA")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/footprints/BGA_Custom.pretty")(options "")(descr "Custom BGA Packages"))
|
|
(lib (name "Custom_Connectors_Audio")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/footprints/Connectors_Audio.pretty")(options "")(descr "Custom Audio Connectors"))
|
|
(lib (name "Custom_Connectors_Power")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/footprints/Connectors_Power.pretty")(options "")(descr "Custom Power Connectors"))
|
|
(lib (name "Custom_Connectors_USB")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/footprints/Connectors_USB.pretty")(options "")(descr "Custom USB Connectors"))
|
|
(lib (name "Custom_IC")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/footprints/IC_Custom.pretty")(options "")(descr "Custom IC Packages"))
|
|
(lib (name "Custom_Mechanical")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/footprints/Mechanical.pretty")(options "")(descr "Mechanical Components"))
|
|
(lib (name "Custom_Modules")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/footprints/Modules_Custom.pretty")(options "")(descr "Custom Modules"))
|
|
(lib (name "Custom_QFN")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/footprints/QFN_Custom.pretty")(options "")(descr "Custom QFN Packages"))
|
|
(lib (name "Custom_Sensors")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/footprints/Sensors_Custom.pretty")(options "")(descr "Custom Sensor Packages"))
|
|
(lib (name "Custom_TestPoints")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/footprints/TestPoints.pretty")(options "")(descr "Test Points"))
|
|
(lib (name "Logos_Silkscreen")(type "KiCad")(uri "${KIPRJMOD}/kicad_libs/my-kicad-libs/footprints/Logos_Silkscreen.pretty")(options "")(descr "Logos for Silkscreen"))
|
|
```
|
|
|
|
## Setup-Anleitung
|
|
|
|
### 1. Projekt-spezifisch (empfohlen)
|
|
1. Kopieren Sie den gesamten `my-kicad-libs` Ordner in Ihr Projekt-Verzeichnis
|
|
2. Erstellen/bearbeiten Sie `sym-lib-table` im Projektordner
|
|
3. Erstellen/bearbeiten Sie `fp-lib-table` im Projektordner
|
|
4. Relative Pfade verwenden (`${KIPRJMOD}/kicad_libs/my-kicad-libs/...`)
|
|
|
|
### 2. Global (für alle Projekte)
|
|
1. Kopieren Sie `my-kicad-libs` in einen permanenten Ordner
|
|
2. KiCad → Preferences → Manage Symbol Libraries → Global Libraries
|
|
3. KiCad → Preferences → Manage Footprint Libraries → Global Libraries
|
|
4. Absolute Pfade verwenden
|
|
|
|
### 3. Environment Variable (flexibelste Lösung)
|
|
1. Erstellen Sie Environment Variable: `CUSTOM_KICAD_LIBS`
|
|
2. Setzen Sie Pfad zu `my-kicad-libs` Ordner
|
|
3. In Library-Tabellen verwenden: `${CUSTOM_KICAD_LIBS}/symbols/...`
|
|
|
|
## Automatisches Setup Script (Windows PowerShell)
|
|
|
|
```powershell
|
|
# setup_kicad_libs.ps1
|
|
param(
|
|
[string]$ProjectPath = (Get-Location).Path,
|
|
[switch]$Global
|
|
)
|
|
|
|
$libPath = Join-Path $ProjectPath "kicad_libs\my-kicad-libs"
|
|
|
|
if (-not (Test-Path $libPath)) {
|
|
Write-Error "Library path not found: $libPath"
|
|
exit 1
|
|
}
|
|
|
|
# Symbol Library Setup
|
|
$symLibTable = if ($Global) {
|
|
Join-Path $env:APPDATA "kicad\8.0\sym-lib-table"
|
|
} else {
|
|
Join-Path $ProjectPath "sym-lib-table"
|
|
}
|
|
|
|
# Footprint Library Setup
|
|
$fpLibTable = if ($Global) {
|
|
Join-Path $env:APPDATA "kicad\8.0\fp-lib-table"
|
|
} else {
|
|
Join-Path $ProjectPath "fp-lib-table"
|
|
}
|
|
|
|
Write-Host "Setting up KiCad libraries..."
|
|
Write-Host "Symbol table: $symLibTable"
|
|
Write-Host "Footprint table: $fpLibTable"
|
|
|
|
# Hier würde der eigentliche Setup-Code stehen...
|
|
```
|
|
|
|
## Überprüfung der Installation
|
|
|
|
Nach dem Setup sollten Sie folgendes sehen:
|
|
|
|
### Im Symbol-Browser
|
|
- Custom_Amplifiers
|
|
- Custom_Communication
|
|
- Custom_Connectors
|
|
- etc...
|
|
|
|
### Im Footprint-Browser
|
|
- Custom_BGA
|
|
- Custom_Connectors_Audio
|
|
- Custom_Connectors_Power
|
|
- etc...
|
|
|
|
### Test
|
|
1. Erstellen Sie ein neues Schaltplan-Symbol
|
|
2. Schauen Sie, ob die Custom-Libraries in der Liste erscheinen
|
|
3. Erstellen Sie einen neuen Footprint
|
|
4. Prüfen Sie die Verfügbarkeit der Custom-Footprint-Libraries
|
|
|
|
## Troubleshooting
|
|
|
|
### Libraries erscheinen nicht
|
|
- Pfade in `sym-lib-table` und `fp-lib-table` prüfen
|
|
- `${KIPRJMOD}` Variable korrekt?
|
|
- Dateirechte prüfen
|
|
- KiCad neustarten
|
|
|
|
### 3D-Modelle fehlen
|
|
- Pfade in Footprints korrekt?
|
|
- `${KIPRJMOD}` oder absolute Pfade verwenden
|
|
- 3D-Viewer-Cache leeren
|
|
|
|
### Performance-Probleme
|
|
- Große Bibliotheken können KiCad verlangsamen
|
|
- Nur benötigte Libraries aktivieren
|
|
- Projekt-spezifische Tables verwenden
|
|
|
|
## Backup & Versionierung
|
|
|
|
### Git Integration
|
|
```bash
|
|
# .gitignore anpassen
|
|
echo "fp-info-cache" >> .gitignore
|
|
echo "*.kicad_prl" >> .gitignore
|
|
|
|
# Libraries tracken
|
|
git add kicad_libs/
|
|
git commit -m "Add custom KiCad libraries"
|
|
```
|
|
|
|
### Backup-Strategie
|
|
1. Regelmäßige Commits der Library-Änderungen
|
|
2. Tags für stabile Versionen
|
|
3. Separate Branches für experimentelle Features |