From df31f0ce3406f27c04c0ab6a8b0bbdfe197a3ea5 Mon Sep 17 00:00:00 2001 From: Romain Goyet Date: Wed, 6 Sep 2017 09:32:12 +0200 Subject: [PATCH] Improve the app_flash command We now display a small inline tutorial, and wait for a device to be connected --- build/platform.device.mak | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/build/platform.device.mak b/build/platform.device.mak index b10ec2e4e..e55cb6666 100644 --- a/build/platform.device.mak +++ b/build/platform.device.mak @@ -12,4 +12,9 @@ EXE = elf .PHONY: %_flash %_flash: %.bin - dfu-util -i 0 -a 0 -s 0x08000000:leave -D $< + @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 "Internal Flash" &> /dev/null; do sleep 1;done + @echo "DFU $@" + @dfu-util -i 0 -a 0 -s 0x08000000:leave -D $<