From 52401b170d8f1c9deaa153acca76e7d6060a06df Mon Sep 17 00:00:00 2001 From: Trygve Laugstøl Date: Mon, 25 Mar 2019 15:46:08 +0100 Subject: 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. --- demo/thirdparty/unlockoslo-alpha-3/.ee/config | 4 ++ demo/thirdparty/unlockoslo-alpha-3/build.ninja | 70 ++++++++++++++++++++++++++ 2 files changed, 74 insertions(+) create mode 100644 demo/thirdparty/unlockoslo-alpha-3/.ee/config create mode 100644 demo/thirdparty/unlockoslo-alpha-3/build.ninja (limited to 'demo/thirdparty') 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 -- cgit v1.2.3