diff --git a/.gitlab/ci/pre_check.yml b/.gitlab/ci/pre_check.yml index 104377d311..ed86a0b04c 100644 --- a/.gitlab/ci/pre_check.yml +++ b/.gitlab/ci/pre_check.yml @@ -75,7 +75,7 @@ check_chip_support_components: expire_in: 1 week script: - python tools/ci/check_soc_headers_leak.py - - find ${IDF_PATH}/components/soc/*/include/soc/ -name "*_struct.h" -print0 | xargs -0 -n1 ./tools/ci/check_soc_struct_headers.py + - find ${IDF_PATH}/components/soc/**/include/soc/ -name "*_struct.h" -print0 | xargs -0 -n1 ./tools/ci/check_soc_struct_headers.py - tools/ci/check_esp_memory_utils_headers.sh check_esp_err_to_name: diff --git a/components/bootloader/subproject/main/CMakeLists.txt b/components/bootloader/subproject/main/CMakeLists.txt index 90b9c47322..c66e46cc35 100644 --- a/components/bootloader/subproject/main/CMakeLists.txt +++ b/components/bootloader/subproject/main/CMakeLists.txt @@ -1,10 +1,18 @@ idf_component_register(SRCS "bootloader_start.c" REQUIRES bootloader bootloader_support) -idf_build_get_property(target IDF_TARGET) -set(scripts "ld/${target}/bootloader.ld") +if(CONFIG_IDF_TARGET_ESP32C5_BETA3_VERSION) + set(target_folder "esp32c5/beta3") +elseif(CONFIG_IDF_TARGET_ESP32C5_MP_VERSION) + set(target_folder "esp32c5/mp") +else() + set(target_folder "${target}") +endif() -list(APPEND scripts "ld/${target}/bootloader.rom.ld") +idf_build_get_property(target IDF_TARGET) +set(scripts "ld/${target_folder}/bootloader.ld") + +list(APPEND scripts "ld/${target_folder}/bootloader.rom.ld") target_linker_script(${COMPONENT_LIB} INTERFACE "${scripts}") target_link_libraries(${COMPONENT_LIB} INTERFACE "-u bootloader_hooks_include") diff --git a/components/bootloader/subproject/main/ld/esp32c5/bootloader.ld b/components/bootloader/subproject/main/ld/esp32c5/beta3/bootloader.ld similarity index 100% rename from components/bootloader/subproject/main/ld/esp32c5/bootloader.ld rename to components/bootloader/subproject/main/ld/esp32c5/beta3/bootloader.ld diff --git a/components/bootloader/subproject/main/ld/esp32c5/bootloader.rom.ld b/components/bootloader/subproject/main/ld/esp32c5/beta3/bootloader.rom.ld similarity index 100% rename from components/bootloader/subproject/main/ld/esp32c5/bootloader.rom.ld rename to components/bootloader/subproject/main/ld/esp32c5/beta3/bootloader.rom.ld diff --git a/components/bootloader/subproject/main/ld/esp32c5/mp/.gitkeep b/components/bootloader/subproject/main/ld/esp32c5/mp/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/components/esp_rom/esp32c5/esp_rom_caps.h b/components/esp_rom/esp32c5/esp_rom_caps.h index 0cbcedf2e4..b64679dd98 100644 --- a/components/esp_rom/esp32c5/esp_rom_caps.h +++ b/components/esp_rom/esp32c5/esp_rom_caps.h @@ -8,7 +8,7 @@ #include "sdkconfig.h" -// TODO: IDF-9197 This file is created to glob the soc_caps correctly in esp-docs +// TODO: IDF-9197 This file is created to glob the version specific soc_caps correctly #if CONFIG_IDF_TARGET_ESP32C5_BETA3_VERSION #include "beta3/esp32c5/esp_rom_caps.h" // recursive, condition: IDF_TARGET_ESP32C5_BETA3_VERSION diff --git a/components/esp_system/ld/esp32c5/memory.ld.in b/components/esp_system/ld/esp32c5/beta3/memory.ld.in similarity index 100% rename from components/esp_system/ld/esp32c5/memory.ld.in rename to components/esp_system/ld/esp32c5/beta3/memory.ld.in diff --git a/components/esp_system/ld/esp32c5/sections.ld.in b/components/esp_system/ld/esp32c5/beta3/sections.ld.in similarity index 100% rename from components/esp_system/ld/esp32c5/sections.ld.in rename to components/esp_system/ld/esp32c5/beta3/sections.ld.in diff --git a/components/esp_system/ld/esp32c5/mp/.gitkeep b/components/esp_system/ld/esp32c5/mp/.gitkeep new file mode 100644 index 0000000000..e69de29bb2 diff --git a/components/esp_system/ld/ld.cmake b/components/esp_system/ld/ld.cmake index aa8c1b8121..02abddc286 100644 --- a/components/esp_system/ld/ld.cmake +++ b/components/esp_system/ld/ld.cmake @@ -19,8 +19,16 @@ string(REPLACE "\\n" "\n" TEXT "${PREPROCESSED_LINKER_SCRIPT}") file(WRITE "${TARGET}" "${TEXT}") ]=]) +if(CONFIG_IDF_TARGET_ESP32C5_BETA3_VERSION) + set(target_folder "esp32c5/beta3") +elseif(CONFIG_IDF_TARGET_ESP32C5_MP_VERSION) + set(target_folder "esp32c5/mp") +else() + set(target_folder "${target}") +endif() + function(preprocess_linker_file name_in name_out out_path) - set(script_in "${CMAKE_CURRENT_LIST_DIR}/${target}/${name_in}") + set(script_in "${CMAKE_CURRENT_LIST_DIR}/${target_folder}/${name_in}") set(script_out "${CMAKE_CURRENT_BINARY_DIR}/ld/${name_out}") set(${out_path} ${script_out} PARENT_SCOPE) diff --git a/components/soc/esp32c5/gdma_periph.c b/components/soc/esp32c5/beta3/gdma_periph.c similarity index 100% rename from components/soc/esp32c5/gdma_periph.c rename to components/soc/esp32c5/beta3/gdma_periph.c diff --git a/components/soc/esp32c5/i2c_periph.c b/components/soc/esp32c5/beta3/i2c_periph.c similarity index 100% rename from components/soc/esp32c5/i2c_periph.c rename to components/soc/esp32c5/beta3/i2c_periph.c diff --git a/components/soc/esp32c5/beta3/include/soc/Kconfig.soc_caps.in b/components/soc/esp32c5/beta3/include/soc/Kconfig.soc_caps.in index ce60b9616a..9ee4745d3f 100644 --- a/components/soc/esp32c5/beta3/include/soc/Kconfig.soc_caps.in +++ b/components/soc/esp32c5/beta3/include/soc/Kconfig.soc_caps.in @@ -7,10 +7,22 @@ config SOC_UART_SUPPORTED bool default y +config SOC_GDMA_SUPPORTED + bool + default y + +config SOC_AHB_GDMA_SUPPORTED + bool + default y + config SOC_GPTIMER_SUPPORTED bool default y +config SOC_ASYNC_MEMCPY_SUPPORTED + bool + default y + config SOC_EFUSE_KEY_PURPOSE_FIELD bool default y @@ -27,6 +39,10 @@ config SOC_RTC_MEM_SUPPORTED bool default y +config SOC_I2C_SUPPORTED + bool + default y + config SOC_SYSTIMER_SUPPORTED bool default y @@ -43,6 +59,10 @@ config SOC_FLASH_ENC_SUPPORTED bool default y +config SOC_LP_PERIPHERALS_SUPPORTED + bool + default y + config SOC_SPI_FLASH_SUPPORTED bool default y @@ -115,6 +135,18 @@ config SOC_CPU_IDRAM_SPLIT_USING_PMP bool default y +config SOC_AHB_GDMA_VERSION + int + default 1 + +config SOC_GDMA_NUM_GROUPS_MAX + int + default 1 + +config SOC_GDMA_PAIRS_PER_GROUP_MAX + int + default 3 + config SOC_GPIO_PORT int default 1 @@ -169,7 +201,47 @@ config SOC_RTCIO_PIN_COUNT config SOC_I2C_NUM int - default 2 + default 1 + +config SOC_I2C_FIFO_LEN + int + default 32 + +config SOC_I2C_CMD_REG_NUM + int + default 8 + +config SOC_I2C_SUPPORT_SLAVE + bool + default y + +config SOC_I2C_SUPPORT_HW_FSM_RST + bool + default y + +config SOC_I2C_SUPPORT_HW_CLR_BUS + bool + default y + +config SOC_I2C_SUPPORT_XTAL + bool + default y + +config SOC_I2C_SUPPORT_10BIT_ADDR + bool + default y + +config SOC_I2C_SLAVE_SUPPORT_BROADCAST + bool + default y + +config SOC_I2C_SLAVE_CAN_GET_STRETCH_CAUSE + bool + default y + +config SOC_I2C_SLAVE_SUPPORT_I2CRAM_ACCESS + bool + default y config SOC_LEDC_SUPPORT_PLL_DIV_CLOCK bool @@ -307,10 +379,26 @@ config SOC_LP_UART_FIFO_LEN int default 16 +config SOC_UART_BITRATE_MAX + int + default 5000000 + +config SOC_UART_SUPPORT_PLL_F80M_CLK + bool + default y + config SOC_UART_SUPPORT_XTAL_CLK bool default y +config SOC_UART_SUPPORT_WAKEUP_INT + bool + default y + +config SOC_UART_SUPPORT_FSM_TX_WAIT_SEND + bool + default y + config SOC_PM_SUPPORT_CPU_PD bool default y diff --git a/components/soc/esp32c5/include/soc/soc_etm_source.h b/components/soc/esp32c5/beta3/include/soc/soc_etm_source.h similarity index 100% rename from components/soc/esp32c5/include/soc/soc_etm_source.h rename to components/soc/esp32c5/beta3/include/soc/soc_etm_source.h diff --git a/docs/doxygen/Doxyfile_esp32c5 b/docs/doxygen/Doxyfile_esp32c5 index 727241740b..792b31424a 100644 --- a/docs/doxygen/Doxyfile_esp32c5 +++ b/docs/doxygen/Doxyfile_esp32c5 @@ -1,7 +1,7 @@ # TODO: IDF-9197 Use beta3 in doc temprory INPUT += \ - $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/beta3/include/soc/soc_caps.h \ - $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/beta3/include/soc/adc_channel.h \ - $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/beta3/include/soc/clk_tree_defs.h \ - $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/beta3/include/soc/gpio_num.h \ - $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/beta3/include/soc/uart_channel.h \ + $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/beta3/include/soc/soc_caps.h \ + $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/beta3/include/soc/adc_channel.h \ + $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/beta3/include/soc/clk_tree_defs.h \ + $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/beta3/include/soc/gpio_num.h \ + $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/beta3/include/soc/uart_channel.h \ diff --git a/docs/doxygen/Doxyfile_esp32c6 b/docs/doxygen/Doxyfile_esp32c6 index fa52c27491..c99dfba77b 100644 --- a/docs/doxygen/Doxyfile_esp32c6 +++ b/docs/doxygen/Doxyfile_esp32c6 @@ -13,7 +13,7 @@ INPUT += \ $(PROJECT_PATH)/components/ulp/ulp_common/include/ulp_common.h \ $(PROJECT_PATH)/components/esp_wifi/include/esp_wifi_he_types.h \ $(PROJECT_PATH)/components/esp_wifi/include/esp_wifi_he.h \ - $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/adc_channel.h \ + $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/adc_channel.h \ $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/clk_tree_defs.h \ $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/gpio_num.h \ $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/soc_caps.h \ diff --git a/docs/doxygen/Doxyfile_esp32h2 b/docs/doxygen/Doxyfile_esp32h2 index fe427b24f1..3e1c69d7b4 100644 --- a/docs/doxygen/Doxyfile_esp32h2 +++ b/docs/doxygen/Doxyfile_esp32h2 @@ -3,7 +3,7 @@ INPUT += \ $(PROJECT_PATH)/components/esp_phy/include/esp_phy_init.h \ $(PROJECT_PATH)/components/esp_phy/include/esp_phy_cert_test.h \ $(PROJECT_PATH)/components/esp_coex/include/esp_coex_i154.h \ - $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/adc_channel.h \ + $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/adc_channel.h \ $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/clk_tree_defs.h \ $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/gpio_num.h \ $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/soc_caps.h \ diff --git a/docs/doxygen/Doxyfile_esp32p4 b/docs/doxygen/Doxyfile_esp32p4 index 8e53082f2b..61e2e6a41c 100644 --- a/docs/doxygen/Doxyfile_esp32p4 +++ b/docs/doxygen/Doxyfile_esp32p4 @@ -15,7 +15,7 @@ INPUT += \ $(PROJECT_PATH)/components/hal/include/hal/jpeg_types.h \ $(PROJECT_PATH)/components/esp_driver_jpeg/include/driver/jpeg_decode.h \ $(PROJECT_PATH)/components/esp_driver_jpeg/include/driver/jpeg_types.h \ - $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/adc_channel.h \ + $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/adc_channel.h \ $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/clk_tree_defs.h \ $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/gpio_num.h \ $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/soc_caps.h \ diff --git a/docs/doxygen/Doxyfile_esp32s2 b/docs/doxygen/Doxyfile_esp32s2 index 64abe61e3e..2fb8f2bedc 100644 --- a/docs/doxygen/Doxyfile_esp32s2 +++ b/docs/doxygen/Doxyfile_esp32s2 @@ -1,6 +1,6 @@ INPUT += \ $(PROJECT_PATH)/components/driver/touch_sensor/$(IDF_TARGET)/include/driver/touch_sensor.h \ - $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/adc_channel.h \ + $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/adc_channel.h \ $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/dac_channel.h \ $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/clk_tree_defs.h \ $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/gpio_num.h \ diff --git a/docs/doxygen/Doxyfile_esp32s3 b/docs/doxygen/Doxyfile_esp32s3 index 58892feeac..b9cebdea23 100644 --- a/docs/doxygen/Doxyfile_esp32s3 +++ b/docs/doxygen/Doxyfile_esp32s3 @@ -1,7 +1,7 @@ INPUT += \ $(PROJECT_PATH)/components/driver/touch_sensor/$(IDF_TARGET)/include/driver/touch_sensor.h \ $(PROJECT_PATH)/components/esp_lcd/rgb/include/esp_lcd_panel_rgb.h \ - $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/adc_channel.h \ + $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/adc_channel.h \ $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/clk_tree_defs.h \ $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/gpio_num.h \ $(PROJECT_PATH)/components/soc/$(IDF_TARGET)/include/soc/soc_caps.h \ diff --git a/docs/en/api-guides/linker-script-generation.rst b/docs/en/api-guides/linker-script-generation.rst index 72075b1652..0e224a6aa5 100644 --- a/docs/en/api-guides/linker-script-generation.rst +++ b/docs/en/api-guides/linker-script-generation.rst @@ -629,4 +629,10 @@ Then the corresponding excerpt from the generated linker script will be as follo Rule generated from the default scheme entry ``iram -> iram0_text``. Since the default scheme specifies an ``iram -> iram0_text`` entry, it too is placed wherever ``iram0_text`` is referenced by a marker. Since it is a rule generated from the default scheme, it comes first among all other rules collected under the same target name. +.. only:: not esp32c5 + The linker script template currently used is :component_file:`esp_system/ld/{IDF_TARGET_PATH_NAME}/sections.ld.in`; the generated output script ``sections.ld`` is put under its build directory. + +.. only:: esp32c5 + + The linker script template currently used is :component_file:`esp_system/ld/esp32c5/beta3/sections.ld.in`; the generated output script ``sections.ld`` is put under its build directory. diff --git a/docs/zh_CN/api-guides/linker-script-generation.rst b/docs/zh_CN/api-guides/linker-script-generation.rst index f037498db0..e8327f75de 100644 --- a/docs/zh_CN/api-guides/linker-script-generation.rst +++ b/docs/zh_CN/api-guides/linker-script-generation.rst @@ -629,4 +629,10 @@ 这是根据默认协议条目 ``iram -> iram0_text`` 生成的规则。默认协议指定了 ``iram -> iram0_text`` 条目,因此生成的规则同样也放在被 ``iram0_text`` 标记的地方。由于该规则是根据默认协议生成的,因此在同一目标下收集的所有规则下排在第一位。 +.. only:: not esp32c5 + 目前使用的链接器脚本模板是 :component_file:`esp_system/ld/{IDF_TARGET_PATH_NAME}/sections.ld.in`,生成的脚本存放在构建目录下。 + +.. only:: esp32c5 + + 目前使用的链接器脚本模板是 :component_file:`esp_system/ld/esp32c5/beta3/sections.ld.in`,生成的脚本存放在构建目录下。 diff --git a/tools/ci/check_public_headers.py b/tools/ci/check_public_headers.py index 2397dfdc0a..9a641a95ad 100644 --- a/tools/ci/check_public_headers.py +++ b/tools/ci/check_public_headers.py @@ -106,7 +106,7 @@ class PublicHeaderChecker: self.kconfig_macro = re.compile(r'\bCONFIG_[A-Z0-9_]+') self.static_assert = re.compile(r'(_Static_assert|static_assert)') self.defines_assert = re.compile(r'#define[ \t]+ESP_STATIC_ASSERT') - self.auto_soc_header = re.compile(r'components/soc/esp[a-z0-9_]+(?:/\w+)?/include(?:/rev[0-9]+)?/(soc|modem)/[a-zA-Z0-9_]+.h') + self.auto_soc_header = re.compile(r'components/soc/esp[a-z0-9_]+(?:/\w+)?/include/(soc|modem)/[a-zA-Z0-9_]+.h') self.assembly_nocode = r'^\s*(\.file|\.text|\.ident|\.option|\.attribute).*$' self.check_threads: List[Thread] = []