Merge branch 'feature/introduce_target_esp32c5' into 'master'

feat(esp32c5): introduce target esp32c5 (stage 1)

See merge request espressif/esp-idf!27299
This commit is contained in:
Kevin (Lao Kaiyao) 2023-11-29 20:31:34 +08:00
commit cd9d321062
32 changed files with 53 additions and 19 deletions

View File

@ -114,6 +114,13 @@ mainmenu "Espressif IoT Development Framework Configuration"
select FREERTOS_UNICORE
select IDF_TARGET_ARCH_RISCV
config IDF_TARGET_ESP32C5
bool
default "y" if IDF_TARGET="esp32c5"
select FREERTOS_UNICORE
select IDF_TARGET_ARCH_RISCV
select IDF_ENV_BRINGUP
config IDF_TARGET_ESP32P4
bool
default "y" if IDF_TARGET="esp32p4"
@ -139,6 +146,7 @@ mainmenu "Espressif IoT Development Framework Configuration"
default 0x000D if IDF_TARGET_ESP32C6
default 0x0010 if IDF_TARGET_ESP32H2
default 0x0012 if IDF_TARGET_ESP32P4
default 0x0013 if IDF_TARGET_ESP32C5
default 0xFFFF

View File

@ -21,6 +21,7 @@ typedef enum {
ESP_CHIP_ID_ESP32C6 = 0x000D, /*!< chip ID: ESP32-C6 */
ESP_CHIP_ID_ESP32H2 = 0x0010, /*!< chip ID: ESP32-H2 */
ESP_CHIP_ID_ESP32P4 = 0x0012, /*!< chip ID: ESP32-P4 */
ESP_CHIP_ID_ESP32C5 = 0x0013, /*!< chip ID: ESP32-C5 */
ESP_CHIP_ID_INVALID = 0xFFFF /*!< Invalid chip ID (we defined it to make sure the esp_chip_id_t is 2 bytes size) */
} __attribute__((packed)) esp_chip_id_t;

View File

@ -28,6 +28,7 @@ typedef enum {
CHIP_ESP32C6 = 13, //!< ESP32-C6
CHIP_ESP32H2 = 16, //!< ESP32-H2
CHIP_ESP32P4 = 18, //!< ESP32-P4
CHIP_ESP32C5 = 19, //!< ESP32-C5
CHIP_POSIX_LINUX = 999, //!< The code is running on POSIX/Linux simulator
} esp_chip_model_t;

View File

View File

View File

View File

View File

View File

@ -54,8 +54,8 @@ examples/system/deep_sleep_wake_stub:
reason: target(s) is not supported yet
examples/system/efuse:
enable:
- if: IDF_TARGET == "esp32" or (NIGHTLY_RUN == "1" and IDF_TARGET != "linux")
disable:
- if: IDF_TARGET != "esp32" and (NIGHTLY_RUN != "1" or IDF_TARGET == "linux")
reason: no target specific functionality, testing on a single target is sufficient
depends_components:
- efuse
@ -74,11 +74,9 @@ examples/system/esp_timer:
- esp_timer
examples/system/eventfd:
enable:
- if: IDF_TARGET == "esp32" or (NIGHTLY_RUN == "1" and IDF_TARGET != "linux")
reason: no target specific functionality, testing on a single target is sufficient
disable:
- if: SOC_GPTIMER_SUPPORTED != 1
- if: SOC_GPTIMER_SUPPORTED != 1 and (IDF_TARGET != "esp32" and (NIGHTLY_RUN != "1" or IDF_TARGET == "linux"))
reason: no target specific functionality, testing on a single target is sufficient
depends_components:
- vfs
- esp_driver_gptimer
@ -90,8 +88,8 @@ examples/system/flash_suspend:
reason: the other targets are not tested yet
examples/system/freertos:
enable:
- if: IDF_TARGET == "esp32" or (NIGHTLY_RUN == "1" and IDF_TARGET != "linux")
disable:
- if: IDF_TARGET != "esp32" and (NIGHTLY_RUN != "1" or IDF_TARGET == "linux")
reason: no target specific functionality, testing on a single target is sufficient
depends_components:
- freertos
@ -109,8 +107,8 @@ examples/system/gdbstub:
reason: not supported yet #TODO: IDF-7510
examples/system/heap_task_tracking:
enable:
- if: IDF_TARGET == "esp32c3" or (NIGHTLY_RUN == "1" and IDF_TARGET != "linux")
disable:
- if: IDF_TARGET != "esp32c3" and (NIGHTLY_RUN != "1" or IDF_TARGET == "linux")
reason: no target specific functionality, testing on a single target is sufficient
depends_components:
- heap
@ -201,15 +199,15 @@ examples/system/perfmon:
- perfmon
examples/system/pthread:
enable:
- if: IDF_TARGET == "esp32" or (NIGHTLY_RUN == "1" and IDF_TARGET != "linux")
disable:
- if: IDF_TARGET != "esp32" and (NIGHTLY_RUN != "1" or IDF_TARGET == "linux")
reason: no target specific functionality, testing on a single target is sufficient
depends_components:
- pthread
examples/system/select:
enable:
- if: IDF_TARGET == "esp32c3" or (NIGHTLY_RUN == "1" and IDF_TARGET != "linux")
disable:
- if: IDF_TARGET != "esp32c3" and (NIGHTLY_RUN != "1" or IDF_TARGET == "linux")
reason: no target specific functionality, testing on a single target is sufficient
depends_components:
- vfs
@ -237,8 +235,8 @@ examples/system/sysview_tracing_heap_log:
reason: lack of runners
examples/system/task_watchdog:
enable:
- if: IDF_TARGET == "esp32" or (NIGHTLY_RUN == "1" and IDF_TARGET != "linux")
disable:
- if: IDF_TARGET != "esp32" and (NIGHTLY_RUN != "1" or IDF_TARGET == "linux")
reason: no target specific functionality, testing on a single target is sufficient
depends_components:
- esp_system
@ -326,8 +324,8 @@ examples/system/ulp/ulp_riscv/uart_print:
- ulp
examples/system/unit_test/:
enable:
- if: IDF_TARGET == "esp32" or (NIGHTLY_RUN == "1" and IDF_TARGET != "linux")
disable:
- if: IDF_TARGET != "esp32" and (NIGHTLY_RUN != "1" or IDF_TARGET == "linux")
reason: no target specific functionality, testing on a single target is sufficient
depends_components:
- unity

