espressif: remove IDF git submodule and add its reference by param
Remove the ESP-IDF from git submodules to avoid potential
duplicated repo clones on the user system. IDF HAL code is still
a dependency for Espressif port, therefore now the HAL code
reference needs to be passed by parameter when building.
The Espressif port was also updated to work with last v5.1 IDF
code.
Signed-off-by: Almir Okato <almir.okato@espressif.com>
diff --git a/boot/espressif/port/esp_mcuboot.c b/boot/espressif/port/esp_mcuboot.c
index ea0661f..0ee9e38 100644
--- a/boot/espressif/port/esp_mcuboot.c
+++ b/boot/espressif/port/esp_mcuboot.c
@@ -212,7 +212,11 @@
static bool aligned_flash_write(size_t dest_addr, const void *src, size_t size)
{
- bool flash_encryption_enabled = esp_flash_encryption_enabled();
+#ifdef CONFIG_SECURE_FLASH_ENC_ENABLED
+ bool flash_encryption_enabled = esp_flash_encryption_enabled();
+#else
+ bool flash_encryption_enabled = false;
+#endif
if (IS_ALIGNED(dest_addr, 4) && IS_ALIGNED((uintptr_t)src, 4) && IS_ALIGNED(size, 4)) {
/* A single write operation is enough when all parameters are aligned */
@@ -327,7 +331,11 @@
static size_t align = 0;
if (align == 0) {
+#ifdef CONFIG_SECURE_FLASH_ENC_ENABLED
bool flash_encryption_enabled = esp_flash_encryption_enabled();
+#else
+ bool flash_encryption_enabled = false;
+#endif
if (flash_encryption_enabled) {
align = 32;