From b794d335a490fa8b3076078777bacc3fa9537317 Mon Sep 17 00:00:00 2001 From: Sylvio Alves Date: Mon, 4 Mar 2024 10:08:30 -0300 Subject: [PATCH] espressif: modify SOC_FAMILY according to new HWMv2 Update FAMILY reference as needed. Signed-off-by: Sylvio Alves --- boot/zephyr/Kconfig | 2 +- boot/zephyr/flash_map_extended.c | 2 +- boot/zephyr/include/target.h | 2 +- boot/zephyr/main.c | 12 ++++++------ 4 files changed, 9 insertions(+), 9 deletions(-) diff --git a/boot/zephyr/Kconfig b/boot/zephyr/Kconfig index 908b793cf..fc211c369 100644 --- a/boot/zephyr/Kconfig +++ b/boot/zephyr/Kconfig @@ -722,7 +722,7 @@ config MULTITHREADING default y if BOOT_SERIAL_CDC_ACM #usb driver requires MULTITHREADING default y if BOOT_USB_DFU_GPIO || BOOT_USB_DFU_WAIT default n if SOC_FAMILY_NRF - default n if SOC_FAMILY_ESP32 && MCUBOOT + default n if SOC_FAMILY_ESPRESSIF_ESP32 && MCUBOOT default y config LOG_PROCESS_THREAD diff --git a/boot/zephyr/flash_map_extended.c b/boot/zephyr/flash_map_extended.c index 64e80085c..d0744afbd 100644 --- a/boot/zephyr/flash_map_extended.c +++ b/boot/zephyr/flash_map_extended.c @@ -28,7 +28,7 @@ BOOT_LOG_MODULE_DECLARE(mcuboot); #define FLASH_DEVICE_BASE 0 #define FLASH_DEVICE_NODE DT_INST(0, jedec_spi_nor) -#elif defined(CONFIG_SOC_FAMILY_ESP32) +#elif defined(CONFIG_SOC_FAMILY_ESPRESSIF_ESP32) #define FLASH_DEVICE_ID SPI_FLASH_0_ID #define FLASH_DEVICE_BASE 0 diff --git a/boot/zephyr/include/target.h b/boot/zephyr/include/target.h index 61dfd9322..9bbfd4b19 100644 --- a/boot/zephyr/include/target.h +++ b/boot/zephyr/include/target.h @@ -32,7 +32,7 @@ */ #if (!defined(CONFIG_XTENSA) && !DT_HAS_CHOSEN(zephyr_flash_controller)) || \ (defined(CONFIG_XTENSA) && !DT_NODE_EXISTS(DT_INST(0, jedec_spi_nor)) && \ - !defined(CONFIG_SOC_FAMILY_ESP32)) || \ + !defined(CONFIG_SOC_FAMILY_ESPRESSIF_ESP32)) || \ !defined(FLASH_ALIGN) || \ !(FIXED_PARTITION_EXISTS(slot0_partition)) || \ !(FIXED_PARTITION_EXISTS(slot1_partition) || CONFIG_SINGLE_APPLICATION_SLOT) || \ diff --git a/boot/zephyr/main.c b/boot/zephyr/main.c index c6a0f74ae..204c4308b 100644 --- a/boot/zephyr/main.c +++ b/boot/zephyr/main.c @@ -42,7 +42,7 @@ #include "flash_map_backend/flash_map_backend.h" /* Check if Espressif target is supported */ -#ifdef CONFIG_SOC_FAMILY_ESP32 +#ifdef CONFIG_SOC_FAMILY_ESPRESSIF_ESP32 #include #include @@ -63,7 +63,7 @@ #define IMAGE1_PRIMARY_SIZE \ DT_PROP_BY_IDX(DT_NODE_BY_FIXED_PARTITION_LABEL(image_1), reg, 1) -#endif /* CONFIG_SOC_FAMILY_ESP32 */ +#endif /* CONFIG_SOC_FAMILY_ESPRESSIF_ESP32 */ #ifdef CONFIG_MCUBOOT_SERIAL #include "boot_serial/boot_serial.h" @@ -225,7 +225,7 @@ static void do_boot(struct boot_rsp *rsp) #elif defined(CONFIG_XTENSA) || defined(CONFIG_RISCV) -#ifndef CONFIG_SOC_FAMILY_ESP32 +#ifndef CONFIG_SOC_FAMILY_ESPRESSIF_ESP32 #define SRAM_BASE_ADDRESS 0xBE030000 @@ -254,7 +254,7 @@ static void copy_img_to_SRAM(int slot, unsigned int hdr_offset) done: flash_area_close(fap); } -#endif /* !CONFIG_SOC_FAMILY_ESP32 */ +#endif /* !CONFIG_SOC_FAMILY_ESPRESSIF_ESP32 */ /* Entry point (.ResetVector) is at the very beginning of the image. * Simply copy the image to a suitable location and jump there. @@ -266,7 +266,7 @@ static void do_boot(struct boot_rsp *rsp) BOOT_LOG_INF("br_image_off = 0x%x\n", rsp->br_image_off); BOOT_LOG_INF("ih_hdr_size = 0x%x\n", rsp->br_hdr->ih_hdr_size); -#ifdef CONFIG_SOC_FAMILY_ESP32 +#ifdef CONFIG_SOC_FAMILY_ESPRESSIF_ESP32 int slot = (rsp->br_image_off == IMAGE0_PRIMARY_START_ADDRESS) ? PRIMARY_SLOT : SECONDARY_SLOT; /* Load memory segments and start from entry point */ @@ -278,7 +278,7 @@ static void do_boot(struct boot_rsp *rsp) /* Jump to entry point */ start = (void *)(SRAM_BASE_ADDRESS + rsp->br_hdr->ih_hdr_size); ((void (*)(void))start)(); -#endif /* CONFIG_SOC_FAMILY_ESP32 */ +#endif /* CONFIG_SOC_FAMILY_ESPRESSIF_ESP32 */ } #else