feat(esp32c5): add esp32c5 target in kconfig and tools

This commit is contained in:
wanglei 2023-11-09 17:18:39 +08:00 committed by laokaiyao
parent dbe08fbaae
commit 076aefce74
5 changed files with 33 additions and 1 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_FPGA
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

@ -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": [