Преглед изворни кода

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`
songruojing пре 3 година
родитељ
комит
304a8f142d
28 измењених фајлова са 59 додато и 5 уклоњено
  1. 9 1
      Kconfig
  2. 0 0
      components/bootloader_support/bootloader_flash/src/bootloader_flash_config_esp32c6.c
  3. 0 0
      components/bootloader_support/src/bootloader_random_esp32c6.c
  4. 1 0
      components/bt/controller/esp32c6/Kconfig.in
  5. 0 0
      components/esp_adc/esp32c6/include/.gitkeep
  6. 0 0
      components/esp_gdbstub/esp32c6/gdbstub_esp32c6.c
  7. 0 0
      components/esp_hw_support/include/soc/esp32c6/.gitkeep
  8. 0 0
      components/esp_hw_support/port/esp32c6/CMakeLists.txt
  9. 0 0
      components/esp_hw_support/port/esp32c6/Kconfig.mac
  10. 0 0
      components/esp_rom/esp32c6/.gitkeep
  11. 0 0
      components/esp_rom/include/esp32c6/.gitkeep
  12. 0 0
      components/esp_system/ld/esp32c6/memory.ld.in
  13. 0 0
      components/esp_system/port/soc/esp32c6/CMakeLists.txt
  14. 0 0
      components/esp_system/port/soc/esp32c6/Kconfig.cpu
  15. 0 0
      components/esp_system/port/soc/esp32c6/Kconfig.system
  16. 0 0
      components/hal/esp32c6/efuse_hal.c
  17. 0 0
      components/hal/esp32c6/include/.gitkeep
  18. 0 0
      components/heap/port/esp32c6/memory_layout.c
  19. 0 0
      components/idf_test/include/esp32c6/.gitkeep
  20. 0 0
      components/soc/esp32c6/CMakeLists.txt
  21. 0 0
      components/spi_flash/esp32c6/flash_ops_esp32c6.c
  22. 2 0
      tools/cmake/dfu.cmake
  23. 18 0
      tools/cmake/toolchain-esp32c6.cmake
  24. 2 0
      tools/cmake/uf2.cmake
  25. 4 2
      tools/gdb_panic_server.py
  26. 1 1
      tools/idf_py_actions/constants.py
  27. 20 0
      tools/idf_size_yaml/esp32c6_data_info.yaml
  28. 2 1
      tools/tools.json

+ 9 - 1
Kconfig

@@ -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
 

+ 0 - 0
components/bootloader_support/bootloader_flash/src/bootloader_flash_config_esp32c6.c


+ 0 - 0
components/bootloader_support/src/bootloader_random_esp32c6.c


+ 1 - 0
components/bt/controller/esp32c6/Kconfig.in

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

+ 0 - 0
components/esp_adc/esp32c6/include/.gitkeep


+ 0 - 0
components/esp_gdbstub/esp32c6/gdbstub_esp32c6.c


+ 0 - 0
components/esp_hw_support/include/soc/esp32c6/.gitkeep


+ 0 - 0
components/esp_hw_support/port/esp32c6/CMakeLists.txt


+ 0 - 0
components/esp_hw_support/port/esp32c6/Kconfig.mac


+ 0 - 0
components/esp_rom/esp32c6/.gitkeep


+ 0 - 0
components/esp_rom/include/esp32c6/.gitkeep


+ 0 - 0
components/esp_system/ld/esp32c6/memory.ld.in


+ 0 - 0
components/esp_system/port/soc/esp32c6/CMakeLists.txt


+ 0 - 0
components/esp_system/port/soc/esp32c6/Kconfig.cpu


+ 0 - 0
components/esp_system/port/soc/esp32c6/Kconfig.system


+ 0 - 0
components/hal/esp32c6/efuse_hal.c


+ 0 - 0
components/hal/esp32c6/include/.gitkeep


+ 0 - 0
components/heap/port/esp32c6/memory_layout.c


+ 0 - 0
components/idf_test/include/esp32c6/.gitkeep


+ 0 - 0
components/soc/esp32c6/CMakeLists.txt


+ 0 - 0
components/spi_flash/esp32c6/flash_ops_esp32c6.c


+ 2 - 0
tools/cmake/dfu.cmake

@@ -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()

+ 18 - 0
tools/cmake/toolchain-esp32c6.cmake

@@ -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)

+ 2 - 0
tools/cmake/uf2.cmake

@@ -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()

+ 4 - 2
tools/gdb_panic_server.py

@@ -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
 }
 
 

+ 1 - 1
tools/idf_py_actions/constants.py

@@ -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']

+ 20 - 0
tools/idf_size_yaml/esp32c6_data_info.yaml

@@ -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

+ 2 - 1
tools/tools.json

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