From: michael Date: Sun, 11 Feb 2007 13:32:15 +0000 (+0000) Subject: make it possible to specify the jtag cable in the environment (so a remote X-Git-Url: https://git.zerfleddert.de/cgi-bin/gitweb.cgi/raggedstone/commitdiff_plain/fcff783283a2e5b5411976259fd4ef146cd32ebd make it possible to specify the jtag cable in the environment (so a remote machine can be used to program devices and to reduce probing times) Examples: export CABLE='auto' (default) probes for cable on local machine export CABLE='lpt1' uses cable on lpt1 export CABLE='auto -server marvin:2000' probes for cable on remotehost marvin running CableServer on port 2000 export CABLE='usb21 -server marvin:2000' uses usb cable on remotehost marvin running CableServer on port 2000 see Makefile for possible cabletypes and doc/usenglish/help/iseguide/mergedProjects/plugin_imp/html/pim_batch_command_definitions_s.htm With this it is even possible to avoid compiling windrvr: http://sourceforge.net/projects/xilprg --- diff --git a/common/xc3s1500.batch b/common/xc3s1500.batch index 09751c3..2671e04 100644 --- a/common/xc3s1500.batch +++ b/common/xc3s1500.batch @@ -1,5 +1,5 @@ setmode -bscan -setcable -p auto +setcable -p %CABLE% identify assignFile -p 3 -file raggedstone.bit program -p 3 diff --git a/common/xcf.batch b/common/xcf.batch index 0580d58..a4fad2b 100644 --- a/common/xcf.batch +++ b/common/xcf.batch @@ -1,5 +1,5 @@ setmode -bscan -setcable -p auto +setcable -p %CABLE% identify assignFile -p 1 -file raggedstone-xcf02s.mcs assignFile -p 2 -file raggedstone-xcf04s.mcs diff --git a/heartbeat/Makefile b/heartbeat/Makefile index 13045a9..18645f4 100644 --- a/heartbeat/Makefile +++ b/heartbeat/Makefile @@ -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 \