test SPI_slave, don't really work
[trilby-hat-fpga] / Makefile
index 4da60c3..ed75e6e 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -1,17 +1,17 @@
 PROJ:=led
-PROJ=blinky
+PROJ=i2c
 TRELLIS?=/usr/share/trellis
 
 all: ${PROJ}.bit
 
 %.json: %.v
-       yosys -p "synth_ecp5 -json $@" $<
+       yosys -p "read_verilog ${PROJ}.v ; synth_ecp5 ; write_json $@" -E .$(basename $@).d $<
 
 %_out.config: %.json
        nextpnr-ecp5 --json $< --textcfg $@ --45k --package CABGA381 --lpf trilby.lpf
 
 %.bit: %_out.config
-       ecppack --svf ${PROJ}.svf $< $@
+       ecppack --compress --svf ${PROJ}.svf $< $@
 
 ${PROJ}.svf : ${PROJ}.bit
 
@@ -22,3 +22,4 @@ clean:
        rm -f *.svf *.bit *.config *.json
 
 .PHONY: prog clean
+-include .*.d