Kaynağa Gözat

add scripts

Thomas Buck 11 ay önce
ebeveyn
işleme
8913ca6cad

+ 3
- 0
hardware/.gitignore Dosyayı Görüntüle

@@ -4,3 +4,6 @@ fp-info-cache
4 4
 \#auto_saved_files\#
5 5
 extern/*.bak
6 6
 replicate_layout.log
7
+fabrication
8
+plot
9
+fab.zip

+ 3
- 1
hardware/README.md Dosyayı Görüntüle

@@ -12,6 +12,8 @@ To get the 3D models to have the correct offsets I used [this forked version](ht
12 12
 
13 13
 In the future this may no longer be needed.
14 14
 
15
+Gerber files and PDF and SVG plots can be generated using the included `generate_fab.sh` and `generate_plot.sh` scripts.
16
+
15 17
 ## External Libs
16 18
 
17
-Uses SSD1306 lib from [KiCAD Rookie](https://kicadrookie.blogspot.com/2022/06/ssd1306-i2c-096in-oled-display-kicad_86.html).
19
+Uses SSD1306 footprint from [KiCAD Rookie](https://kicadrookie.blogspot.com/2022/06/ssd1306-i2c-096in-oled-display-kicad_86.html).

+ 25
- 0
hardware/generate_fab.sh Dosyayı Görüntüle

@@ -0,0 +1,25 @@
1
+#!/bin/bash
2
+
3
+cd "$(dirname "$0")"
4
+
5
+INFILE="dispensy.kicad_pcb"
6
+OUTDIR="fabrication"
7
+OUTZIP="fab"
8
+
9
+echo "Creating output directory"
10
+rm -rf $OUTDIR
11
+mkdir -p $OUTDIR
12
+
13
+echo "Exporting drill files"
14
+#kicad-cli pcb export drill -o $OUTDIR/ --format excellon --generate-map --map-format pdf $INFILE
15
+kicad-cli pcb export drill -o $OUTDIR/ --format gerber --generate-map --map-format gerberx2 $INFILE
16
+
17
+echo "Exporting gerber files"
18
+#kicad-cli pcb export gerbers -o $OUTDIR/ $INFILE
19
+kicad-cli pcb export gerbers -o $OUTDIR/ -l F.Cu,B.Cu,F.Mask,B.Mask,F.Paste,B.Paste,F.Silkscreen,B.Silkscreen,Edge.Cuts $INFILE
20
+
21
+# TODO BOM for JLCPCB assembly service
22
+
23
+echo "Compressing archive"
24
+rm -rf $OUTZIP.zip
25
+zip -r $OUTZIP fabrication

+ 27
- 0
hardware/generate_plot.sh Dosyayı Görüntüle

@@ -0,0 +1,27 @@
1
+#!/bin/bash
2
+
3
+cd "$(dirname "$0")"
4
+
5
+OUTDIR="plot"
6
+LAYER="F.Cu,B.Cu,F.Mask,B.Mask,F.Paste,B.Paste,F.Silkscreen,B.Silkscreen,Edge.Cuts,User.Drawings,F.Fab,B.Fab"
7
+
8
+rm -rf $OUTDIR
9
+mkdir -p $OUTDIR
10
+
11
+for VAR in pdf svg
12
+do
13
+    echo "Exporting schematic $VAR"
14
+    rm -rf dispensy_sch.$VAR
15
+    kicad-cli sch export $VAR \
16
+        -t "KiCad Default" \
17
+        -o $OUTDIR/dispensy_sch.$VAR \
18
+        dispensy.kicad_sch
19
+
20
+    echo "Exporting board $VAR"
21
+    rm -rf dispensy_pcb.$VAR
22
+    kicad-cli pcb export $VAR \
23
+        -t "KiCad Classic"  \
24
+        -l $LAYER \
25
+        -o $OUTDIR/dispensy_pcb.$VAR \
26
+        dispensy.kicad_pcb
27
+done

Loading…
İptal
Kaydet