aboutsummaryrefslogtreecommitdiff
path: root/tmk_core/chibios.mk
diff options
context:
space:
mode:
authorPurdea Andrei <andrei@purdea.ro>2021-06-16 07:20:44 +0300
committerGitHub <noreply@github.com>2021-06-16 14:20:44 +1000
commited0451bc28dc5ffcc3031bf9918a25e9fb8db2f7 (patch)
tree9f9f28329413adfa7c62bfe0219a346d87880b29 /tmk_core/chibios.mk
parent22cd151fc359f48d75e361bd46a25ab6b40425fa (diff)
downloadqmk_firmware-ed0451bc28dc5ffcc3031bf9918a25e9fb8db2f7.tar.gz
qmk_firmware-ed0451bc28dc5ffcc3031bf9918a25e9fb8db2f7.zip
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.
Diffstat (limited to 'tmk_core/chibios.mk')
-rw-r--r--tmk_core/chibios.mk13
1 files changed, 9 insertions, 4 deletions
diff --git a/tmk_core/chibios.mk b/tmk_core/chibios.mk
index cdf9ba649..97299b7d3 100644
--- a/tmk_core/chibios.mk
+++ b/tmk_core/chibios.mk
@@ -341,10 +341,15 @@ ST_LINK_CLI ?= st-link_cli
341ST_FLASH ?= st-flash 341ST_FLASH ?= st-flash
342 342
343define EXEC_DFU_UTIL 343define EXEC_DFU_UTIL
344 until $(DFU_UTIL) -l | grep -q "Found DFU"; do\ 344 if ! $(DFU_UTIL) -l | grep -q "Found DFU"; then \
345 printf "$(MSG_BOOTLOADER_NOT_FOUND)" ;\ 345 printf "$(MSG_BOOTLOADER_NOT_FOUND_QUICK_RETRY)" ;\
346 sleep 5 ;\ 346 sleep $(BOOTLOADER_RETRY_TIME) ;\
347 done 347 while ! $(DFU_UTIL) -l | grep -q "Found DFU"; do \
348 printf "." ;\
349 sleep $(BOOTLOADER_RETRY_TIME) ;\
350 done ;\
351 printf "\n" ;\
352 fi
348 $(DFU_UTIL) $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin 353 $(DFU_UTIL) $(DFU_ARGS) -D $(BUILD_DIR)/$(TARGET).bin
349endef 354endef
350 355