icestorm/examples/icestick/Makefile

33 lines
533 B
Makefile
Raw Normal View History

PROJ = example
2017-01-03 02:19:29 +01:00
# PROJ = rs232demo
PIN_DEF = icestick.pcf
2016-02-01 23:32:03 +01:00
DEVICE = hx1k
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
2016-02-01 23:32:03 +01:00
arachne-pnr -d $(subst hx,,$(subst lp,,$(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-02-01 23:32:03 +01:00
icetime -d $(DEVICE) -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