icestorm/examples/icestick/Makefile

27 lines
397 B
Makefile

PROJ = example
PIN_DEF = icestick.pcf
DEVICE = 1k
all: $(PROJ).bin
%.blif: %.v
yosys -p 'synth_ice40 -top top -blif $@' $<
%.asc: $(PIN_DEF) %.blif
arachne-pnr -d $(DEVICE) -o $@ -p $^
%.bin: %.asc
icepack $< $@
prog: $(PROJ).bin
iceprog $<
sudo-prog: $(PROJ).bin
@echo 'Executing prog as root!!!'
iceprog $<
clean:
rm -f $(PROJ).blif $(PROJ).asc $(PROJ).bin
.PHONY: all prog clean