ICEStick/fizzbuzz/Makefile

27 lines
581 B
Makefile
Raw Permalink Normal View History

2018-08-17 01:45:31 -07:00
# Project setup
PROJ = blinky
BUILD = ./build
DEVICE = 1k
FOOTPRINT = tq144
# Files
FILES = top.v
.PHONY: all clean burn
all:
# if build folder doesn't exist, create it
mkdir -p $(BUILD)
# synthesize using Yosys
yosys -p "synth_ice40 -top top -blif $(BUILD)/$(PROJ).blif" $(FILES)
# Place and route using arachne
arachne-pnr -d $(DEVICE) -P $(FOOTPRINT) -o $(BUILD)/$(PROJ).asc -p pinmap.pcf $(BUILD)/$(PROJ).blif
# Convert to bitstream using IcePack
icepack $(BUILD)/$(PROJ).asc $(BUILD)/$(PROJ).bin
burn:
iceprog $(BUILD)/$(PROJ).bin
clean:
rm build/*