mirror of
https://github.com/espressif/esp-idf.git
synced 2026-10-03 03:31:41 +03:00
Merge branch 'feat/support_esp32s31_dfu' into 'master'
Feat/support esp32s31 dfu See merge request espressif/esp-idf!49329
This commit is contained in:
@@ -25,10 +25,10 @@ function(__add_dfu_targets)
|
||||
return()
|
||||
elseif("${target}" STREQUAL "esp32h4")
|
||||
return()
|
||||
elseif("${target}" STREQUAL "esp32s31")
|
||||
return()
|
||||
elseif("${target}" STREQUAL "esp32p4")
|
||||
set(dfu_pid "12")
|
||||
elseif("${target}" STREQUAL "esp32s31")
|
||||
set(dfu_pid "20")
|
||||
elseif("${target}" STREQUAL "linux")
|
||||
return()
|
||||
else()
|
||||
|
||||
@@ -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()
|
||||
|
||||
@@ -65,6 +65,8 @@ function(idf_create_dfu binary)
|
||||
set(dfu_pid "9")
|
||||
elseif("${target}" STREQUAL "esp32p4")
|
||||
set(dfu_pid "12")
|
||||
elseif("${target}" STREQUAL "esp32s31")
|
||||
set(dfu_pid "20")
|
||||
else()
|
||||
# DFU not supported on this target
|
||||
idf_msg("DFU not supported on ${target}, skipping DFU target creation")
|
||||
|
||||
Reference in New Issue
Block a user