]> git.zerfleddert.de Git - raggedstone/blame - heartbeat/Makefile
make it possible to specify the jtag cable in the environment (so a remote
[raggedstone] / heartbeat / Makefile
CommitLineData
95764a11 1PWD := $(shell pwd)
2
89972609 3PROJECT := raggedstone
4
fcff7832 5#auto|lpt1|lpt2|lpt3|com1|com2|com3|com4|usb0|usb1|usb2|usb21|ttya|ttyb|tty00|tty01
6CABLE ?= auto
7
f8d46fe4 8INTSTYLE := silent
95764a11 9
89972609 10SOURCES = $(wildcard sources/*.v source/*.vhd)
95764a11 11
89972609 12all: $(PROJECT).bit final
95764a11 13
14log:
15 time make all &>build.log
16
17xst: $(PROJECT).ngc
18
f8d46fe4 19ngdbuild: $(PROJECT).ngd
95764a11 20
89972609 21$(PROJECT).ngc: $(SOURCES)
95764a11 22 @# echo synclib > $(PROJECT).lso # hmm. things are different in ise 9.1
23 echo work > $(PROJECT).lso
f8d46fe4 24 xst -intstyle $(INTSTYLE) -ifn $(PROJECT).xst -ofn $(PROJECT).syr
25 @#cat $(PROJECT).syr
95764a11 26
f8d46fe4 27$(PROJECT).ngd: $(PROJECT).ngc
28 ngdbuild -intstyle $(INTSTYLE) -dd "$(PWD)/_ngo" -nt timestamp -uc $(PROJECT).ucf -p xc3s1500-fg456-4 $(PROJECT).ngc $(PROJECT).ngd
95764a11 29
89972609 30$(PROJECT)_map.ngm $(PROJECT).pcf: $(PROJECT).ngd
f8d46fe4 31 map -intstyle $(INTSTYLE) -p xc3s1500-fg456-4 -cm area -pr b -k 4 -c 100 -o $(PROJECT)_map.ncd $(PROJECT).ngd $(PROJECT).pcf
95764a11 32
89972609 33$(PROJECT).ncd: $(PROJECT)_map.ngm $(PROJECT).pcf
f8d46fe4 34 @#par -w -intstyle $(INTSTYLE) -ol std -n 4 -t 1 $(PROJECT)_map.ncd $(PROJECT).dir $(PROJECT).pcf
35 par -w -intstyle $(INTSTYLE) -ol std -t 1 $(PROJECT)_map.ncd $(PROJECT).ncd $(PROJECT).pcf
95764a11 36
89972609 37$(PROJECT).twx: $(PROJECT).ncd
f8d46fe4 38 trce -intstyle $(INTSTYLE) -e 3 -l 3 -s 4 -xml $(PROJECT) $(PROJECT).ncd -o $(PROJECT).twr $(PROJECT).pcf
39 @#cat $(PROJECT).twr
95764a11 40
89972609 41$(PROJECT).bit: $(PROJECT).ncd
f8d46fe4 42 bitgen -intstyle $(INTSTYLE) -f $(PROJECT).ut $(PROJECT).ncd
43 @# cp $(PROJECT).bit ../jcarr_last.bit
44 @#cat $(PROJECT).drc
45 @#cat $(PROJECT).bgn
95764a11 46
ddd220fe 47$(PROJECT)-xcf02s.mcs $(PROJECT)-xcf04s.mcs: $(PROJECT).bit
48 promgen -intstyle $(INTSTYLE) -w -p mcs -u 0 $(PROJECT) -o $(PROJECT)-xcf02s $(PROJECT)-xcf04s -x xcf02s xcf04s
95764a11 49
50final:
f8d46fe4 51 -@grep -A 8 -B 1 ^Selected\ Device $(PROJECT).syr
52 -@grep -A 8 -B 1 ^Timing\ Summary $(PROJECT).syr
53 -@grep -A 21 -B 1 ^Design\ Summary $(PROJECT)_map.map
95764a11 54
ddd220fe 55burn: $(PROJECT).bit
95764a11 56 xc3sprog $(PROJECT).bit
57
ddd220fe 58load: $(PROJECT).bit
fcff7832 59 @sed -e "s|%CABLE%|$(CABLE)|g" xc3s1500.batch >xc3s1500.batch.tmp.$$
60 impact -batch xc3s1500.batch.tmp.$$
61 @rm xc3s1500.batch.tmp.$$
f8d46fe4 62
ddd220fe 63flash: $(PROJECT)-xcf02s.mcs $(PROJECT)-xcf04s.mcs
fcff7832 64 @sed -e "s|%CABLE%|$(CABLE)|g" xcf.batch >xcf.batch.tmp.$$
65 impact -batch xcf.batch.tmp.$$
66 @rm xcf.batch.tmp.$$
f8d46fe4 67
95764a11 68clean:
55279288 69 @rm -rf *.bit *.bgn *.mcs *.prm *.bld *.drc *.mcs *.ncd *.ngc *.ngd \
70 *.ngr *.pad *.par *.pcf *.prm *.syr *.twr *.twx *.xpi *.lso *.prm *.mcs _impact* \
71 $(PROJECT)_map.* $(PROJECT)_pad.* \
72 _ngo xst \
73 build.log \
74 $(PROJECT).unroutes *.xml
ddd220fe 75
76.PHONY: all final burn load flash clean xst ngdbuild log
Impressum, Datenschutz