Commit b794d335 authored by Sylvio Alves's avatar Sylvio Alves Committed by almir-okato
Browse files

espressif: modify SOC_FAMILY according to new HWMv2

Update FAMILY reference as needed.

Signed-off-by: default avatarSylvio Alves <sylvio.alves@espressif.com>
parent fefe701a
Loading
Loading
Loading
Loading
+1 −1
Changes for boot/zephyr/Kconfig: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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
+1 −1
Changes for boot/zephyr/flash_map_extended.c: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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
+1 −1
Changes for boot/zephyr/include/target.h: 1 added line, 1 removed line.
Original line number Diff line number Diff line
@@ -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) || \
+6 −6
Changes for boot/zephyr/main.c: 6 added lines, 6 removed lines.
Original line number Diff line number Diff line
@@ -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 <bootloader_init.h>
#include <esp_loader.h>
@@ -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