Commit 42e679d6 authored by Almir Okato's avatar Almir Okato Committed by Fabio Utzig
Browse files

espressif:esp32s3: Add esp32s3 initial support



ESP32-S3 target and related files added to the Espressif port.

Signed-off-by: default avatarAlmir Okato <almir.okato@espressif.com>
parent 553315c1
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -18,7 +18,7 @@ jobs:
  environment:
    strategy:
      matrix:
        targets: [esp32, esp32s2, esp32c3]
        targets: [esp32, esp32s2, esp32s3, esp32c3]
        features:
        - "sign-rsa2048,sign-rsa3072,sign-ec256,sign-ed25519"
    runs-on: ubuntu-latest
+1 −1
Original line number Diff line number Diff line
@@ -25,4 +25,4 @@
[submodule "boot/espressif/hal/esp-idf"]
	path = boot/espressif/hal/esp-idf
	url = https://github.com/espressif/esp-idf.git
	branch = release/v4.3
	branch = release/v4.4
+2 −1
Original line number Diff line number Diff line
@@ -13,7 +13,8 @@ project(mcuboot_${MCUBOOT_TARGET})
add_definitions(-DMCUBOOT_TARGET=${MCUBOOT_TARGET})

if ("${MCUBOOT_TARGET}" STREQUAL "esp32" OR
    "${MCUBOOT_TARGET}" STREQUAL "esp32s2")
    "${MCUBOOT_TARGET}" STREQUAL "esp32s2" OR
    "${MCUBOOT_TARGET}" STREQUAL "esp32s3")
    set(MCUBOOT_ARCH "xtensa")
elseif("${MCUBOOT_TARGET}" STREQUAL "esp32c3")
    set(MCUBOOT_ARCH "riscv")
+6 −24
Original line number Diff line number Diff line
@@ -19,14 +19,17 @@ list(APPEND include_dirs
    ${esp_idf_dir}/components/esp_common/include
    ${esp_idf_dir}/components/esp_rom/include
    ${esp_idf_dir}/components/esp_rom/include/${MCUBOOT_TARGET}
    ${esp_idf_dir}/components/esp_rom/${MCUBOOT_TARGET}
    ${esp_idf_dir}/components/spi_flash/include
    ${esp_idf_dir}/components/spi_flash/include/spi_flash
    ${esp_idf_dir}/components/soc/include
    ${esp_idf_dir}/components/soc/${MCUBOOT_TARGET}/include
    ${esp_idf_dir}/components/esp_hw_support/include
    ${esp_idf_dir}/components/esp_hw_support/include/soc
    ${esp_idf_dir}/components/esp_hw_support/include/soc/${MCUBOOT_TARGET}
    ${esp_idf_dir}/components/esp_hw_support/port/include
    ${esp_idf_dir}/components/esp_hw_support/port/${MCUBOOT_TARGET}
    ${esp_idf_dir}/components/esp_hw_support/port/${MCUBOOT_TARGET}/private_include
    ${esp_idf_dir}/components/soc/include
    ${esp_idf_dir}/components/soc/${MCUBOOT_TARGET}/include
    ${esp_idf_dir}/components/bootloader_support/include
    ${esp_idf_dir}/components/bootloader_support/include_bootloader
    ${esp_idf_dir}/components/hal/include
@@ -41,12 +44,6 @@ list(APPEND include_dirs
    ${esp_idf_dir}/components/newlib/platform_include
    )

if("${MCUBOOT_TARGET}" STREQUAL "esp32")
    list(APPEND include_dirs
        ${esp_idf_dir}/components/${MCUBOOT_TARGET}/include
        )
endif()

if("${MCUBOOT_ARCH}" STREQUAL "xtensa")
    list(APPEND include_dirs
        ${esp_idf_dir}/components/${MCUBOOT_ARCH}/${MCUBOOT_TARGET}/include
@@ -72,6 +69,7 @@ set(hal_srcs
    ${esp_idf_dir}/components/bootloader_support/src/bootloader_utility.c
    ${esp_idf_dir}/components/bootloader_support/src/esp_image_format.c
    ${esp_idf_dir}/components/bootloader_support/src/secure_boot_v2/secure_boot_signatures_bootloader.c
    ${esp_idf_dir}/components/bootloader_support/src/${MCUBOOT_TARGET}/bootloader_soc.c
    ${esp_idf_dir}/components/bootloader_support/src/${MCUBOOT_TARGET}/bootloader_sha.c
    ${esp_idf_dir}/components/bootloader_support/src/${MCUBOOT_TARGET}/secure_boot_secure_features.c
    ${esp_idf_dir}/components/bootloader_support/src/${MCUBOOT_TARGET}/flash_encryption_secure_features.c
@@ -93,16 +91,6 @@ set(hal_srcs
    ${esp_idf_dir}/components/efuse/${MCUBOOT_TARGET}/esp_efuse_utility.c
    )

if("${MCUBOOT_TARGET}" STREQUAL "esp32")
    list(APPEND hal_srcs
        ${esp_idf_dir}/components/efuse/src/esp_efuse_api_key_esp32.c
        )
else()
    list(APPEND hal_srcs
        ${esp_idf_dir}/components/efuse/src/esp_efuse_api_key_esp32xx.c
        )
endif()

if("${MCUBOOT_ARCH}" STREQUAL "xtensa")
    list(APPEND hal_srcs
        ${esp_idf_dir}/components/esp_rom/patches/esp_rom_longjmp.S
@@ -165,12 +153,6 @@ set(LINKER_SCRIPTS
    -T${esp_idf_dir}/components/soc/${MCUBOOT_TARGET}/ld/${MCUBOOT_TARGET}.peripherals.ld
    )

if("${MCUBOOT_TARGET}" STREQUAL "esp32" OR "${MCUBOOT_TARGET}" STREQUAL "esp32c3")
    list(APPEND LINKER_SCRIPTS
        -T${esp_idf_dir}/components/esp_rom/${MCUBOOT_TARGET}/ld/${MCUBOOT_TARGET}.rom.eco3.ld
        )
endif()

include(${CMAKE_CURRENT_LIST_DIR}/include/${MCUBOOT_TARGET}/${MCUBOOT_TARGET}.cmake)

add_library(hal STATIC ${hal_srcs} ${include_dirs})
Compare e104dd7f to 8153bfe4
Original line number Diff line number Diff line
Subproject commit e104dd7f27d2e73ab0e9b614dd7b9295099069bf
Subproject commit 8153bfe4125e6a608abccf1561fd10285016c90a
Loading