Debian Codegraph @

examples/up5k_rgb/Makefile.uwg30

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