aboutsummaryrefslogtreecommitdiffstats
path: root/examples/hx8kboard/Makefile
blob: e9fd7899525220d12e4a114b66fa93f989fab9ab (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
PROJ = example
PIN_DEF = hx8kboard.pcf
DEVICE = 8k

all: $(PROJ).bin

%.blif: %.v
	yosys -p 'synth_ice40 -top top -blif $@' $<

%.txt: $(PIN_DEF) %.blif
	arachne-pnr -d $(DEVICE) -o $@ -p $^

%.bin: %.txt
	icepack $< $@

prog: $(PROJ).bin
	iceprog $<

sudo-prog: $(PROJ).bin
	@echo 'Executing prog as root!!!'
	sudo iceprog $<

clean:
	rm -f $(PROJ).blif $(PROJ).txt $(PROJ).bin

.PHONY: all prog clean