summaryrefslogtreecommitdiff
path: root/bbxm
diff options
context:
space:
mode:
authorWerner Almesberger <werner@almesberger.net>2016-10-26 01:19:03 (GMT)
committerWerner Almesberger <werner@almesberger.net>2016-10-26 01:19:03 (GMT)
commit19c2736a9912bae5bf598def7397d1b1419bf1ef (patch)
tree907a70382e77cba9966e26f215e5aba19d3ad2da /bbxm
parent1709004c2257ff06a70bd659757be0f9c2c41e72 (diff)
downloadmisc-19c2736a9912bae5bf598def7397d1b1419bf1ef.zip
misc-19c2736a9912bae5bf598def7397d1b1419bf1ef.tar.gz
misc-19c2736a9912bae5bf598def7397d1b1419bf1ef.tar.bz2
bbxm/: process to prepare and visualize BB-xM gerbers (WIP)
Diffstat (limited to 'bbxm')
-rw-r--r--bbxm/Makefile34
-rwxr-xr-xbbxm/fixdrl2
2 files changed, 36 insertions, 0 deletions
diff --git a/bbxm/Makefile b/bbxm/Makefile
new file mode 100644
index 0000000..450c28f
--- /dev/null
+++ b/bbxm/Makefile
@@ -0,0 +1,34 @@
+D = BB-xM_REV_C
+
+BB_ALL = BB-xM_REV_C-2011-05-23.zip
+BB_URL = https://beagleboard.org/static/$(BB_ALL)
+BB_GERB = BEAGLE-xM_Gerber.zip
+
+GERB = ctctslk ctclyr1 ctclyr6 ctcbslk
+DRL = 1-2 1-3 1-6
+
+.PHONY: all view clean spotless
+
+all: view
+
+$(BB_ALL):
+ wget $(BB_URL) || { rm -f $(BB_ALL); exit 1; }
+
+$(D)/$(BB_GERB): $(BB_ALL)
+ mkdir -p $(D)
+ unzip -j -DD -d $(D) $(BB_ALL) || { rm -r $(D); exit 1; }
+
+$(DRL:%=$(D)/ncdrill-%.drl) $(GERB:%=$(D)/%.063): $(D)/$(BB_GERB)
+ unzip -DD -d $(D) $^ || { rm -r $(D); exit 1; }
+
+$(D)/ncdrl%: $(D)/ncdrill%
+ ./fixdrl $< >$@ || { rm -f $@; exit 1; }
+
+view: $(GERB:%=$(D)/%.063) $(DRL:%=$(D)/ncdrl-%.drl)
+ gerbview $(^:%=`pwd`/%)
+
+clean:
+ rm -rf $(D)
+
+spotless: clean
+ rm -f $(BB_ALL)
diff --git a/bbxm/fixdrl b/bbxm/fixdrl
new file mode 100755
index 0000000..6bac326
--- /dev/null
+++ b/bbxm/fixdrl
@@ -0,0 +1,2 @@
+#!/bin/sh
+cat "$@"