File: Makefile

package info (click to toggle)
fpga-icestorm 0~20230218gitd20a5e9-1~deb12u1
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 7,448 kB
  • sloc: python: 28,381; cpp: 4,966; sh: 2,594; ansic: 1,202; makefile: 677; xml: 16
file content (22 lines) | stat: -rw-r--r-- 638 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
all: config.bin

prog: config.bin
	sudo iceprog config.bin

sudo-prog: config.bin
	@echo 'Executing prog as root!!!'
	sudo iceprog config.bin

config.bin: app0.bin app1.bin app2.bin app3.bin
	icemulti -v -A16 -p0 -o config.bin app0.bin app1.bin app2.bin app3.bin

app%.bin: app%.v icestick.pcf
	yosys -p "synth_ice40 -top top -json $(basename $<).json" $<
	nextpnr-ice40 --hx1k --package tq144 --asc $(basename $<).asc --pcf icestick.pcf --json $(basename $<).json
	icetime -d hx1k -c 25 $(basename $<).asc
	icepack $(basename $<).asc $(basename $<).bin

clean:
	rm -f app?.asc app?.bin app?.json config.bin

.PHONY: prog sudo-prog clean