Date:2011-02-22 03:31:04 (8 years 5 months ago)
Author:Werner Almesberger
Commit:125055b0fec615168dd676e5414fd04b82c14f8a
Message:Updates CAM processes of various sub-projects

- atben/cam/mkmk: introduced variables for board corner
- atben/cam/mkmk: updated for new raw board
- atusb-pgm/cam/Makefile: updated for new board
- atusb/cam/Makefile: introduced abstraction with $(NAME)
- atusb/cam/Makefile: use cameo/templates/mkmk-simple instead of local mkmk
- atusb/cam/mkmk: removed
- atusb/cam/Makefile: updated for new board
Files: atben/cam/mkmk (3 diffs)
atusb-pgm/cam/Makefile (1 diff)
atusb/cam/Makefile (1 diff)
atusb/cam/mkmk (1 diff)

Change Details

atben/cam/mkmk
33PATH=$PATH:/home/moko/svn.openmoko.org/developers/werner/cncmap/gp2rml
44
55NAME=atben
6X0=8.6mm
7Y0=7.1mm
68X=0
79Y=0
810
...... 
1012mm
1113
1214gerber 35mil ../$NAME-PCB_Edges.gbr
13align 1 4.4mm 12.1mm # align relative to board corner
15align 1 $X0 $Y0 # align relative to board corner
1416translate 4mm 4mm # move to PCB zone assigned to project
15translate 40mm 0mm # skip over previous boards
17#translate 40mm 0mm # skip over previous boards
1618array +19mm +2.5mm $X $Y
1719
1820z 0 -58.9mm # board surface (tool fully retracted)
...... 
4951gerber 35mil ../$NAME-PCB_Edges.gbr
5052rotate 180
5153
52align 1 4.4mm 12.1mm # align relative to board corner
54align 1 $X0 $Y0 # align relative to board corner
5355translate 4mm 4mm # move to PCB zone assigned to project
54translate 40mm 0mm # skip over previous boards
56#translate 40mm 0mm # skip over previous boards
5557translate 15mm 0mm
5658array +19mm +2.5mm $X $Y
5759
atusb-pgm/cam/Makefile
77# 6.8 / 8.4 mm
88# + 0 / 59 mm
99BOARD = X0=6.8mm Y0=67.4mm
10# 9.2 8.1
11# 0 59
12# 0 -0.5
13BOARD = X0=9.2mm Y0=66.6mm
1014TOOLS = DRILL=7mil,15mil MILL_IN=25mil MILL_OUT=45mil
1115FAB = X=0 Y=0 XN=3 YN=1
1216
atusb/cam/Makefile
1MKMK=../../../cae-tools/cameo/templates/mkmk-simple
2
3NAME=atusb
4
5BOARD = X0=9.2mm Y0=8.1mm
6
7# drill: 12.5-13.5 mil
8# in: 35 mil endmill; pretend it is smaller, to compensate for
9# tool/board deflections
10# out: 35 mil endmill, 11 mil deflection
11#
12TOOLS = DRILL=7mil,15mil MILL_IN=12mil MILL_OUT=50mil
13
14#FAB = ROT=90 X=0 Y=1 XN=1 YN=2
15FAB = ROT=90 X=1 Y=1 XN=1 YN=2
16
117.PHONY: all clean
218
319all: Makefile.mkmk
420
5Makefile.mkmk: mkmk ../atusb.drl ../atusb-PCB_Edges.gbr
6            ./mkmk
21Makefile.mkmk: $(MKMK) ../$(NAME).drl ../$(NAME)-PCB_Edges.gbr Makefile
22            $(MKMK) NAME=$(NAME) $(BOARD) $(TOOLS) $(FAB)
723
8../atusb.drl: ../atusb.brd
9            pcbnew --drill `pwd`/../atusb.brd
24../$(NAME).drl: ../$(NAME).brd
25            pcbnew --drill `pwd`/../$(NAME).brd
26            touch $@
1027
11../atusb-PCB_Edges.gbr: ../atusb.brd
12            pcbnew --plot=gerber -l PCB_Edges `pwd`/../atusb.brd
28../$(NAME)-PCB_Edges.gbr: ../$(NAME).brd
29            pcbnew --plot=gerber -l PCB_Edges `pwd`/../$(NAME).brd
1330
1431-include Makefile.mkmk
1532
atusb/cam/mkmk
1#!/bin/sh
2PATH=$PATH:/home/qi/cae-tools/cameo
3PATH=$PATH:/home/moko/svn.openmoko.org/developers/werner/cncmap/gp2rml
4
5NAME=atusb
6X=0
7Y=0
8
9cameo <<EOF
10mm
11
12gerber 35mil ../$NAME-PCB_Edges.gbr
13rotate 90
14align 1 6.8mm 8.4mm # align relative to board corner
15translate 4mm 4mm # move to PCB zone assigned to project
16array +3mm +3mm $X $Y
17z 0 -58.9mm # board surface (tool fully retracted)
18z 1.5mm # slack for extending the tool
19z -0.8mm # board thickness
20z -0.5mm # tool extra depth
21clear
22
23excellon ../$NAME.drl
24drill 7mil 15mil # 12.5-13.5 mil drill
25optimize
26write drill.gp
27
28remainder
29mill 20mil 0.01mm # 35 mil endmill; pretend it is a little smaller,
30            # to compensate for tool/board deflections
31write mill.gp
32
33remainder
34empty
35
36gerber 32mil ../$NAME-PCB_Edges.gbr # 35 mil endmill, 3 mil deflection
37offset
38append mill.gp
39EOF
40
41
42gp2rml 2 0.5 0.5 mill.gp >mill.rml
43gp2rml 2 0.1 0.5 drill.gp >drill.rml
44
45
46cat <<EOF >Makefile.mkmk
47SPOOL=/home/moko/svn.openmoko.org/developers/werner/cncmap/spool/spool
48CNGT=/home/qi/cae-tools/cngt/cngt
49
50.PHONY: mill drill cng plot dplot
51
52mill:
53        PORT=/dev/ttyUSB0 \$(SPOOL) mill.rml
54
55drill:
56        PORT=/dev/ttyUSB0 \$(SPOOL) drill.rml
57
58cng:
59        \$(CNGT) -57.4 20 mill.gp
60
61plot:
62        echo 'plot "drill.gp" with points, "mill.gp" with lines' | \\
63          gnuplot -persist
64
65dplot:
66        echo 'plot "< sed /^\$\$/d drill.gp" with linespoints' | \\
67          gnuplot -persist
68
69clean::
70        rm -f mill.gp mill.rml drill.gp drill.rml
71EOF

Archive Download the corresponding diff file



interactive