icestorm/examples/iceblink/Makefile

30 lines
533 B
Makefile
Raw Normal View History

2016-01-31 12:01:18 +01:00
PROJ = example
PIN_DEF = iceblink.pcf
2016-02-01 23:32:03 +01:00
DEVICE = hx1k
2016-01-31 12:01:18 +01:00
2016-02-01 23:32:03 +01:00
all: $(PROJ).rpt $(PROJ).bin
2016-01-31 12:01:18 +01:00
%.blif: %.v
yosys -p 'synth_ice40 -top top -blif $@' $<
%.asc: $(PIN_DEF) %.blif
2016-02-01 23:32:03 +01:00
arachne-pnr -d $(subst hx,,$(subst lp,,$(DEVICE))) -o $@ -p $^ -P vq100
2016-01-31 12:01:18 +01:00
%.bin: %.asc
icepack $< $@
2016-02-01 23:32:03 +01:00
%.rpt: %.asc
icetime -d $(DEVICE) -mtr $@ $<
2016-01-31 12:01:18 +01:00
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).blif $(PROJ).asc $(PROJ).rpt $(PROJ).bin
2016-01-31 12:01:18 +01:00
.PHONY: all prog clean