kopia lustrzana https://github.com/espressif/esp-idf
esptool: Add support for ESP32-S2 Secure Download Mode
* Pass --no-stub from build system if configured to enable ESP32-S2 Secure Download Mode * Update esptool submodulepull/5452/head
rodzic
f64ae4fa99
commit
d45eabe676
|
@ -27,7 +27,11 @@ if(NOT BOOTLOADER_BUILD)
|
||||||
set(ESPTOOLPY_BEFORE "${CONFIG_ESPTOOLPY_BEFORE}")
|
set(ESPTOOLPY_BEFORE "${CONFIG_ESPTOOLPY_BEFORE}")
|
||||||
set(ESPTOOLPY_AFTER "${CONFIG_ESPTOOLPY_AFTER}")
|
set(ESPTOOLPY_AFTER "${CONFIG_ESPTOOLPY_AFTER}")
|
||||||
set(ESPTOOLPY_CHIP "${target}")
|
set(ESPTOOLPY_CHIP "${target}")
|
||||||
set(ESPTOOLPY_WITH_STUB TRUE)
|
if(CONFIG_ESPTOOLPY_WITH_STUB)
|
||||||
|
set(ESPTOOLPY_WITH_STUB true)
|
||||||
|
else()
|
||||||
|
set(ESPTOOLPY_WITH_STUB false)
|
||||||
|
endif()
|
||||||
|
|
||||||
if(CONFIG_SECURE_BOOT OR CONFIG_SECURE_FLASH_ENC_ENABLED)
|
if(CONFIG_SECURE_BOOT OR CONFIG_SECURE_FLASH_ENC_ENABLED)
|
||||||
# If security enabled then override post flash option
|
# If security enabled then override post flash option
|
||||||
|
|
|
@ -54,6 +54,12 @@ menu "Serial flasher config"
|
||||||
decompress it on the fly before flashing it. For most payloads, this should result in a
|
decompress it on the fly before flashing it. For most payloads, this should result in a
|
||||||
speed increase.
|
speed increase.
|
||||||
|
|
||||||
|
config ESPTOOLPY_WITH_STUB
|
||||||
|
# Only real reason to disable this is when ESP32-S2 Secure Download Mode is set
|
||||||
|
bool
|
||||||
|
default "y"
|
||||||
|
depends on !SECURE_ENABLE_SECURE_ROM_DL_MODE
|
||||||
|
|
||||||
choice ESPTOOLPY_FLASHMODE
|
choice ESPTOOLPY_FLASHMODE
|
||||||
prompt "Flash SPI mode"
|
prompt "Flash SPI mode"
|
||||||
default ESPTOOLPY_FLASHMODE_DIO
|
default ESPTOOLPY_FLASHMODE_DIO
|
||||||
|
|
|
@ -1 +1 @@
|
||||||
Subproject commit 988b9a24414bba694ae9994728865148ee95848a
|
Subproject commit 5eada56341f3a74c3e09eef3b1266f1072145059
|
|
@ -16,7 +16,7 @@
|
||||||
"extra_esptool_args" : {
|
"extra_esptool_args" : {
|
||||||
"after" : "${ESPTOOLPY_AFTER}",
|
"after" : "${ESPTOOLPY_AFTER}",
|
||||||
"before" : "${ESPTOOLPY_BEFORE}",
|
"before" : "${ESPTOOLPY_BEFORE}",
|
||||||
"stub" : "${ESPTOOLPY_WITH_STUB}",
|
"stub" : ${ESPTOOLPY_WITH_STUB},
|
||||||
"chip" : "${ESPTOOLPY_CHIP}"
|
"chip" : "${ESPTOOLPY_CHIP}"
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -153,6 +153,9 @@ else()
|
||||||
list(APPEND esptool_flash_main_args "--after=${CONFIG_ESPTOOLPY_AFTER}")
|
list(APPEND esptool_flash_main_args "--after=${CONFIG_ESPTOOLPY_AFTER}")
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(NOT CONFIG_ESPTOOLPY_WITH_STUB)
|
||||||
|
list(APPEND esptool_flash_main_args "--no-stub")
|
||||||
|
endif()
|
||||||
|
|
||||||
idf_component_set_property(esptool_py FLASH_ARGS "${esptool_flash_main_args}")
|
idf_component_set_property(esptool_py FLASH_ARGS "${esptool_flash_main_args}")
|
||||||
idf_component_set_property(esptool_py FLASH_SUB_ARGS "${ESPTOOLPY_FLASH_OPTIONS}")
|
idf_component_set_property(esptool_py FLASH_SUB_ARGS "${ESPTOOLPY_FLASH_OPTIONS}")
|
||||||
|
|
Ładowanie…
Reference in New Issue