mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-02 11:10:54 +03:00
fix(dfu): retry dfu-util flash on macOS detach failure
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
co-authored by
Cursor
parent
4b94982cf4
commit
0c835d2141
@@ -23,6 +23,13 @@ endif()
|
||||
message("Command list: ${CMD}")
|
||||
execute_process(COMMAND ${CMD} RESULT_VARIABLE result)
|
||||
|
||||
# dfu-util may fail on the first attempt while switching from runtime to DFU mode,
|
||||
# e.g. with "Lost device after RESET?" on Windows/macOS. Retry once.
|
||||
if(${result} AND NOT ${ESP_DFU_LIST})
|
||||
message(WARNING "${TOOL} failed, retrying once...")
|
||||
execute_process(COMMAND ${CMD} RESULT_VARIABLE result)
|
||||
endif()
|
||||
|
||||
if(${result})
|
||||
message(FATAL_ERROR "${TOOL} failed")
|
||||
endif()
|
||||
|
||||
Reference in New Issue
Block a user