summaryrefslogtreecommitdiffstats
path: root/blinky/Makefile
diff options
context:
space:
mode:
Diffstat (limited to 'blinky/Makefile')
-rw-r--r--blinky/Makefile23
1 files changed, 23 insertions, 0 deletions
diff --git a/blinky/Makefile b/blinky/Makefile
new file mode 100644
index 0000000..c254fc0
--- /dev/null
+++ b/blinky/Makefile
@@ -0,0 +1,23 @@
+# Project setup
+PROJ = blinky
+DEVICE = 8k
+
+# Files
+FILES = blinky.v
+
+.PHONY: blinky clean burn
+
+blinky:
+ # synthesize using Yosys
+ yosys -p "synth_ice40 -top top -json $(PROJ).json" $(FILES)
+ # Place and route using nextpnr
+ nextpnr-ice40 -r --hx8k --json $(PROJ).json --package cb132 --asc $(PROJ).asc --opt-timing --pcf iceFUN.pcf
+
+ # Convert to bitstream using IcePack
+ icepack $(PROJ).asc $(PROJ).bin
+
+burn:
+ iceFUNprog $(PROJ).bin
+
+clean:
+ rm *.asc *.bin *blif