diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-01-16 21:07:45 +0100 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2018-01-16 21:07:45 +0100 |
commit | 745625c8b633c1b0db285cc89791f44c731b3be0 (patch) | |
tree | 005cab41b7e00e358154d4d8cee3677972fb38a3 /fpga-toolchain/experiments/Makefile | |
parent | f612db2c5f4da143dea93737998befb6a6749037 (diff) |
It works
Diffstat (limited to 'fpga-toolchain/experiments/Makefile')
-rw-r--r-- | fpga-toolchain/experiments/Makefile | 26 |
1 files changed, 26 insertions, 0 deletions
diff --git a/fpga-toolchain/experiments/Makefile b/fpga-toolchain/experiments/Makefile new file mode 100644 index 0000000..4f906f7 --- /dev/null +++ b/fpga-toolchain/experiments/Makefile @@ -0,0 +1,26 @@ +# Project setup +PROJ = blinky +BUILD = ./build +DEVICE = 8k +FOOTPRINT = ct256 + +# Files +FILES = top.v + +.PHONY: all clean burn + +all: + # if build folder doesn't exist, create it + mkdir -p $(BUILD) + # synthesize using Yosys + yosys -p "synth_ice40 -top top -blif $(BUILD)/$(PROJ).blif" $(FILES) + # Place and route using arachne + arachne-pnr -d $(DEVICE) -P $(FOOTPRINT) -o $(BUILD)/$(PROJ).asc -p pinmap.pcf $(BUILD)/$(PROJ).blif + # Convert to bitstream using IcePack + icepack $(BUILD)/$(PROJ).asc $(BUILD)/$(PROJ).bin + +burn: + iceprog $(BUILD)/$(PROJ).bin + +clean: + rm build/* |