icestorm/examples/up5k_rgb/Makefile

36 lines
597 B
Makefile
Raw Normal View History

PROJ = rgb
PIN_DEF = rgb.pcf
DEVICE = up5k
PACKAGE = sg48
2017-11-20 10:51:03 +01:00
ICEPACK = icepack
ICETIME = icetime
ICEPROG = iceprog
all: $(PROJ).bin
%.json: %.v
yosys -p 'synth_ice40 -top top -json $@' $<
%.asc: $(PIN_DEF) %.json
nextpnr-ice40 --$(DEVICE) --package $(PACKAGE) --asc $@ --pcf $< --json $*.json
%.bin: %.asc
$(ICEPACK) $< $@
%.rpt: %.asc
$(ICETIME) -d $(DEVICE) -mtr $@ $<
prog: $(PROJ).bin
$(ICEPROG) -S $<
sudo-prog: $(PROJ).bin
@echo 'Executing prog as root!!!'
sudo $(ICEPROG) -S $<
clean:
rm -f $(PROJ).json $(PROJ).asc $(PROJ).rpt $(PROJ).bin
.SECONDARY:
.PHONY: all prog clean