icestorm/examples/iceblink/Makefile

31 lines
557 B
Makefile

PROJ = example
PIN_DEF = iceblink.pcf
DEVICE = hx1k
PACKAGE = vq100
all: $(PROJ).rpt $(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
iCEburn.py -e -v -w $<
sudo-prog: $(PROJ).bin
@echo 'Executing prog as root!!!'
iCEburn.py -e -v -w $<
clean:
rm -f $(PROJ).json $(PROJ).asc $(PROJ).rpt $(PROJ).bin
.PHONY: all prog clean