From f67f7a9a30e433c45da17c0ace32486df877bbdc Mon Sep 17 00:00:00 2001 From: Werner Almesberger Date: Tue, 1 Feb 2011 12:03:01 -0300 Subject: [PATCH] uart/cam/: the usual CAM process for cutting the PCB --- uart/cam/Makefile | 19 +++++++++++++ uart/cam/mkmk | 69 +++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 88 insertions(+) create mode 100644 uart/cam/Makefile create mode 100755 uart/cam/mkmk diff --git a/uart/cam/Makefile b/uart/cam/Makefile new file mode 100644 index 0000000..d414d27 --- /dev/null +++ b/uart/cam/Makefile @@ -0,0 +1,19 @@ +.PHONY: all clean + +NAME=uart + +all: Makefile.mkmk + +Makefile.mkmk: mkmk ../uart.drl ../uart-PCB_Edges.gbr + ./mkmk + +../uart.drl: ../uart.brd + pcbnew --drill `pwd`/../uart.brd + +../uart-PCB_Edges.gbr: ../uart.brd + pcbnew --plot=gerber -l PCB_Edges `pwd`/../uart.brd + +-include Makefile.mkmk + +clean:: + rm -f Makefile.mkmk diff --git a/uart/cam/mkmk b/uart/cam/mkmk new file mode 100755 index 0000000..3ad788e --- /dev/null +++ b/uart/cam/mkmk @@ -0,0 +1,69 @@ +#!/bin/sh +PATH=$PATH:/home/qi/cae-tools/cameo +PATH=$PATH:/home/moko/svn.openmoko.org/developers/werner/cncmap/gp2rml + +NAME=uart +X=2 +Y=0 + +cameo <mill.rml +gp2rml 2 0.1 0.5 drill.gp >drill.rml + + +cat <Makefile.mkmk +SPOOL=/home/moko/svn.openmoko.org/developers/werner/cncmap/spool/spool +CNGT=/home/qi/cae-tools/cngt/cngt + +.PHONY: mill drill cng plot dplot + +mill: + PORT=/dev/ttyUSB0 \$(SPOOL) mill.rml + +drill: + PORT=/dev/ttyUSB0 \$(SPOOL) drill.rml + +cng: + \$(CNGT) -57.4 20 mill.gp + +plot: + echo 'plot "drill.gp" with points, "mill.gp" with lines' | \\ + gnuplot -persist + +dplot: + echo 'plot "< sed /^\$\$/d drill.gp" with linespoints' | \\ + gnuplot -persist + +clean:: + rm -f mill.gp mill.rml drill.gp drill.rml +EOF