From 9b130a8e41421af4d2a30c5978398af993fbb748 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Mon, 15 Jul 2019 17:17:21 +0200 Subject: [PATCH] [scripts] N0110: create target %_flash --- scripts/targets.device.n0110.mak | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/scripts/targets.device.n0110.mak b/scripts/targets.device.n0110.mak index 9737bee94..692c53fd5 100644 --- a/scripts/targets.device.n0110.mak +++ b/scripts/targets.device.n0110.mak @@ -4,3 +4,15 @@ $(BUILD_DIR)/test.external_flash.%.$(EXE): LDSCRIPT = ion/test/device/n0110/exte test_external_flash_src = $(ion_src) $(liba_src) $(libaxx_src) $(kandinsky_src) $(poincare_src) $(ion_device_dfu_relogated_src) $(runner_src) $(BUILD_DIR)/test.external_flash.read.$(EXE): $(BUILD_DIR)/quiz/src/test_ion_external_flash_read_symbols.o $(call object_for,$(test_external_flash_src) $(test_ion_external_flash_read_src)) $(BUILD_DIR)/test.external_flash.write.$(EXE): $(BUILD_DIR)/quiz/src/test_ion_external_flash_write_symbols.o $(call object_for,$(test_external_flash_src) $(test_ion_external_flash_write_src)) + +.PHONY: %_flash +%_flash: $(BUILD_DIR)/%.dfu $(BUILD_DIR)/flasher.light.dfu + @echo "DFU $@" + @echo "INFO About to flash your device. Please plug your device to your computer" + @echo " using an USB cable and press at the same time the 6 key and the RESET" + @echo " button on the back of your device." + until $(PYTHON) scripts/device/dfu.py -l | grep -E "0483:a291|0483:df11" > /dev/null 2>&1; do sleep 2;done + @echo "DFU $@" + $(Q) $(PYTHON) scripts/device/dfu.py -u $(word 2,$^) | sleep 2 + $(Q) $(PYTHON) scripts/device/dfu.py -u $(word 1,$^) +