blob: e542f8f808f5a24a267d1c1df392de9436bd21fe (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
|
PROJ=de1flash
SRCS=$(wildcard *.vhd *.v *.qsf *.qpf )
SOF=${PROJ}.sof
ROMSRC=../../roms
default: do_flash
do_flash: rom_image.stamp
rom_image.stamp:rom_image.rom load_sof.stamp
./quartus_wrap quartus_stp -t de1flash.tcl write rom_image.rom@0x20000
touch $@
os.rom:${ROMSRC}/os12.rom
cp $< $@
rom0.rom:${ROMSRC}/empty.rom
cp $< $@
rom1.rom:${ROMSRC}/empty.rom
cp $< $@
rom2.rom:${ROMSRC}/supermmc.rom
cp $< $@
rom3.rom:${ROMSRC}/basic2.rom
cp $< $@
rom_image.rom:os.rom rom0.rom rom1.rom rom2.rom rom3.rom
cat rom0.rom rom1.rom rom2.rom rom3.rom ${ROMSRC}/empty.rom ${ROMSRC}/empty.rom ${ROMSRC}/empty.rom os.rom > $@ || /bin/rm -f $@
sta.stamp:asm.stamp
./quartus_wrap quartus_sta ${PROJ} -c ${PROJ}
touch $@
asm.stamp:fit.stamp
./quartus_wrap quartus_asm --read_settings_files=off --write_settings_files=off ${PROJ} -c ${PROJ}
touch $@
${SOF}:asm.stamp
fit.stamp: ans.stamp
./quartus_wrap quartus_fit --read_settings_files=off --write_settings_files=off ${PROJ} -c ${PROJ}
touch $@
ans.stamp: source.stamp
./quartus_wrap quartus_map --read_settings_files=on --write_settings_files=off ${PROJ} -c ${PROJ}
touch $@
source.stamp:${SRCS}
touch source.stamp
load_sof.stamp: ${SOF}
./quartus_wrap quartus_pgm -m JTAG -o "p;${SOF}" -c 1
#touch $@
clean:
/bin/rm -rf db incremental_db
/bin/rm -f *.stamp ${SOF} *.rpt *.html *.summary *.pin *.jdi *.qws *.pof *.done *.rom
|