diff --git a/Makefile b/Makefile index 5508e2f..666953b 100644 --- a/Makefile +++ b/Makefile @@ -9,7 +9,7 @@ src/encode.v \ src/hdmi.xdc \ src/simple_dual_ram.v \ -.PHONY: all clean +.PHONY: all clean upload program all: $(BUILD)/impl.bin @@ -49,5 +49,11 @@ $(BUILD)/ip: | $(BUILD) $(BUILD)/obj: | $(BUILD) mkdir $@ +upload: $(BUILD)/impl.bin + sudo openocd -f scripts/openocd.cfg -c "init" -c "pld load 0 .build/impl.bit" -c "shutdown" + +program: $(BUILD)/impl.bin + sudo openocd -f scripts/openocd.cfg -c "init" -c "jtagspi_init 0 scripts/bscan_spi_xc7a35t.bit" -c "jtagspi_program .build/impl.bin 0x0" -c "fpga_program" -c "shutdown" + clean: rm -fr $(BUILD) diff --git a/program.sh b/program.sh deleted file mode 100755 index 1b54153..0000000 --- a/program.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -sudo openocd -f openocd.cfg -c "init" -c "jtagspi_init 0 bscan_spi_xc7a35t.bit" -c "jtagspi_program .build/impl.bin 0x0" -c "fpga_program" -c "shutdown" diff --git a/scripts/bscan_spi_xc7a35t.bit b/scripts/bscan_spi_xc7a35t.bit new file mode 100644 index 0000000..be649f0 Binary files /dev/null and b/scripts/bscan_spi_xc7a35t.bit differ diff --git a/openocd.cfg b/scripts/openocd.cfg similarity index 100% rename from openocd.cfg rename to scripts/openocd.cfg diff --git a/upload.sh b/upload.sh deleted file mode 100755 index 91d13b1..0000000 --- a/upload.sh +++ /dev/null @@ -1,2 +0,0 @@ -#!/bin/bash -sudo openocd -f openocd.cfg -c "init" -c "pld load 0 .build/impl.bit" -c "shutdown"