abstractaccelerator/fpga/blink/Makefile

28 lines
533 B
Makefile

TARGET=blink
OBJS+=blink.v
all: ${TARGET}.bit
$(TARGET).json: $(OBJS)
yosys -p "read_verilog $(OBJS); synth_ecp5 -top ${TARGET} -json $@"
$(TARGET).cfg: $(TARGET).json
nextpnr-ecp5 --25k --package CABGA381 --speed 6 --json $< --textcfg $@ --lpf $(TARGET).lpf --freq 65
$(TARGET).bit: $(TARGET).cfg
ecppack --svf ${TARGET}.svf $< $@
${TARGET}.svf : ${TARGET}.bit
prog: ${TARGET}.svf
./dapprog blink.svf
flash: ${TARGET}.bit
ecpdap flash write blink.bit
clean:
rm -f *.svf *.bit *.config *.ys *.json
.PHONY: prog clean