diff --git a/components/app_trace/port/port_uart.c b/components/app_trace/port/port_uart.c index d826ded2cb..d3d973e61d 100644 --- a/components/app_trace/port/port_uart.c +++ b/components/app_trace/port/port_uart.c @@ -4,6 +4,7 @@ * SPDX-License-Identifier: Apache-2.0 */ +#include #include "soc/soc.h" #include "esp_log.h" #include "esp_cpu.h" @@ -11,8 +12,6 @@ #include "driver/uart.h" #include "hal/uart_ll.h" -#include "string.h" -#include "driver/gpio.h" #define APP_TRACE_MAX_TX_BUFF_UART CONFIG_APPTRACE_UART_TX_BUFF_SIZE #define APP_TRACE_MAX_TX_MSG_UART CONFIG_APPTRACE_UART_TX_MSG_SIZE diff --git a/components/app_trace/test_apps/.build-test-rules.yml b/components/app_trace/test_apps/.build-test-rules.yml index ef532d619e..3762c8660d 100644 --- a/components/app_trace/test_apps/.build-test-rules.yml +++ b/components/app_trace/test_apps/.build-test-rules.yml @@ -5,8 +5,9 @@ components/app_trace/test_apps: - app_trace - esp_timer - soc - - driver - esp_hw_support + - esp_driver_uart + - esp_driver_gptimer disable: - if: IDF_TARGET in ["esp32c5", "esp32c61", "esp32h21", "esp32h4"] temporary: true diff --git a/components/driver/test_apps/legacy_twai/main/CMakeLists.txt b/components/driver/test_apps/legacy_twai/main/CMakeLists.txt index d7bba661d0..3ebf21ad84 100644 --- a/components/driver/test_apps/legacy_twai/main/CMakeLists.txt +++ b/components/driver/test_apps/legacy_twai/main/CMakeLists.txt @@ -5,5 +5,5 @@ set(srcs "test_app_main.cpp" # In order for the cases defined by `TEST_CASE` to be linked into the final elf, # the component can be registered as WHOLE_ARCHIVE idf_component_register(SRCS ${srcs} - PRIV_REQUIRES unity driver esp_driver_gpio esp_hw_support + PRIV_REQUIRES unity driver esp_hw_support WHOLE_ARCHIVE) diff --git a/components/driver/twai/include/driver/twai.h b/components/driver/twai/include/driver/twai.h index a484f95312..4bca118e09 100644 --- a/components/driver/twai/include/driver/twai.h +++ b/components/driver/twai/include/driver/twai.h @@ -10,7 +10,7 @@ #include "esp_types.h" #include "esp_intr_alloc.h" #include "esp_err.h" -#include "driver/gpio.h" +#include "hal/gpio_types.h" #include "hal/twai_types.h" #ifdef __cplusplus diff --git a/components/esp_driver_gptimer/test_apps/gptimer/CMakeLists.txt b/components/esp_driver_gptimer/test_apps/gptimer/CMakeLists.txt index bae13a3bd2..0cc0940fd7 100644 --- a/components/esp_driver_gptimer/test_apps/gptimer/CMakeLists.txt +++ b/components/esp_driver_gptimer/test_apps/gptimer/CMakeLists.txt @@ -9,9 +9,19 @@ project(gptimer_test) idf_build_get_property(elf EXECUTABLE) if(CONFIG_COMPILER_DUMP_RTL_FILES) + # Collect RTL directories in a variable for readability. Join them + # with commas so they are passed as a single --rtl-dirs argument to the script. + set(GPTIMER_RTL_DIRS + ${CMAKE_BINARY_DIR}/esp-idf/esp_driver_gptimer + ${CMAKE_BINARY_DIR}/esp-idf/hal + ${CMAKE_BINARY_DIR}/esp-idf/esp_hal_timg + ) + string(JOIN "," GPTIMER_RTL_DIRS_JOINED ${GPTIMER_RTL_DIRS}) + add_custom_target(check_test_app_sections ALL - COMMAND ${PYTHON} $ENV{IDF_PATH}/tools/ci/check_callgraph.py - --rtl-dirs ${CMAKE_BINARY_DIR}/esp-idf/esp_driver_gptimer/,${CMAKE_BINARY_DIR}/esp-idf/hal/ + COMMAND ${PYTHON} + $ENV{IDF_PATH}/tools/ci/check_callgraph.py + --rtl-dirs ${GPTIMER_RTL_DIRS_JOINED} --elf-file ${CMAKE_BINARY_DIR}/gptimer_test.elf find-refs --from-sections=.iram0.text diff --git a/components/esp_driver_i2c/test_apps/i2c_test_apps/CMakeLists.txt b/components/esp_driver_i2c/test_apps/i2c_test_apps/CMakeLists.txt index 04d42459a1..f0a028bb14 100644 --- a/components/esp_driver_i2c/test_apps/i2c_test_apps/CMakeLists.txt +++ b/components/esp_driver_i2c/test_apps/i2c_test_apps/CMakeLists.txt @@ -13,9 +13,18 @@ project(i2c_test) idf_build_get_property(elf EXECUTABLE) if(CONFIG_COMPILER_DUMP_RTL_FILES) + # Collect RTL directories in a variable for readability. Join them + # with commas so they are passed as a single --rtl-dirs argument to the script. + set(I2C_RTL_DIRS + ${CMAKE_BINARY_DIR}/esp-idf/esp_driver_i2c + ${CMAKE_BINARY_DIR}/esp-idf/hal + ${CMAKE_BINARY_DIR}/esp-idf/esp_hal_i2c + ) + string(JOIN "," I2C_RTL_DIRS_JOINED ${I2C_RTL_DIRS}) + add_custom_target(check_test_app_sections ALL COMMAND ${PYTHON} $ENV{IDF_PATH}/tools/ci/check_callgraph.py - --rtl-dirs ${CMAKE_BINARY_DIR}/esp-idf/esp_driver_i2c/,${CMAKE_BINARY_DIR}/esp-idf/hal/ + --rtl-dirs ${I2C_RTL_DIRS_JOINED} --elf-file ${CMAKE_BINARY_DIR}/i2c_test.elf find-refs --from-sections=.iram0.text diff --git a/components/esp_driver_sdio/test_apps/sdio/sdio_common_tests/host_sdmmc/CMakeLists.txt b/components/esp_driver_sdio/test_apps/sdio/sdio_common_tests/host_sdmmc/CMakeLists.txt index 763b85505a..8c6c363322 100644 --- a/components/esp_driver_sdio/test_apps/sdio/sdio_common_tests/host_sdmmc/CMakeLists.txt +++ b/components/esp_driver_sdio/test_apps/sdio/sdio_common_tests/host_sdmmc/CMakeLists.txt @@ -4,10 +4,5 @@ cmake_minimum_required(VERSION 3.22) # "Trim" the build. Include the minimal set of components, main, and anything it depends on. set(COMPONENTS main) -set(EXTRA_COMPONENT_DIRS - "$ENV{IDF_PATH}/tools/test_apps/components" - "$ENV{IDF_PATH}/components/driver/test_apps/components" -) - include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(host_sdmmc) diff --git a/components/esp_driver_sdio/test_apps/sdio/sdio_common_tests/host_sdmmc/main/idf_component.yml b/components/esp_driver_sdio/test_apps/sdio/sdio_common_tests/host_sdmmc/main/idf_component.yml index 8014719218..47f6c457c4 100644 --- a/components/esp_driver_sdio/test_apps/sdio/sdio_common_tests/host_sdmmc/main/idf_component.yml +++ b/components/esp_driver_sdio/test_apps/sdio/sdio_common_tests/host_sdmmc/main/idf_component.yml @@ -3,3 +3,5 @@ dependencies: espressif/esp_serial_slave_link: "^1.1.0" test_driver_utils: path: ${IDF_PATH}/components/driver/test_apps/components/test_driver_utils + test_utils: + path: ${IDF_PATH}/tools/test_apps/components/test_utils diff --git a/components/esp_driver_sdio/test_apps/sdio/sdio_common_tests/sdio/CMakeLists.txt b/components/esp_driver_sdio/test_apps/sdio/sdio_common_tests/sdio/CMakeLists.txt index 68e4a08f51..546366c9da 100644 --- a/components/esp_driver_sdio/test_apps/sdio/sdio_common_tests/sdio/CMakeLists.txt +++ b/components/esp_driver_sdio/test_apps/sdio/sdio_common_tests/sdio/CMakeLists.txt @@ -4,11 +4,6 @@ cmake_minimum_required(VERSION 3.22) # "Trim" the build. Include the minimal set of components, main, and anything it depends on. set(COMPONENTS main) -set(EXTRA_COMPONENT_DIRS - "$ENV{IDF_PATH}/tools/test_apps/components" - "$ENV{IDF_PATH}/components/driver/test_apps/components" -) - include($ENV{IDF_PATH}/tools/cmake/project.cmake) project(sdio) diff --git a/components/esp_driver_sdio/test_apps/sdio/sdio_common_tests/sdio/main/idf_component.yml b/components/esp_driver_sdio/test_apps/sdio/sdio_common_tests/sdio/main/idf_component.yml new file mode 100644 index 0000000000..f5fd8b3b39 --- /dev/null +++ b/components/esp_driver_sdio/test_apps/sdio/sdio_common_tests/sdio/main/idf_component.yml @@ -0,0 +1,5 @@ +dependencies: + test_driver_utils: + path: ${IDF_PATH}/components/driver/test_apps/components/test_driver_utils + test_utils: + path: ${IDF_PATH}/tools/test_apps/components/test_utils diff --git a/components/spi_flash/test_apps/mspi_test/CMakeLists.txt b/components/spi_flash/test_apps/mspi_test/CMakeLists.txt index 7f9278539a..b9b8b5e54d 100644 --- a/components/spi_flash/test_apps/mspi_test/CMakeLists.txt +++ b/components/spi_flash/test_apps/mspi_test/CMakeLists.txt @@ -10,9 +10,17 @@ project(mspi_test) idf_build_get_property(elf EXECUTABLE) if(CONFIG_COMPILER_DUMP_RTL_FILES) + # Collect RTL directories in a variable for readability. Join them + # with commas so they are passed as a single --rtl-dirs argument to the script. + set(MSPI_RTL_DIRS + # ${CMAKE_BINARY_DIR}/esp-idf/spi_flash # IDF-14271 + ${CMAKE_BINARY_DIR}/esp-idf/hal + ${CMAKE_BINARY_DIR}/esp-idf/esp_hal_mspi + ) + string(JOIN "," MSPI_RTL_DIRS_JOINED ${MSPI_RTL_DIRS}) add_custom_target(check_test_app_sections ALL COMMAND ${PYTHON} $ENV{IDF_PATH}/tools/ci/check_callgraph.py - --rtl-dirs ${CMAKE_BINARY_DIR}/esp-idf/driver/,${CMAKE_BINARY_DIR}/esp-idf/hal/ + --rtl-dirs ${MSPI_RTL_DIRS_JOINED} --elf-file ${CMAKE_BINARY_DIR}/mspi_test.elf find-refs --from-sections=.iram0.text diff --git a/components/vfs/test_apps/.build-test-rules.yml b/components/vfs/test_apps/.build-test-rules.yml index faf5f2de53..3d27513851 100644 --- a/components/vfs/test_apps/.build-test-rules.yml +++ b/components/vfs/test_apps/.build-test-rules.yml @@ -14,4 +14,3 @@ components/vfs/test_apps: - fatfs - spiffs - console - - driver diff --git a/examples/bluetooth/.build-test-rules.yml b/examples/bluetooth/.build-test-rules.yml index 6a01ccc849..1e79fa33ba 100644 --- a/examples/bluetooth/.build-test-rules.yml +++ b/examples/bluetooth/.build-test-rules.yml @@ -67,10 +67,10 @@ examples/bluetooth/bluedroid/classic_bt: - esp_driver_gpio - esp_driver_i2s - esp_driver_uart + - esp_driver_dac depends_components-: - mbedtls depends_filepatterns: - - components/driver/dac/**/* - examples/bluetooth/bluedroid/esp_hid_host/**/* - examples/bluetooth/bluedroid/classic_bt/pytest_classic_bt_test.py - examples/bluetooth/bluedroid/classic_bt/bt_discovery/pytest_classic_bt_discovery_test.py @@ -83,8 +83,7 @@ examples/bluetooth/bluedroid/coex/a2dp_gatts_coex: reason: the other targets are not tested yet depends_components+: - esp_driver_i2s - depends_filepatterns: - - components/driver/dac/**/* + - esp_driver_dac examples/bluetooth/blufi: <<: *bt_default_depends diff --git a/examples/storage/.build-test-rules.yml b/examples/storage/.build-test-rules.yml index 0b4d0f9565..77336032d6 100644 --- a/examples/storage/.build-test-rules.yml +++ b/examples/storage/.build-test-rules.yml @@ -3,7 +3,6 @@ examples/storage/custom_flash_driver: depends_components: - spi_flash - - driver examples/storage/emmc: depends_components: diff --git a/examples/storage/fatfs/.build-test-rules.yml b/examples/storage/fatfs/.build-test-rules.yml index 51c4aa41b5..d7c880bf2f 100644 --- a/examples/storage/fatfs/.build-test-rules.yml +++ b/examples/storage/fatfs/.build-test-rules.yml @@ -13,7 +13,7 @@ examples/storage/fatfs/ext_flash: - fatfs - vfs - spi_flash - - driver + - esp_driver_spi disable: - if: IDF_TARGET in ["esp32p4", "esp32c5", "esp32c61", "esp32h21", "esp32h4"] temporary: true diff --git a/examples/storage/nvs/.build-test-rules.yml b/examples/storage/nvs/.build-test-rules.yml index aada4fee7e..d4173e46ea 100644 --- a/examples/storage/nvs/.build-test-rules.yml +++ b/examples/storage/nvs/.build-test-rules.yml @@ -20,7 +20,6 @@ examples/storage/nvs/nvs_console: examples/storage/nvs/nvs_rw_blob: depends_components: - nvs_flash - - driver disable_test: - if: IDF_TARGET not in ["esp32", "esp32c3"] reason: only one target per arch needed diff --git a/tools/test_apps/phy/.build-test-rules.yml b/tools/test_apps/phy/.build-test-rules.yml index 2cd352547c..2a99e4241a 100644 --- a/tools/test_apps/phy/.build-test-rules.yml +++ b/tools/test_apps/phy/.build-test-rules.yml @@ -12,7 +12,7 @@ tools/test_apps/phy/phy_tsens: - if: (SOC_WIFI_SUPPORTED != 1 or SOC_TEMP_SENSOR_SUPPORTED != 1) or SOC_LIGHT_SLEEP_SUPPORTED != 1 depends_components: - hal - - driver - esp_phy - esp_hw_support - esp_wifi + - esp_driver_tsens