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 submodule
pull/5452/head
Angus Gratton 2020-04-25 16:44:27 +10:00 zatwierdzone przez Angus Gratton
rodzic f64ae4fa99
commit d45eabe676
5 zmienionych plików z 16 dodań i 3 usunięć

Wyświetl plik

@ -27,7 +27,11 @@ if(NOT BOOTLOADER_BUILD)
set(ESPTOOLPY_BEFORE "${CONFIG_ESPTOOLPY_BEFORE}")
set(ESPTOOLPY_AFTER "${CONFIG_ESPTOOLPY_AFTER}")
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 security enabled then override post flash option

Wyświetl plik

@ -54,6 +54,12 @@ menu "Serial flasher config"
decompress it on the fly before flashing it. For most payloads, this should result in a
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
prompt "Flash SPI mode"
default ESPTOOLPY_FLASHMODE_DIO

@ -1 +1 @@
Subproject commit 988b9a24414bba694ae9994728865148ee95848a
Subproject commit 5eada56341f3a74c3e09eef3b1266f1072145059

Wyświetl plik

@ -16,7 +16,7 @@
"extra_esptool_args" : {
"after" : "${ESPTOOLPY_AFTER}",
"before" : "${ESPTOOLPY_BEFORE}",
"stub" : "${ESPTOOLPY_WITH_STUB}",
"stub" : ${ESPTOOLPY_WITH_STUB},
"chip" : "${ESPTOOLPY_CHIP}"
}
}

Wyświetl plik

@ -153,6 +153,9 @@ else()
list(APPEND esptool_flash_main_args "--after=${CONFIG_ESPTOOLPY_AFTER}")
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_SUB_ARGS "${ESPTOOLPY_FLASH_OPTIONS}")