Merge branch 'feat/introduce_esp32s31' into 'master'

feat(esp32s31): Introduce new target esp32s31

See merge request espressif/esp-idf!43316
This commit is contained in:
C.S.M
2025-11-18 15:55:16 +08:00
36 changed files with 31 additions and 11 deletions
+8
View File
@@ -151,6 +151,13 @@ mainmenu "Espressif IoT Development Framework Configuration"
select IDF_ENV_BRINGUP
select IDF_ENV_FPGA if ESP32H4_SELECTS_REV_MP
config IDF_TARGET_ESP32S31
bool
default "y" if IDF_TARGET="esp32s31"
select IDF_TARGET_ARCH_RISCV
select IDF_ENV_FPGA
select IDF_ENV_BRINGUP
config IDF_TARGET_LINUX
bool
default "y" if IDF_TARGET="linux"
@@ -169,6 +176,7 @@ mainmenu "Espressif IoT Development Framework Configuration"
default 0x0014 if IDF_TARGET_ESP32C61
default 0x0019 if IDF_TARGET_ESP32H21
default 0x001C if IDF_TARGET_ESP32H4
default 0x0020 if IDF_TARGET_ESP32S31
default 0xFFFF
+5 -3
View File
@@ -1,11 +1,13 @@
idf_build_get_property(target IDF_TARGET)
set(includes)
list(APPEND includes "${target}/include")
list(APPEND includes "include")
set(srcs)
set(include "include")
if(EXISTS "${CMAKE_CURRENT_LIST_DIR}/${target}/include")
list(APPEND includes "${target}/include")
endif()
list(APPEND includes "include")
set(target_folder "${target}")
# I2C related source files
@@ -32,6 +32,7 @@ typedef enum {
CHIP_ESP32C5 = 23, //!< ESP32-C5
CHIP_ESP32H21 = 25, //!< ESP32-H21
CHIP_ESP32H4 = 28, //!< ESP32-H4
CHIP_ESP32S31 = 32, //!< ESP32-S31
CHIP_POSIX_LINUX = 999, //!< The code is running on POSIX/Linux simulator
} esp_chip_model_t;
+1 -1
View File
@@ -16,7 +16,7 @@ if(CONFIG_IDF_TOOLCHAIN_GCC)
set(_march "rv32imac_zicsr_zifencei_zaamo_zalrsc")
elseif(CONFIG_IDF_TARGET_ESP32H4)
set(_march "rv32imafcb_zicsr_zifencei_zaamo_zalrsc")
elseif(CONFIG_IDF_TARGET_ESP32P4)
elseif(CONFIG_IDF_TARGET_ESP32P4 OR CONFIG_IDF_TARGET_ESP32S31)
set(_march "rv32imafc_zicsr_zifencei_zaamo_zalrsc")
elseif(NOT(CONFIG_IDF_TARGET_ESP32S2 OR CONFIG_IDF_TARGET_ESP32S3))
message(FATAL_ERROR "Unknown Espressif target: ${CONFIG_IDF_TARGET}")
@@ -47,7 +47,7 @@ components/spi_flash/test_apps/flash_mmap:
- spi_flash
- esp_hal_mspi
enable:
- if: CONFIG_NAME == "release" and IDF_TARGET != "linux"
- if: CONFIG_NAME == "release" and IDF_TARGET not in ["linux", "esp32s31"]
- if: CONFIG_NAME == "rom_impl" and ESP_ROM_HAS_SPI_FLASH == 1
- if: CONFIG_NAME == "psram" and SOC_MMU_PER_EXT_MEM_TARGET == 1 # MMU per target needs test. On unified MMU chips, the entry ID is unique
- if: CONFIG_NAME == "xip_psram" and SOC_SPIRAM_XIP_SUPPORTED == 1
+1
View File
@@ -34,6 +34,7 @@ USUAL_TO_FORMAL = {
'esp32c61': 'ESP32-C61',
'esp32h21': 'ESP32-H21',
'esp32h4': 'ESP32-H4',
'esp32s31': 'ESP32-S31',
'linux': 'Linux',
}
+2
View File
@@ -25,6 +25,8 @@ function(__add_dfu_targets)
return()
elseif("${target}" STREQUAL "esp32h4")
return()
elseif("${target}" STREQUAL "esp32s31")
return()
elseif("${target}" STREQUAL "esp32p4")
set(dfu_pid "12")
elseif("${target}" STREQUAL "linux")
+2
View File
@@ -0,0 +1,2 @@
set(_CMAKE_TOOLCHAIN_PREFIX riscv32-esp-elf-)
include($ENV{IDF_PATH}/tools/cmake/toolchain.cmake)
+1 -1
View File
@@ -50,4 +50,4 @@ SUPPORTED_TARGETS = [
'esp32c5',
'esp32c61',
]
PREVIEW_TARGETS = ['linux', 'esp32h21', 'esp32h4']
PREVIEW_TARGETS = ['linux', 'esp32h21', 'esp32h4', 'esp32s31']
@@ -2,7 +2,7 @@
tools/test_apps/security/secure_boot:
enable:
- if: CONFIG_NAME == "qemu"
- if: CONFIG_NAME == "qemu" and IDF_TARGET not in ["esp32s31"] #IDF-14442
reason: the test can only run on an FPGA as efuses need to be reset during the test.
disable:
- if: CONFIG_NAME != "qemu" or IDF_TARGET == "linux"
+8 -4
View File
@@ -97,7 +97,8 @@
"esp32p4",
"esp32c61",
"esp32h21",
"esp32h4"
"esp32h4",
"esp32s31"
],
"version_cmd": [
"riscv32-esp-elf-gdb-no-python",
@@ -256,7 +257,8 @@
"esp32p4",
"esp32c61",
"esp32h21",
"esp32h4"
"esp32h4",
"esp32s31"
],
"version_cmd": [
"clang",
@@ -321,7 +323,8 @@
"esp32h2",
"esp32p4",
"esp32c61",
"esp32h21"
"esp32h21",
"esp32s31"
],
"tool_info_file": "esp-clang/esp-clang-libs.info",
"version_cmd": [],
@@ -387,7 +390,8 @@
"esp32c61",
"esp32p4",
"esp32h21",
"esp32h4"
"esp32h4",
"esp32s31"
],
"version_cmd": [
"riscv32-esp-elf-gcc",