Make atmel-dfu and chibios-dfu flashing behave more like caterina flashing. (#12552)
This commit makes atmel-dfu and chibios-dfu bootloaders retry to detect the bootloader every 0,5 seconds (now configurable via the BOOTLOADER_RETRY_TIME makefile variable), and a period is printed after every try. This is a much more pleasant behaviour than the 5s retry timeout.
This commit is contained in:
parent
22cd151fc3
commit
ed0451bc28
3 changed files with 23 additions and 10 deletions
|
@ -341,10 +341,15 @@ ST_LINK_CLI ?= st-link_cli
|
|||
ST_FLASH ?= st-flash
|
||||
|
||||
define EXEC_DFU_UTIL
|
||||
until $(DFU_UTIL) -l | grep -q "Found DFU"; do\
|
||||
printf "$(MSG_BOOTLOADER_NOT_FOUND)" ;\
|
||||
sleep 5 ;\
|
||||
done
|
||||
if ! $(DFU_UTIL) -l | grep -q "Found DFU"; then \
|
||||
printf "$(MSG_BOOTLOADER_NOT_FOUND_QUICK_RETRY)" ;\
|
||||
sleep $(BOOTLOADER_RETRY_TIME) ;\
|
||||
while ! $(DFU_UTIL) -l | grep -q "Found DFU"; do \
|
||||
printf "." ;\
|
||||
sleep $(BOOTLOADER_RETRY_TIME) ;\
|
||||
done ;\
|
||||
printf "\n" ;\
|
||||
fi
|
||||
$(DFU_UTIL) $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin
|
||||
endef
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue