Debian Codegraph @

examples/up5k_rgb/Makefile

raw
1 PROJ = rgb
2 PIN_DEF = rgb.pcf
3 DEVICE = up5k
4 PACKAGE = sg48
5
6 ICEPACK = icepack
7 ICETIME = icetime
8 ICEPROG = iceprog
9
10 all: $(PROJ).bin
11
12 %.json: %.v
13 yosys -p 'synth_ice40 -top top -json $@' $<
14
15 %.asc: $(PIN_DEF) %.json
16 nextpnr-ice40 --$(DEVICE) --package $(PACKAGE) --asc $@ --pcf $< --json $*.json
17
18 %.bin: %.asc
19 $(ICEPACK) $< $@
20
21 %.rpt: %.asc
22 $(ICETIME) -d $(DEVICE) -mtr $@ $<
23
24 prog: $(PROJ).bin
25 $(ICEPROG) -S $<
26
27 sudo-prog: $(PROJ).bin
28 @echo 'Executing prog as root!!!'
29 sudo $(ICEPROG) -S $<
30
31 clean:
32 rm -f $(PROJ).json $(PROJ).asc $(PROJ).rpt $(PROJ).bin
33
34 .SECONDARY:
35 .PHONY: all prog clean