blob: 77a610d295d82c777fb7f90ac9b425b5823d5e63 (
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
27
28
29
30
31
32
33
34
|
PROJ = blink
#PROJ = fixed1
#PROJ = multi1
#PROJ = multi2
#PROJ = rotate1
#PROJ = rotate2
#PROJ = rotate3
#PROJ = rotate4
#PROJ = spin1
#PROJ = spin2
PIN_DEF = leds.pcf
DEVICE = hx1k
all: $(PROJ).bin
%.json: leds.vhdl %.vhdl
yosys -m ghdl -p 'ghdl $^ -e leds; synth_ice40 -json $@'
%.asc: %.json
nextpnr-ice40 --package $(DEVICE) --pcf $(PIN_DEF) --json $< --asc $@
%.bin: %.asc
icepack $< $@
prog: $(PROJ).bin
iceprog $<
clean:
rm -f $(PROJ).json $(PROJ).asc $(PROJ).bin
.SECONDARY:
.PHONY: all prog clean
|