View File

@ -31,6 +31,7 @@ USUAL_TO_FORMAL = {
'esp32c3': 'ESP32-C3',
'esp32c2': 'ESP32-C2',
'esp32c6': 'ESP32-C6',
'esp32c5': 'ESP32-C5',
'esp32h2': 'ESP32-H2',
'esp32p4': 'ESP32-P4',
'linux': 'Linux',
@ -43,6 +44,7 @@ FORMAL_TO_USUAL = {
'ESP32-C3': 'esp32c3',
'ESP32-C2': 'esp32c2',
'ESP32-C6': 'esp32c6',
'ESP32-C5': 'esp32c5',
'ESP32-H2': 'esp32h2',
'ESP32-P4': 'esp32p4',
'Linux': 'linux',

View File

@ -15,6 +15,8 @@ function(__add_dfu_targets)
return()
elseif("${target}" STREQUAL "esp32c6")
return()
elseif("${target}" STREQUAL "esp32c5")
return()
elseif("${target}" STREQUAL "esp32h2")
return()
elseif("${target}" STREQUAL "esp32p4")

View File

@ -0,0 +1,18 @@
include($ENV{IDF_PATH}/tools/cmake/utilities.cmake)
set(CMAKE_SYSTEM_NAME Generic)
set(CMAKE_C_COMPILER riscv32-esp-elf-gcc)
set(CMAKE_CXX_COMPILER riscv32-esp-elf-g++)
set(CMAKE_ASM_COMPILER riscv32-esp-elf-gcc)
set(_CMAKE_TOOLCHAIN_PREFIX riscv32-esp-elf-)
remove_duplicated_flags("-march=rv32imac_zicsr_zifencei ${CMAKE_C_FLAGS}" UNIQ_CMAKE_C_FLAGS)
set(CMAKE_C_FLAGS "${UNIQ_CMAKE_C_FLAGS}" CACHE STRING "C Compiler Base Flags" FORCE)
remove_duplicated_flags("-march=rv32imac_zicsr_zifencei ${CMAKE_CXX_FLAGS}" UNIQ_CMAKE_CXX_FLAGS)
set(CMAKE_CXX_FLAGS "${UNIQ_CMAKE_CXX_FLAGS}" CACHE STRING "C++ Compiler Base Flags" FORCE)
remove_duplicated_flags("-nostartfiles -march=rv32imac_zicsr_zifencei --specs=nosys.specs \
${CMAKE_EXE_LINKER_FLAGS}"
UNIQ_CMAKE_SAFE_EXE_LINKER_FLAGS)
set(CMAKE_EXE_LINKER_FLAGS "${UNIQ_CMAKE_SAFE_EXE_LINKER_FLAGS}" CACHE STRING "Linker Base Flags" FORCE)

View File

@ -33,7 +33,7 @@ if os.name != 'nt':
URL_TO_DOC = 'https://docs.espressif.com/projects/esp-idf'
SUPPORTED_TARGETS = ['esp32', 'esp32s2', 'esp32c3', 'esp32s3', 'esp32c2', 'esp32c6', 'esp32h2']
PREVIEW_TARGETS = ['linux', 'esp32p4']
PREVIEW_TARGETS = ['linux', 'esp32p4', 'esp32c5']
OPENOCD_TAGET_CONFIG_DEFAULT = '-f interface/ftdi/esp32_devkitj_v1.cfg -f target/{target}.cfg'
OPENOCD_TAGET_CONFIG: Dict[str, str] = {
@ -42,5 +42,6 @@ OPENOCD_TAGET_CONFIG: Dict[str, str] = {
'esp32c3': '-f board/esp32c3-builtin.cfg',
'esp32s3': '-f board/esp32s3-builtin.cfg',
'esp32c6': '-f board/esp32c6-builtin.cfg',
'esp32c5': '-f board/esp32c5-builtin.cfg',
'esp32h2': '-f board/esp32h2-builtin.cfg',
}

View File

@ -92,6 +92,7 @@
"esp32c3",
"esp32c2",
"esp32c6",
"esp32c5",
"esp32h2",
"esp32p4"
],
@ -247,6 +248,7 @@
"esp32c3",
"esp32c2",
"esp32c6",
"esp32c5",
"esp32h2"
],
"version_cmd": [
@ -311,6 +313,7 @@
"esp32c3",
"esp32c2",
"esp32c6",
"esp32c5",
"esp32h2"
],
"version_cmd": [