diff options
author | Purdea Andrei <andrei@purdea.ro> | 2021-06-16 07:20:44 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-06-16 14:20:44 +1000 |
commit | ed0451bc28dc5ffcc3031bf9918a25e9fb8db2f7 (patch) | |
tree | 9f9f28329413adfa7c62bfe0219a346d87880b29 /tmk_core/chibios.mk | |
parent | 22cd151fc359f48d75e361bd46a25ab6b40425fa (diff) | |
download | qmk_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.mk | 13 |
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 | |||
341 | ST_FLASH ?= st-flash | 341 | ST_FLASH ?= st-flash |
342 | 342 | ||
343 | define EXEC_DFU_UTIL | 343 | define 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 |
349 | endef | 354 | endef |
350 | 355 | ||