]> cvs.zerfleddert.de Git - raggedstone/blobdiff - heartbeat/Makefile
make it possible to specify the jtag cable in the environment (so a remote
[raggedstone] / heartbeat / Makefile
index 13045a95ef7be361860acaaf72f971bfe8a9f505..18645f41a3f71561b936213c29e4f036a8cabe9a 100644 (file)
@@ -2,6 +2,9 @@ PWD := $(shell pwd)
 
 PROJECT := raggedstone
 
+#auto|lpt1|lpt2|lpt3|com1|com2|com3|com4|usb0|usb1|usb2|usb21|ttya|ttyb|tty00|tty01
+CABLE ?= auto
+
 INTSTYLE := silent
 
 SOURCES = $(wildcard sources/*.v source/*.vhd)
@@ -53,10 +56,14 @@ burn: $(PROJECT).bit
        xc3sprog $(PROJECT).bit
 
 load: $(PROJECT).bit
-       impact -batch xc3s1500.batch
+       @sed -e "s|%CABLE%|$(CABLE)|g" xc3s1500.batch >xc3s1500.batch.tmp.$$
+       impact -batch xc3s1500.batch.tmp.$$
+       @rm xc3s1500.batch.tmp.$$
 
 flash: $(PROJECT)-xcf02s.mcs $(PROJECT)-xcf04s.mcs
-       impact -batch xcf.batch
+       @sed -e "s|%CABLE%|$(CABLE)|g" xcf.batch >xcf.batch.tmp.$$
+       impact -batch xcf.batch.tmp.$$
+       @rm xcf.batch.tmp.$$
 
 clean:
        @rm -rf *.bit *.bgn *.mcs *.prm *.bld *.drc *.mcs *.ncd *.ngc *.ngd \
Impressum, Datenschutz