esp32c6: introduce the target

Add esp32c6 target to tools and Kconfig
Create directories and files that are essential for `idf.py --preview set-target esp32c6`
This commit is contained in:
songruojing 2022-08-10 19:01:42 +08:00 committed by Song Ruo Jing
parent 1669a5d861
commit 304a8f142d
28 changed files with 59 additions and 5 deletions

10
Kconfig
View File

@ -13,6 +13,7 @@ mainmenu "Espressif IoT Development Framework Configuration"
config IDF_ENV_FPGA
# This option is for internal use only
bool
default "y" if IDF_TARGET_ESP32C6 # TODO: IDF-5630
option env="IDF_ENV_FPGA"
config IDF_TARGET_ARCH_RISCV
@ -90,6 +91,12 @@ mainmenu "Espressif IoT Development Framework Configuration"
select FREERTOS_UNICORE
select IDF_TARGET_ARCH_RISCV
config IDF_TARGET_ESP32C6
bool
default "y" if IDF_TARGET="esp32c6"
select FREERTOS_UNICORE
select IDF_TARGET_ARCH_RISCV
config IDF_TARGET_LINUX
bool
default "y" if IDF_TARGET="linux"
@ -100,8 +107,9 @@ mainmenu "Espressif IoT Development Framework Configuration"
default 0x0002 if IDF_TARGET_ESP32S2
default 0x0005 if IDF_TARGET_ESP32C3
default 0x0009 if IDF_TARGET_ESP32S3
default 0x000C if IDF_TARGET_ESP32C2
default 0x000A if IDF_TARGET_ESP32H2_BETA_VERSION_1
default 0x000C if IDF_TARGET_ESP32C2
default 0x000D if IDF_TARGET_ESP32C6
default 0x000E if IDF_TARGET_ESP32H2_BETA_VERSION_2 # ESP32H2-TODO: IDF-3475
default 0xFFFF

View File

@ -0,0 +1 @@
# TODO: IDF-5727

View File

View File

View File

View File

View File

@ -15,6 +15,8 @@ function(__add_dfu_targets)
return()
elseif("${target}" STREQUAL "esp32c2")
return()
elseif("${target}" STREQUAL "esp32c6")
return()
elseif("${target}" STREQUAL "linux")
return()
else()

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 ${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 ${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 --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

@ -14,6 +14,8 @@ function(__add_uf2_targets)
set(uf2_family_id "0x332726f6")
elseif("${target}" STREQUAL "esp32c2")
set(uf2_family_id "0x2b88d29c")
elseif("${target}" STREQUAL "esp32c6") # TODO: IDF-5626
set(uf2_family_id "0x2b88d29c")
elseif("${target}" STREQUAL "linux")
return()
else()

View File

@ -59,7 +59,8 @@ GDB_REGS_INFO_RISCV_ILP32 = [
GDB_REGS_INFO = {
'esp32c3': GDB_REGS_INFO_RISCV_ILP32,
'esp32c2': GDB_REGS_INFO_RISCV_ILP32,
'esp32h2': GDB_REGS_INFO_RISCV_ILP32
'esp32h2': GDB_REGS_INFO_RISCV_ILP32,
'esp32c6': GDB_REGS_INFO_RISCV_ILP32
}
PanicInfo = namedtuple('PanicInfo', 'core_id regs stack_base_addr stack_data')
@ -153,7 +154,8 @@ def parse_idf_riscv_panic_output(panic_text): # type: (str) -> PanicInfo
PANIC_OUTPUT_PARSERS = {
'esp32c3': parse_idf_riscv_panic_output,
'esp32c2': parse_idf_riscv_panic_output,
'esp32h2': parse_idf_riscv_panic_output
'esp32h2': parse_idf_riscv_panic_output,
'esp32c6': parse_idf_riscv_panic_output
}

View File

@ -37,4 +37,4 @@ if os.name != 'nt':
URL_TO_DOC = 'https://docs.espressif.com/projects/esp-idf'
SUPPORTED_TARGETS = ['esp32', 'esp32s2', 'esp32c3', 'esp32s3', 'esp32c2']
PREVIEW_TARGETS = ['linux', 'esp32h2']
PREVIEW_TARGETS = ['linux', 'esp32h2', 'esp32c6']

View File

@ -0,0 +1,20 @@
# Data_type:
# primary_address: value
# length: value or equation
# secondary_address: value if exist
DRAM:
primary_address: 0x40800000
length: 0x80000
secondary_address: 0x40800000
IRAM:
primary_address: 0x40800000
length: 0x80000
CACHE_I:
primary_address: 0x42000000
length: 0x800000
CACHE_D:
primary_address: 0x42000000
length: 0x800000
RTC_SLOW_D: # TODO: IDF-5667 Better to rename to LP_RAM
primary_address: 0x50000000
length: 0x4000

View File

@ -438,7 +438,8 @@
"esp32s3",
"esp32c3",
"esp32h2",
"esp32c2"
"esp32c2",
"esp32c6"
],
"version_cmd": [
"riscv32-esp-elf-gcc",