summaryrefslogtreecommitdiffstats
path: root/blinky/Makefile
diff options
context:
space:
mode:
authordevantech <35335852+devantech@users.noreply.github.com>2019-03-27 14:15:12 +0000
committerGitHub <noreply@github.com>2019-03-27 14:15:12 +0000
commit4c807dfca679ee19a3017bf1dc1998640c225bd9 (patch)
tree4cb6494d834530b31a60edde6df01a4f2b71ba2d /blinky/Makefile
downloadiceFUN-4c807dfca679ee19a3017bf1dc1998640c225bd9.tar.gz
iceFUN-4c807dfca679ee19a3017bf1dc1998640c225bd9.tar.bz2
iceFUN-4c807dfca679ee19a3017bf1dc1998640c225bd9.zip
Add files via upload
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