icestorm/examples/icestick/Makefile

31 lines
472 B
Makefile
Raw Normal View History

PROJ = example
PIN_DEF = icestick.pcf
DEVICE = 1k
2015-12-08 12:54:20 +01:00
2016-01-17 11:40:22 +01:00
all: $(PROJ).rpt $(PROJ).bin
2015-12-08 12:54:20 +01:00
%.blif: %.v
yosys -p 'synth_ice40 -top top -blif $@' $<
2015-12-08 12:54:20 +01:00
%.asc: $(PIN_DEF) %.blif
arachne-pnr -d $(DEVICE) -o $@ -p $^
%.bin: %.asc
icepack $< $@
2015-12-08 12:54:20 +01:00
2016-01-17 11:40:22 +01:00
%.rpt: %.asc
2016-01-18 00:11:13 +01:00
icetime -mtr $@ $<
2016-01-17 11:40:22 +01:00
prog: $(PROJ).bin
iceprog $<
2015-12-08 12:54:20 +01:00
sudo-prog: $(PROJ).bin
@echo 'Executing prog as root!!!'
2016-01-17 11:40:22 +01:00
sudo iceprog $<
2015-12-08 12:54:20 +01:00
clean:
2016-01-17 11:40:22 +01:00
rm -f $(PROJ).blif $(PROJ).asc $(PROJ).rpt $(PROJ).bin
2015-12-08 12:54:20 +01:00
2016-01-17 11:40:22 +01:00
.SECONDARY:
2015-12-08 12:54:20 +01:00
.PHONY: all prog clean