mirror of
https://github.com/espressif/esp-idf.git
synced 2025-09-30 19:19:21 +00:00
bootloader: add a config to enable flashing of bootloader using
the command `idf.py flash` when secure boot v2 is enabled.
This commit is contained in:
@@ -7,8 +7,9 @@ endif()
|
||||
|
||||
add_dependencies(bootloader partition_table_bin)
|
||||
|
||||
# When secure boot is enabled, do not flash bootloader along with invocation of `idf.py flash`
|
||||
if(NOT CONFIG_SECURE_BOOT)
|
||||
# When secure boot is enabled and CONFIG_SECURE_BOOT_FLASH_BOOTLOADER_DEFAULT is not enabled
|
||||
# do not flash the bootloader along with the other artifacts using the command `idf.py flash`
|
||||
if(NOT CONFIG_SECURE_BOOT OR CONFIG_SECURE_BOOT_FLASH_BOOTLOADER_DEFAULT)
|
||||
set(flash_bootloader FLASH_IN_PROJECT)
|
||||
endif()
|
||||
|
||||
@@ -18,7 +19,7 @@ esptool_py_flash_target_image(bootloader-flash bootloader
|
||||
"${BOOTLOADER_BUILD_DIR}/bootloader.bin")
|
||||
|
||||
# Also attach an image to the project flash target
|
||||
if(NOT CONFIG_SECURE_BOOT)
|
||||
if(NOT CONFIG_SECURE_BOOT OR CONFIG_SECURE_BOOT_FLASH_BOOTLOADER_DEFAULT)
|
||||
esptool_py_flash_target_image(flash bootloader
|
||||
${CONFIG_BOOTLOADER_OFFSET_IN_FLASH}
|
||||
"${BOOTLOADER_BUILD_DIR}/bootloader.bin")
|
||||
|
Reference in New Issue
Block a user