espressif:esp32: Add multi image support
Changes on configuration and flash area organization for supporting
multi image and implementation for booting on different processors
on esp32
Signed-off-by: Almir Okato <almir.okato@espressif.com>
diff --git a/boot/espressif/hal/include/esp32/esp32.cmake b/boot/espressif/hal/include/esp32/esp32.cmake
index e26b6c3..7d3776e 100644
--- a/boot/espressif/hal/include/esp32/esp32.cmake
+++ b/boot/espressif/hal/include/esp32/esp32.cmake
@@ -10,6 +10,12 @@
${esp_idf_dir}/components/efuse/src/esp_efuse_api_key_esp32.c
)
+if (DEFINED CONFIG_ESP_MULTI_PROCESSOR_BOOT)
+ list(APPEND hal_srcs
+ ${src_dir}/${MCUBOOT_TARGET}/app_cpu_start.c
+ )
+endif()
+
list(APPEND LINKER_SCRIPTS
-T${esp_idf_dir}/components/esp_rom/${MCUBOOT_TARGET}/ld/${MCUBOOT_TARGET}.rom.newlib-funcs.ld
-T${esp_idf_dir}/components/esp_rom/${MCUBOOT_TARGET}/ld/${MCUBOOT_TARGET}.rom.eco3.ld