diff --git a/components/app_trace/CMakeLists.txt b/components/app_trace/CMakeLists.txt index 494524a4c4..9cb36c8f04 100644 --- a/components/app_trace/CMakeLists.txt +++ b/components/app_trace/CMakeLists.txt @@ -51,6 +51,7 @@ idf_component_register(SRCS "${srcs}" PRIV_INCLUDE_DIRS "${priv_include_dirs}" # Requires "driver" for GPTimer in "SEGGER_SYSVIEW_Config_FreeRTOS.c" PRIV_REQUIRES soc driver + REQUIRES esp_timer LDFRAGMENTS linker.lf) # disable --coverage for this component, as it is used as transport diff --git a/components/driver/test/CMakeLists.txt b/components/driver/test/CMakeLists.txt index 41bba83e30..ee85f1edcd 100644 --- a/components/driver/test/CMakeLists.txt +++ b/components/driver/test/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRC_DIRS . param_test touch_sensor_test adc_dma_test dac_dma_test PRIV_INCLUDE_DIRS include param_test/include touch_sensor_test/include - PRIV_REQUIRES cmock test_utils driver nvs_flash esp_serial_slave_link infrared_tools esp_adc_cal) + PRIV_REQUIRES cmock test_utils driver nvs_flash esp_serial_slave_link + infrared_tools esp_adc_cal esp_timer) diff --git a/components/driver/test/test_ledc.c b/components/driver/test/test_ledc.c index d85cdbc9a9..36eb55896a 100644 --- a/components/driver/test/test_ledc.c +++ b/components/driver/test/test_ledc.c @@ -23,6 +23,7 @@ #include "soc/gpio_periph.h" #include "soc/io_mux_reg.h" #include "esp_system.h" +#include "esp_timer.h" #include "driver/ledc.h" #include "hal/ledc_ll.h" #include "driver/gpio.h" diff --git a/components/driver/test/test_sdio.c b/components/driver/test/test_sdio.c index a807645745..3e02bf7c18 100644 --- a/components/driver/test/test_sdio.c +++ b/components/driver/test/test_sdio.c @@ -10,6 +10,7 @@ #include "test_utils.h" #include "param_test.h" #include "esp_log.h" +#include "esp_timer.h" #include "driver/spi_common.h" #include "soc/soc_caps.h" #include "ccomp_timer.h" diff --git a/components/efuse/test/CMakeLists.txt b/components/efuse/test/CMakeLists.txt index 94252bc00f..2433aab244 100644 --- a/components/efuse/test/CMakeLists.txt +++ b/components/efuse/test/CMakeLists.txt @@ -14,5 +14,5 @@ set(src_dirs "." "${dir}") idf_component_register(SRC_DIRS "${src_dirs}" PRIV_INCLUDE_DIRS "." "${dir}/include" "../private_include" "../${target}/private_include" - PRIV_REQUIRES cmock test_utils efuse bootloader_support + PRIV_REQUIRES cmock test_utils efuse bootloader_support esp_timer ) diff --git a/components/efuse/test/test_efuse.c b/components/efuse/test/test_efuse.c index a91fc59646..b135d61318 100644 --- a/components/efuse/test/test_efuse.c +++ b/components/efuse/test/test_efuse.c @@ -15,6 +15,7 @@ #include "esp_efuse_table.h" #include "esp_efuse_utility.h" #include "esp_efuse_test_table.h" +#include "esp_timer.h" #include "bootloader_random.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" diff --git a/components/esp_event/test/CMakeLists.txt b/components/esp_event/test/CMakeLists.txt index 44e4b7ec84..c279ebfd42 100644 --- a/components/esp_event/test/CMakeLists.txt +++ b/components/esp_event/test/CMakeLists.txt @@ -1,3 +1,3 @@ idf_component_register(SRC_DIRS "." PRIV_INCLUDE_DIRS . ../private_include - PRIV_REQUIRES cmock test_utils esp_event driver) + PRIV_REQUIRES cmock test_utils esp_event driver esp_timer) diff --git a/components/esp_hw_support/CMakeLists.txt b/components/esp_hw_support/CMakeLists.txt index 034e223900..190098b2f9 100644 --- a/components/esp_hw_support/CMakeLists.txt +++ b/components/esp_hw_support/CMakeLists.txt @@ -21,7 +21,7 @@ if(NOT BOOTLOADER_BUILD) endif() # [refactor-todo]: requires "driver" for GPIO and RTC (by sleep_gpio and sleep_modes) - list(APPEND priv_requires driver) + list(APPEND priv_requires driver esp_timer) if(CONFIG_IDF_TARGET_ESP32 OR CONFIG_IDF_TARGET_ESP32S2) list(APPEND srcs "rtc_wdt.c") diff --git a/components/esp_hw_support/test/CMakeLists.txt b/components/esp_hw_support/test/CMakeLists.txt index 943d1e3102..7567e6d1c5 100644 --- a/components/esp_hw_support/test/CMakeLists.txt +++ b/components/esp_hw_support/test/CMakeLists.txt @@ -1,5 +1,5 @@ idf_component_register(SRC_DIRS "." PRIV_INCLUDE_DIRS "${include_dirs}" - PRIV_REQUIRES cmock test_utils esp_hw_support driver efuse) + PRIV_REQUIRES cmock test_utils esp_hw_support driver efuse esp_timer) target_link_libraries(${COMPONENT_LIB} INTERFACE "-u ld_include_test_dport_xt_highint5") diff --git a/components/esp_phy/CMakeLists.txt b/components/esp_phy/CMakeLists.txt index 7ce8f6ea14..213e6c40c2 100644 --- a/components/esp_phy/CMakeLists.txt +++ b/components/esp_phy/CMakeLists.txt @@ -36,7 +36,7 @@ endif() # [refactor-todo]: requires "driver" component for periph_ctrl header file idf_component_register(SRCS "${srcs}" INCLUDE_DIRS "include" "${idf_target}/include" - PRIV_REQUIRES nvs_flash driver efuse + PRIV_REQUIRES nvs_flash driver efuse esp_timer LDFRAGMENTS "${ldfragments}" EMBED_FILES ${embed_files} ) diff --git a/components/esp_phy/src/phy_init.c b/components/esp_phy/src/phy_init.c index 2db5424d17..ac7d15e617 100644 --- a/components/esp_phy/src/phy_init.c +++ b/components/esp_phy/src/phy_init.c @@ -18,6 +18,7 @@ #include "nvs.h" #include "nvs_flash.h" #include "esp_efuse.h" +#include "esp_timer.h" #include "sdkconfig.h" #include "freertos/FreeRTOS.h" #include "freertos/portmacro.h" diff --git a/components/esp_pm/CMakeLists.txt b/components/esp_pm/CMakeLists.txt index 5c68058e97..7220337077 100644 --- a/components/esp_pm/CMakeLists.txt +++ b/components/esp_pm/CMakeLists.txt @@ -1,4 +1,4 @@ idf_component_register(SRCS "pm_locks.c" "pm_trace.c" "pm_impl.c" INCLUDE_DIRS include - PRIV_REQUIRES esp_system driver + PRIV_REQUIRES esp_system driver esp_timer LDFRAGMENTS linker.lf) diff --git a/components/esp_pm/test/CMakeLists.txt b/components/esp_pm/test/CMakeLists.txt index 009da5486a..46a739f2ba 100644 --- a/components/esp_pm/test/CMakeLists.txt +++ b/components/esp_pm/test/CMakeLists.txt @@ -1,2 +1,2 @@ idf_component_register(SRC_DIRS . - PRIV_REQUIRES unity esp_pm ulp driver) + PRIV_REQUIRES unity esp_pm ulp driver esp_timer) diff --git a/components/esp_pm/test/test_pm.c b/components/esp_pm/test/test_pm.c index 121bfce81d..6a7fd88924 100644 --- a/components/esp_pm/test/test_pm.c +++ b/components/esp_pm/test/test_pm.c @@ -6,6 +6,7 @@ #include "unity.h" #include "esp_pm.h" #include "esp_sleep.h" +#include "esp_timer.h" #include "freertos/FreeRTOS.h" #include "freertos/task.h" #include "freertos/semphr.h" diff --git a/components/esp_system/CMakeLists.txt b/components/esp_system/CMakeLists.txt index fd584dec19..d92be939e6 100644 --- a/components/esp_system/CMakeLists.txt +++ b/components/esp_system/CMakeLists.txt @@ -36,7 +36,7 @@ else() idf_component_register(SRCS "${srcs}" INCLUDE_DIRS include - PRIV_REQUIRES spi_flash + PRIV_REQUIRES spi_flash esp_timer # [refactor-todo] requirements due to init code, # should be removable once using component init functions # link-time registration is used. diff --git a/components/esp_system/test/CMakeLists.txt b/components/esp_system/test/CMakeLists.txt index a1a4f863c6..04edbac786 100644 --- a/components/esp_system/test/CMakeLists.txt +++ b/components/esp_system/test/CMakeLists.txt @@ -1,6 +1,7 @@ set(requires "unity" "test_utils" - "driver") + "driver" + "esp_timer") set(excludes "test_ipc_isr.c" "test_ipc_isr.S" diff --git a/components/esp_timer/test/CMakeLists.txt b/components/esp_timer/test/CMakeLists.txt index da211c9f0a..5eb9546562 100644 --- a/components/esp_timer/test/CMakeLists.txt +++ b/components/esp_timer/test/CMakeLists.txt @@ -1,3 +1,3 @@ idf_component_register(SRC_DIRS "." PRIV_INCLUDE_DIRS "../private_include" - PRIV_REQUIRES cmock test_utils) + PRIV_REQUIRES cmock test_utils esp_timer) diff --git a/components/esp_wifi/esp32/esp_adapter.c b/components/esp_wifi/esp32/esp_adapter.c index 36828e8b7e..315e39fb48 100644 --- a/components/esp_wifi/esp32/esp_adapter.c +++ b/components/esp_wifi/esp32/esp_adapter.c @@ -16,7 +16,6 @@ #include "freertos/queue.h" #include "freertos/semphr.h" #include "freertos/event_groups.h" -#include "freertos/xtensa_api.h" #include "freertos/portmacro.h" #include "freertos/xtensa_api.h" #include "esp_types.h" @@ -28,6 +27,7 @@ #include "esp_log.h" #include "esp_event.h" #include "esp_heap_caps.h" +#include "esp_timer.h" #include "esp_private/wifi_os_adapter.h" #include "esp_private/wifi.h" #include "esp_phy_init.h" @@ -42,7 +42,6 @@ #include "esp_coexist_internal.h" #include "esp_coexist_adapter.h" #include "esp32/dport_access.h" -#include "esp_timer.h" #include "esp_rom_sys.h" #include "esp32/rom/ets_sys.h" diff --git a/components/esp_wifi/esp32s2/esp_adapter.c b/components/esp_wifi/esp32s2/esp_adapter.c index 8924b29a2f..8d5ac5f2cf 100644 --- a/components/esp_wifi/esp32s2/esp_adapter.c +++ b/components/esp_wifi/esp32s2/esp_adapter.c @@ -16,7 +16,6 @@ #include "freertos/queue.h" #include "freertos/semphr.h" #include "freertos/event_groups.h" -#include "freertos/xtensa_api.h" #include "freertos/portmacro.h" #include "freertos/xtensa_api.h" #include "esp_types.h" @@ -28,6 +27,7 @@ #include "esp_log.h" #include "esp_event.h" #include "esp_heap_caps.h" +#include "esp_timer.h" #include "esp_private/wifi_os_adapter.h" #include "esp_private/wifi.h" #include "esp_phy_init.h" diff --git a/components/freertos/CMakeLists.txt b/components/freertos/CMakeLists.txt index 6008b543e8..f3ab5a11e2 100644 --- a/components/freertos/CMakeLists.txt +++ b/components/freertos/CMakeLists.txt @@ -113,17 +113,10 @@ else() endif() endif() -# esp_timer is required by FreeRTOS when we use esp_timer_get_time() to do profiling -# [refactor-todo]: make this an optional requirement depending on CONFIG_FREERTOS_RUN_TIME_STATS_USING_ESP_TIMER -# Note, many other components implicitly include esp_timer.h via freertos portmacro.h and some -# components implicitly depend on esp_timer via freertos. -set(required_components esp_timer) - idf_component_register(SRCS "${srcs}" INCLUDE_DIRS ${include_dirs} PRIV_INCLUDE_DIRS ${private_include_dirs} LDFRAGMENTS linker.lf - REQUIRES ${required_components} PRIV_REQUIRES soc esp_pm) idf_component_get_property(COMPONENT_DIR freertos COMPONENT_DIR) @@ -166,3 +159,9 @@ if(CONFIG_ESP_SYSTEM_GDBSTUB_RUNTIME) # [refactor-todo]: port.c esp_startup_start_app_common() calls esp_gdbstub_init() idf_component_optional_requires(PRIVATE esp_gdbstub) endif() + +if(CONFIG_FREERTOS_RUN_TIME_STATS_USING_ESP_TIMER) + # [refactor-todo]: esp_timer is required by FreeRTOS when we use esp_timer_get_time() to do profiling + # Introduce a port wrapper function to avoid including esp_timer.h into the public header + idf_component_optional_requires(PUBLIC esp_timer) +endif() diff --git a/components/freertos/FreeRTOS-Kernel-SMP/portable/xtensa/include/freertos/portmacro.h b/components/freertos/FreeRTOS-Kernel-SMP/portable/xtensa/include/freertos/portmacro.h index 4558a4f05b..5c1cd214a1 100644 --- a/components/freertos/FreeRTOS-Kernel-SMP/portable/xtensa/include/freertos/portmacro.h +++ b/components/freertos/FreeRTOS-Kernel-SMP/portable/xtensa/include/freertos/portmacro.h @@ -382,7 +382,6 @@ portmacro.h. Therefore, we need to keep these headers around for now to allow th #include #include #include "esp_attr.h" -#include "esp_timer.h" #include "esp_newlib.h" #include "esp_heap_caps.h" #include "esp_rom_sys.h" @@ -392,6 +391,11 @@ portmacro.h. Therefore, we need to keep these headers around for now to allow th #include #include +/* [refactor-todo] introduce a port wrapper function to avoid including esp_timer.h into the public header */ +#if CONFIG_FREERTOS_RUN_TIME_STATS_USING_ESP_TIMER +#include "esp_timer.h" +#endif + #ifdef __cplusplus } #endif diff --git a/components/freertos/FreeRTOS-Kernel/portable/riscv/include/freertos/portmacro.h b/components/freertos/FreeRTOS-Kernel/portable/riscv/include/freertos/portmacro.h index 253540b61d..bee5834be0 100644 --- a/components/freertos/FreeRTOS-Kernel/portable/riscv/include/freertos/portmacro.h +++ b/components/freertos/FreeRTOS-Kernel/portable/riscv/include/freertos/portmacro.h @@ -47,7 +47,6 @@ #include "esp_macros.h" #include "esp_attr.h" #include "esp_rom_sys.h" -#include "esp_timer.h" /* required for FreeRTOS run time stats */ #include "esp_heap_caps.h" #include "esp_system.h" /* required by esp_get_...() functions in portable.h. [refactor-todo] Update portable.h */ #include "esp_newlib.h" @@ -55,6 +54,11 @@ /* [refactor-todo] These includes are not directly used in this file. They are kept into to prevent a breaking change. Remove these. */ #include +/* [refactor-todo] introduce a port wrapper function to avoid including esp_timer.h into the public header */ +#if CONFIG_FREERTOS_RUN_TIME_STATS_USING_ESP_TIMER +#include "esp_timer.h" +#endif + #ifdef __cplusplus extern "C" { #endif diff --git a/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h b/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h index 5d0d7e2f1d..edaf65ddb8 100644 --- a/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h +++ b/components/freertos/FreeRTOS-Kernel/portable/xtensa/include/freertos/portmacro.h @@ -76,7 +76,6 @@ #include "esp_private/crosscore_int.h" #include "esp_macros.h" #include "esp_attr.h" -#include "esp_timer.h" /* required for esp_timer_get_time. [refactor-todo] make this common between archs */ #include "esp_newlib.h" /* required for esp_reent_init() in tasks.c */ #include "esp_heap_caps.h" #include "esp_rom_sys.h" @@ -88,6 +87,11 @@ #include #include +/* [refactor-todo] introduce a port wrapper function to avoid including esp_timer.h into the public header */ +#if CONFIG_FREERTOS_RUN_TIME_STATS_USING_ESP_TIMER +#include "esp_timer.h" +#endif + #ifdef __cplusplus extern "C" { #endif diff --git a/components/freertos/test/CMakeLists.txt b/components/freertos/test/CMakeLists.txt index 63eaf7476d..b2703d252f 100644 --- a/components/freertos/test/CMakeLists.txt +++ b/components/freertos/test/CMakeLists.txt @@ -7,4 +7,4 @@ idf_component_register(SRC_DIRS integration/event_groups performance port PRIV_INCLUDE_DIRS . - PRIV_REQUIRES cmock test_utils esp_system driver) + PRIV_REQUIRES cmock test_utils esp_system driver esp_timer) diff --git a/components/freertos/test/integration/tasks/test_task_suspend_resume.c b/components/freertos/test/integration/tasks/test_task_suspend_resume.c index 31538c04b7..c2167459fb 100644 --- a/components/freertos/test/integration/tasks/test_task_suspend_resume.c +++ b/components/freertos/test/integration/tasks/test_task_suspend_resume.c @@ -21,6 +21,7 @@ #endif #include "esp_freertos_hooks.h" #include "esp_rom_sys.h" +#include "esp_timer.h" /* Counter task counts a target variable forever */ static void task_count(void *vp_counter) diff --git a/components/mbedtls/test/CMakeLists.txt b/components/mbedtls/test/CMakeLists.txt index 1bf2b6f99d..5652212109 100644 --- a/components/mbedtls/test/CMakeLists.txt +++ b/components/mbedtls/test/CMakeLists.txt @@ -7,7 +7,7 @@ set(TEST_CRTS "crts/server_cert_chain.pem" idf_component_register(SRC_DIRS "." PRIV_INCLUDE_DIRS "." - PRIV_REQUIRES cmock test_utils mbedtls + PRIV_REQUIRES cmock test_utils mbedtls esp_timer EMBED_TXTFILES ${TEST_CRTS}) diff --git a/components/newlib/test/CMakeLists.txt b/components/newlib/test/CMakeLists.txt index 1300b7e02b..13ea8fe340 100644 --- a/components/newlib/test/CMakeLists.txt +++ b/components/newlib/test/CMakeLists.txt @@ -1,3 +1,3 @@ idf_component_register(SRC_DIRS "." PRIV_INCLUDE_DIRS "." - PRIV_REQUIRES cmock test_utils driver) + PRIV_REQUIRES cmock test_utils driver esp_timer) diff --git a/components/pthread/test/CMakeLists.txt b/components/pthread/test/CMakeLists.txt index d47b53b24b..186c977c2a 100644 --- a/components/pthread/test/CMakeLists.txt +++ b/components/pthread/test/CMakeLists.txt @@ -5,4 +5,4 @@ set(sources "test_pthread.c" "test_pthread_rwlock.c") idf_component_register(SRCS ${sources} - PRIV_REQUIRES cmock test_utils pthread) + PRIV_REQUIRES cmock test_utils pthread esp_timer) diff --git a/components/spi_flash/test/CMakeLists.txt b/components/spi_flash/test/CMakeLists.txt index d3deebf4fa..30b3479006 100644 --- a/components/spi_flash/test/CMakeLists.txt +++ b/components/spi_flash/test/CMakeLists.txt @@ -5,4 +5,5 @@ endif() idf_component_register(SRC_DIRS "." EXCLUDE_SRCS "${exclude_srcs}" PRIV_INCLUDE_DIRS "." - PRIV_REQUIRES cmock test_utils spi_flash bootloader_support app_update driver) + PRIV_REQUIRES cmock test_utils spi_flash bootloader_support app_update + driver esp_timer) diff --git a/components/touch_element/CMakeLists.txt b/components/touch_element/CMakeLists.txt index 67c0316d4e..790d67352e 100644 --- a/components/touch_element/CMakeLists.txt +++ b/components/touch_element/CMakeLists.txt @@ -4,5 +4,6 @@ if(IDF_TARGET STREQUAL "esp32s2") "touch_slider.c" "touch_matrix.c" INCLUDE_DIRS include - REQUIRES driver) + REQUIRES driver + PRIV_REQUIRES esp_timer) endif() diff --git a/components/usb/hcd.c b/components/usb/hcd.c index 3b7fbd1f31..2ef9b220a8 100644 --- a/components/usb/hcd.c +++ b/components/usb/hcd.c @@ -12,7 +12,6 @@ #include "freertos/semphr.h" #include "esp_heap_caps.h" #include "esp_intr_alloc.h" -#include "esp_timer.h" #include "esp_err.h" #include "esp_rom_gpio.h" #include "hal/usbh_hal.h" diff --git a/components/vfs/CMakeLists.txt b/components/vfs/CMakeLists.txt index 72d5689d9f..76d9220553 100644 --- a/components/vfs/CMakeLists.txt +++ b/components/vfs/CMakeLists.txt @@ -5,7 +5,7 @@ idf_component_register(SRCS "vfs.c" "vfs_console.c" INCLUDE_DIRS include PRIV_INCLUDE_DIRS private_include - PRIV_REQUIRES driver) + PRIV_REQUIRES driver esp_timer) if(CONFIG_ESP_CONSOLE_USB_CDC) target_sources(${COMPONENT_LIB} PRIVATE "vfs_cdcacm.c") diff --git a/components/wpa_supplicant/src/common/wpa_supplicant_i.h b/components/wpa_supplicant/src/common/wpa_supplicant_i.h index acf5e8aae4..e3506c40cb 100644 --- a/components/wpa_supplicant/src/common/wpa_supplicant_i.h +++ b/components/wpa_supplicant/src/common/wpa_supplicant_i.h @@ -12,6 +12,7 @@ #include "drivers/driver.h" #include "common/ieee802_11_defs.h" +#include "esp_timer.h" /* * struct rrm_data - Data used for managing RRM features */ diff --git a/docs/en/migration-guides/build-system.rst b/docs/en/migration-guides/build-system.rst index 9d054ddd25..b01fc66729 100644 --- a/docs/en/migration-guides/build-system.rst +++ b/docs/en/migration-guides/build-system.rst @@ -11,7 +11,19 @@ Update fragment file grammar Please follow the :ref:`migrate linker script fragment files grammar` chapter for migrating v3.x grammar to the new one. -Component dependencies that shall be explicit ---------------------------------------------- +Specify component requirements explicitly +----------------------------------------- -In previous versions of ESP-IDF, target components (``components/esp32*``) had a dependency on ``driver`` and ``efuse`` components. Since target components were part of common requirements (:ref:`more info about common requirements `), all components in the project implicitly had a dependency on ``driver`` and ``efuse``. Now that the dependency of target components on these components has been removed, every component depending on ``driver`` or ``efuse`` has to declare this dependency explicitly. This can be done by adding ``REQUIRES `` or ``PRIV_REQUIRES `` in ``idf_component_register`` call inside component's ``CMakeLists.txt``. See :ref:`Component Requirements` for more information on specifying requirements. +In previous versions of ESP-IDF, some components were always added as public requirements (dependencies) to every component in the build, in addition to the :ref:`common requirements`: + +* ``driver`` +* ``efuse`` +* ``esp_timer`` + +This means that it was possible to include header files of those components without specifying them as requirements in ``idf_component_register``. + +This behavior was caused by transitive dependencies of various common components. + +In ESP-IDF v5.0, this behavior is fixed and these components are no longer added as public requirements by default. + +Every component depending on one of the components which isn't part of common requirements has to declare this dependency explicitly. This can be done by adding ``REQUIRES `` or ``PRIV_REQUIRES `` in ``idf_component_register`` call inside component's ``CMakeLists.txt``. See :ref:`Component Requirements` for more information on specifying requirements. diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_reg_test_perf_client_cmd.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_reg_test_perf_client_cmd.c index a2c320e978..c1f85379b8 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_reg_test_perf_client_cmd.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_reg_test_perf_client_cmd.c @@ -8,6 +8,7 @@ #include "freertos/task.h" #include "freertos/queue.h" #include "freertos/FreeRTOSConfig.h" +#include "esp_timer.h" #include "esp_ble_mesh_networking_api.h" #include "ble_mesh_adapter.h" diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_register_cmd.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_register_cmd.c index 6fbe3f45b2..6c73b2c490 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_register_cmd.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_console/main/ble_mesh_register_cmd.c @@ -5,6 +5,7 @@ */ #include "esp_bt.h" +#include "esp_timer.h" #include "soc/soc.h" #include "test.h" diff --git a/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_client/main/main.c b/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_client/main/main.c index f8fe8cc2e9..45ed75bf80 100644 --- a/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_client/main/main.c +++ b/examples/bluetooth/esp_ble_mesh/ble_mesh_vendor_model/vendor_client/main/main.c @@ -13,6 +13,7 @@ #include "esp_log.h" #include "nvs_flash.h" #include "esp_bt.h" +#include "esp_timer.h" #include "esp_ble_mesh_defs.h" #include "esp_ble_mesh_common_api.h" diff --git a/examples/bluetooth/esp_ble_mesh/common_components/button/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/common_components/button/CMakeLists.txt index d223f9855d..f9b07dafe5 100644 --- a/examples/bluetooth/esp_ble_mesh/common_components/button/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/common_components/button/CMakeLists.txt @@ -1,3 +1,3 @@ idf_component_register(SRCS "button.c" "button_obj.cpp" INCLUDE_DIRS "." "include" - PRIV_REQUIRES driver) + PRIV_REQUIRES driver esp_timer) diff --git a/examples/bluetooth/hci/ble_adv_scan_combined/main/app_bt.c b/examples/bluetooth/hci/ble_adv_scan_combined/main/app_bt.c index 6a8e1cf257..920f1203e9 100644 --- a/examples/bluetooth/hci/ble_adv_scan_combined/main/app_bt.c +++ b/examples/bluetooth/hci/ble_adv_scan_combined/main/app_bt.c @@ -11,6 +11,7 @@ #include "freertos/task.h" #include "esp_bt.h" #include "esp_log.h" +#include "esp_timer.h" #include "nvs_flash.h" #include "freertos/queue.h" #include "bt_hci_common.h" diff --git a/examples/common_components/iperf/CMakeLists.txt b/examples/common_components/iperf/CMakeLists.txt index 1f10bcc556..8580fc82ac 100644 --- a/examples/common_components/iperf/CMakeLists.txt +++ b/examples/common_components/iperf/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "iperf.c" INCLUDE_DIRS "include" - REQUIRES lwip) + REQUIRES lwip + PRIV_REQUIRES esp_timer) diff --git a/examples/protocols/https_request/main/https_request_example_main.c b/examples/protocols/https_request/main/https_request_example_main.c index 01c40c04c1..882ef2f6c7 100644 --- a/examples/protocols/https_request/main/https_request_example_main.c +++ b/examples/protocols/https_request/main/https_request_example_main.c @@ -24,6 +24,7 @@ #include "esp_event.h" #include "esp_log.h" #include "esp_system.h" +#include "esp_timer.h" #include "nvs_flash.h" #include "nvs.h" #include "protocol_examples_common.h" diff --git a/examples/system/eventfd/main/eventfd_example.c b/examples/system/eventfd/main/eventfd_example.c index ec89a2a1f1..eed20a66ad 100644 --- a/examples/system/eventfd/main/eventfd_example.c +++ b/examples/system/eventfd/main/eventfd_example.c @@ -16,6 +16,7 @@ #include "esp_vfs.h" #include "esp_vfs_dev.h" #include "esp_vfs_eventfd.h" +#include "esp_timer.h" #include "driver/gptimer.h" #define TIMER_RESOLUTION 1000000 // 1MHz, 1 tick = 1us diff --git a/examples/system/light_sleep/main/light_sleep_example_main.c b/examples/system/light_sleep/main/light_sleep_example_main.c index f42f17e06a..fccb36883f 100644 --- a/examples/system/light_sleep/main/light_sleep_example_main.c +++ b/examples/system/light_sleep/main/light_sleep_example_main.c @@ -14,6 +14,7 @@ #include "driver/uart.h" #include "esp_sleep.h" #include "esp_log.h" +#include "esp_timer.h" #include "light_sleep_example.h" static void light_sleep_task(void *args) diff --git a/tools/test_apps/system/longjmp_test/main/hello_world_main.c b/tools/test_apps/system/longjmp_test/main/hello_world_main.c index 490644cc34..ebd2cec22d 100644 --- a/tools/test_apps/system/longjmp_test/main/hello_world_main.c +++ b/tools/test_apps/system/longjmp_test/main/hello_world_main.c @@ -12,6 +12,7 @@ #include "freertos/task.h" #include "esp_system.h" #include "esp_spi_flash.h" +#include "esp_timer.h" #include #include diff --git a/tools/unit-test-app/components/test_utils/test/CMakeLists.txt b/tools/unit-test-app/components/test_utils/test/CMakeLists.txt index 073f035ec1..df857ed9d4 100644 --- a/tools/unit-test-app/components/test_utils/test/CMakeLists.txt +++ b/tools/unit-test-app/components/test_utils/test/CMakeLists.txt @@ -1,3 +1,3 @@ idf_component_register(SRC_DIRS "." PRIV_INCLUDE_DIRS "." - PRIV_REQUIRES cmock test_utils perfmon) + PRIV_REQUIRES cmock test_utils perfmon esp_timer)