Merges upload and program scripts into makefile

This commit is contained in:
Dreaded_X 2021-01-28 23:05:11 +01:00
parent cd02a1c942
commit be63b56966
5 changed files with 7 additions and 5 deletions

View File

@ -9,7 +9,7 @@ src/encode.v \
src/hdmi.xdc \ src/hdmi.xdc \
src/simple_dual_ram.v \ src/simple_dual_ram.v \
.PHONY: all clean .PHONY: all clean upload program
all: $(BUILD)/impl.bin all: $(BUILD)/impl.bin
@ -49,5 +49,11 @@ $(BUILD)/ip: | $(BUILD)
$(BUILD)/obj: | $(BUILD) $(BUILD)/obj: | $(BUILD)
mkdir $@ 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: clean:
rm -fr $(BUILD) rm -fr $(BUILD)

View File

@ -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"

Binary file not shown.

View File

@ -1,2 +0,0 @@
#!/bin/bash
sudo openocd -f openocd.cfg -c "init" -c "pld load 0 .build/impl.bit" -c "shutdown"