aboutsummaryrefslogtreecommitdiff
path: root/demo
diff options
context:
space:
mode:
authorTrygve Laugstøl <trygvis@inamo.no>2019-03-25 15:46:08 +0100
committerTrygve Laugstøl <trygvis@inamo.no>2019-03-25 15:46:08 +0100
commit52401b170d8f1c9deaa153acca76e7d6060a06df (patch)
treeffbe1722e5c88ab841fd8661ca085a1b1cdf7842 /demo
parent50ee4b871bc9d0076cabaa5d2ea4ad1ba7b8e15a (diff)
downloadee-python-52401b170d8f1c9deaa153acca76e7d6060a06df.tar.gz
ee-python-52401b170d8f1c9deaa153acca76e7d6060a06df.tar.bz2
ee-python-52401b170d8f1c9deaa153acca76e7d6060a06df.tar.xz
ee-python-52401b170d8f1c9deaa153acca76e7d6060a06df.zip
New command: init. Looks for kicad schematic and pcb files, creates
.ee/config. ninja tool: o Use project's config to check for sch and pcb files. o Use some more conditionals in build.ninja.j2. unlockoslo: Adding demo project.
Diffstat (limited to 'demo')
-rw-r--r--demo/thirdparty/unlockoslo-alpha-3/.ee/config4
-rw-r--r--demo/thirdparty/unlockoslo-alpha-3/build.ninja70
2 files changed, 74 insertions, 0 deletions
diff --git a/demo/thirdparty/unlockoslo-alpha-3/.ee/config b/demo/thirdparty/unlockoslo-alpha-3/.ee/config
new file mode 100644
index 0000000..c7e2990
--- /dev/null
+++ b/demo/thirdparty/unlockoslo-alpha-3/.ee/config
@@ -0,0 +1,4 @@
+[kicad-project]
+sch = ../../../thirdparty/unlockoslo/hardware/alpha-3/alpha.sch
+pcb = ../../../thirdparty/unlockoslo/hardware/alpha-3/alpha.kicad_pcb
+
diff --git a/demo/thirdparty/unlockoslo-alpha-3/build.ninja b/demo/thirdparty/unlockoslo-alpha-3/build.ninja
new file mode 100644
index 0000000..3bf21f6
--- /dev/null
+++ b/demo/thirdparty/unlockoslo-alpha-3/build.ninja
@@ -0,0 +1,70 @@
+ee = ../../../env/bin/python3 -m ee
+report_dir = ee/reports
+sch = ../../../thirdparty/unlockoslo/hardware/alpha-3/alpha.sch
+sch_files = ../../../thirdparty/unlockoslo/hardware/alpha-3/alpha.sch
+pcb = ../../../thirdparty/unlockoslo/hardware/alpha-3/alpha.kicad_pcb
+
+rule kicad-gerber
+ description = kicad-gerber
+ command = $ee kicad-gerber $
+ --output-dir $gerber_dir $
+ --pcb $pcb
+# mkdir -p $(
+# (cd $(GERBER_DIR); zip tmp.zip $(foreach GBR,$(GERBERS),$(notdir $(GBR))))
+# mv $(GERBER_DIR)/tmp.zip $@
+
+rule kicad-make-bom
+ description = kicad-make-bom $out
+ command = $ee kicad-make-bom --sch $sch --out $out $strategy
+
+rule part-create-distributor-search-list
+ description = part-create-distributor-search-list distributor: $distributor
+ command = $ee part-create-distributor-search-list --in $in --out $out
+
+rule digikey-search-parts
+ description = digikey-search-parts
+ command = $ee digikey-search-parts --in $in --out $out
+
+rule digikey-normalize-facts
+ description = digikey-normalize-facts
+ command = $ee digikey-normalize-facts --in $in --out $out
+
+rule element14-search-parts
+ description = element14-search-parts
+ command = $ee element14-search-parts --in $in --out $out
+
+rule element14-normalize-facts
+ description = element14-normalize-facts
+ command = $ee element14-normalize-facts --in $in --out $out
+
+rule create-order
+ description = create-order
+ command = $ee create-order --schematic $schematic --part-db $part_dbs --out $out
+
+rule import-parts-yaml
+ description = import-parts-yaml $in
+ command = $ee import-parts-yaml --in $in --out $out
+
+
+build gerbers: phony prod/gerber.zip
+build prod/gerber.zip: kicad-gerber $pcb
+ gerber_dir = prod
+
+build ee/sch.xml: kicad-make-bom $sch
+ strategy =
+
+# Distributor digikey
+build ee/digikey/search-list.xml: part-create-distributor-search-list ee/sch.xml
+ distributor = digikey
+
+build ee/digikey/downloaded.xml: digikey-search-parts ee/digikey/search-list.xml
+
+build ee/digikey/normalized.xml: digikey-normalize-facts ee/digikey/downloaded.xml
+
+default ee/digikey/normalized.xml
+
+build ee/order.xml | $report_dir/order.rst: create-order ee/sch.xml ee/digikey/normalized.xml
+ schematic = ee/sch.xml
+ part_dbs = ee/digikey/normalized.xml
+
+default ee/order.xml