mirror of
https://github.com/tillitis/tillitis-key1.git
synced 2024-10-01 01:45:38 -04:00
Avoid confusing errors by checking for programmer and stick first
Signed-off-by: Daniel Lublin <daniel@lublin.se>
This commit is contained in:
parent
426b56ebf5
commit
7cd085a17e
@ -272,14 +272,21 @@ route_sim_vcd: route_tb.vvp
|
||||
# FPGA device programming.
|
||||
#-------------------------------------------------------------------
|
||||
|
||||
prog_flash: application_fpga.bin
|
||||
sudo tillitis-iceprog $<
|
||||
prog_flash: check-hardware application_fpga.bin
|
||||
sudo tillitis-iceprog application_fpga.bin
|
||||
.PHONY: prog_flash
|
||||
|
||||
prog_flash_testfw: application_fpga_testfw.bin
|
||||
sudo tillitis-iceprog $<
|
||||
prog_flash_testfw: check-hardware application_fpga_testfw.bin
|
||||
sudo tillitis-iceprog application_fpga_testfw.bin
|
||||
.PHONY: prog_flash_testfw
|
||||
|
||||
check-hardware:
|
||||
@sudo tillitis-iceprog -t >/dev/null 2>&1 || \
|
||||
{ echo "Programmer not plugged in or not accessible"; false; }
|
||||
@if sudo tillitis-iceprog -t 2>&1 | grep -qi "^flash.id:\( 0x\(00\|ff\)\)\{4\}"; then \
|
||||
echo "No USB stick in the programmer?"; false; else true; fi
|
||||
.PHONY: check-hardware
|
||||
|
||||
#-------------------------------------------------------------------
|
||||
# Post build analysis.
|
||||
#-------------------------------------------------------------------
|
||||
|
Loading…
Reference in New Issue
Block a user