From e1a863cdf62d7a7f68f4307f40e95dc254d9a97b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=89milie=20Feral?= Date: Mon, 15 Jul 2019 14:10:26 +0200 Subject: [PATCH] [scripts] Fix epsilon_flash target for n0100 (get rid of dfu-utils dependency) --- scripts/targets.device.mak | 10 ---------- scripts/targets.device.n0100.mak | 8 ++++++++ 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/scripts/targets.device.mak b/scripts/targets.device.mak index af1ac8c60..820af7ae7 100644 --- a/scripts/targets.device.mak +++ b/scripts/targets.device.mak @@ -42,16 +42,6 @@ $(BUILD_DIR)/%.map: $(BUILD_DIR)/%.elf $(Q) awk -f scripts/device/memory_map.awk < $< @echo "===============================" -# TODO: update the flash process for N0110 -.PHONY: %_flash -%_flash: $(BUILD_DIR)/%.bin - @echo "DFU $@" - @echo "INFO About to flash your device. Please plug your device to your computer" - @echo " using an USB cable and press the RESET button the back of your device." - @until dfu-util -l | grep "Flash" > /dev/null 2>&1; do sleep 1;done - @echo "DFU $@" - $(Q) dfu-util -i 0 -a 0 -s 0x08000000:leave -D $< - .PHONY: openocd openocd: openocd -f scripts/$(PLATFORM)/openocd.$(MODEL).cfg diff --git a/scripts/targets.device.n0100.mak b/scripts/targets.device.n0100.mak index e69de29bb..6be3f82c2 100644 --- a/scripts/targets.device.n0100.mak +++ b/scripts/targets.device.n0100.mak @@ -0,0 +1,8 @@ +.PHONY: %_flash +%_flash: $(BUILD_DIR)/%.dfu + @echo "DFU $@" + @echo "INFO About to flash your device. Please plug your device to your computer" + @echo " using an USB cable and press the RESET button 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 -m -u $<