diff --git a/components/bootloader/CMakeLists.txt b/components/bootloader/CMakeLists.txt index 8ebd8e9051..7fe8d380f6 100644 --- a/components/bootloader/CMakeLists.txt +++ b/components/bootloader/CMakeLists.txt @@ -35,4 +35,9 @@ if(NOT CONFIG_SECURE_BOOT OR CONFIG_SECURE_BOOT_FLASH_BOOTLOADER_DEFAULT) # Add bootloader as a dependency to the flash target add_dependencies(flash bootloader) + + if(CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT) + # Also add bootloader as a dependency to the encrypted-flash target + add_dependencies(encrypted-flash bootloader) + endif() endif() diff --git a/components/esp_tee/CMakeLists.txt b/components/esp_tee/CMakeLists.txt index 320931b4a8..4de8494187 100644 --- a/components/esp_tee/CMakeLists.txt +++ b/components/esp_tee/CMakeLists.txt @@ -28,6 +28,10 @@ else() endif() add_dependencies(esp_tee partition_table_bin) add_dependencies(flash esp_tee) + if(CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT) + # Also add ESP-TEE binary as a dependency to the encrypted-flash target + add_dependencies(encrypted-flash esp_tee) + endif() set(image_file ${TEE_BUILD_DIR}/esp_tee.bin) partition_table_get_partition_info(offset "--partition-name ${partition}" "offset") esptool_py_flash_target_image(flash "${partition}" "${offset}" "${image_file}") diff --git a/components/partition_table/CMakeLists.txt b/components/partition_table/CMakeLists.txt index fca05efc85..53154d612f 100644 --- a/components/partition_table/CMakeLists.txt +++ b/components/partition_table/CMakeLists.txt @@ -177,5 +177,11 @@ if(CONFIG_APP_BUILD_GENERATE_BINARIES AND CONFIG_APP_BUILD_TYPE_APP_2NDBOOT) # Add partition table as a dependency to the flash target add_dependencies(flash partition_table_bin) + + if(CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT) + # Also add partition table as a dependency to the encrypted-flash target + add_dependencies(encrypted-flash partition_table_bin) + endif() + add_deprecated_target_alias(partition_table-flash partition-table-flash) endif()