Add variable to control what program gets flashed to FPGA.
[freedom-sifive.git] / fpga / e300artydevkit / Makefile
1 VIVADO ?= vivado
2 VIVADOFLAGS := \
3 -nojournal -mode batch \
4 -source script/board.tcl \
5 -source script/prologue.tcl
6
7 # Path to a program in raw binary format to be flashed into the address that the
8 # bootrom jumps to.
9 FLASHED_PROGRAM ?=
10
11 bit := obj/system.bit
12 $(bit): script/impl.tcl script/init.tcl
13 VSRC_TOP=$(VSRC_TOP) EXTRA_VSRCS="$(EXTRA_VSRCS)" $(VIVADO) $(VIVADOFLAGS) -source script/init.tcl -source script/impl.tcl
14
15 .PHONY: bit
16 bit: $(bit)
17
18 mcs := obj/system.mcs
19 $(mcs): $(bit)
20 $(VIVADO) $(VIVADOFLAGS) script/cfgmem.tcl -tclargs $@ $^ $(FLASHED_PROGRAM)
21
22 .PHONY: mcs
23 mcs: $(mcs)
24
25 .PHONY: clean
26 clean::
27 rm -rf -- .Xil .ip_user_files *.os obj src/generated usage_statistics_webtalk.xml usage_statistics_webtalk.html *.log