YOSYS ?= yosys NEXTPNR ?= nextpnr-ice40 ICEPACK ?= icepack TINYPROG ?= tinyprog all: top.bin top.json: top.v hello_world.v coax_tx.v prog: top.bin $(TINYPROG) -p top.bin clean: rm -f *.json *.asc *.bin %.json: $(YOSYS) -p 'synth_ice40 -top top -json $@' $^ %.asc: %.json pins.pcf $(NEXTPNR) --lp8k --package cm81 --json $< --pcf pins.pcf --asc $@ %.bin: %.asc $(ICEPACK) $< $@ .PHONY: all prog clean