From 2571aaf3c998f128787554cd5db2933126cc555f Mon Sep 17 00:00:00 2001 From: Omar Chebib Date: Fri, 28 Jan 2022 19:47:04 +0800 Subject: [PATCH] G0: target component (components/esp32*) doesn't depend on driver anymore --- components/app_trace/CMakeLists.txt | 3 ++- components/app_update/test/CMakeLists.txt | 2 +- components/cxx/test/CMakeLists.txt | 2 +- components/driver/CMakeLists.txt | 19 ++++++++++++------- components/esp32/CMakeLists.txt | 2 +- components/esp32c2/CMakeLists.txt | 2 +- components/esp32c3/CMakeLists.txt | 2 +- components/esp32h2/CMakeLists.txt | 2 +- components/esp32s2/CMakeLists.txt | 2 +- components/esp32s3/CMakeLists.txt | 2 +- components/esp_eth/CMakeLists.txt | 6 ++++-- components/esp_hw_support/CMakeLists.txt | 4 ++++ .../test_apps/i2c_lcd/main/CMakeLists.txt | 2 +- .../test_apps/i80_lcd/main/CMakeLists.txt | 2 +- .../test_apps/spi_lcd/main/CMakeLists.txt | 2 +- components/esp_netif/test/CMakeLists.txt | 2 +- components/esp_phy/CMakeLists.txt | 5 +++-- components/esp_pm/test/CMakeLists.txt | 2 +- components/esp_system/CMakeLists.txt | 6 +++++- components/tinyusb/CMakeLists.txt | 2 +- components/usb/CMakeLists.txt | 7 +++++-- docs/en/api-guides/build-system.rst | 2 ++ docs/en/migration-guides/build-system.rst | 5 +++++ docs/zh_CN/api-guides/build-system.rst | 2 ++ .../common_components/button/CMakeLists.txt | 3 ++- .../light_driver/CMakeLists.txt | 2 +- .../components/cmd_system/CMakeLists.txt | 1 + .../protocol_examples_common/CMakeLists.txt | 2 +- .../components/eth_enc28j60/CMakeLists.txt | 1 + .../components/musical_buzzer/CMakeLists.txt | 6 ++---- .../rmt/musical_buzzer/main/CMakeLists.txt | 1 + .../components/eeprom/CMakeLists.txt | 3 ++- .../components/slip_modem/CMakeLists.txt | 2 +- .../slip/slip_udp/main/CMakeLists.txt | 2 +- .../components/cmd_system/CMakeLists.txt | 2 +- .../system/ulp_fsm/ulp/main/CMakeLists.txt | 2 +- .../peripherals/usb/main/CMakeLists.txt | 2 +- 37 files changed, 74 insertions(+), 42 deletions(-) diff --git a/components/app_trace/CMakeLists.txt b/components/app_trace/CMakeLists.txt index db67ffb8c5..186628a568 100644 --- a/components/app_trace/CMakeLists.txt +++ b/components/app_trace/CMakeLists.txt @@ -47,7 +47,8 @@ endif() idf_component_register(SRCS "${srcs}" INCLUDE_DIRS "${include_dirs}" PRIV_INCLUDE_DIRS "${priv_include_dirs}" - PRIV_REQUIRES soc + # Requires "driver" for GPTimer in "SEGGER_SYSVIEW_Config_FreeRTOS.c" + PRIV_REQUIRES soc driver LDFRAGMENTS linker.lf) # disable --coverage for this component, as it is used as transport diff --git a/components/app_update/test/CMakeLists.txt b/components/app_update/test/CMakeLists.txt index 92e3da05c3..5f8813fa5c 100644 --- a/components/app_update/test/CMakeLists.txt +++ b/components/app_update/test/CMakeLists.txt @@ -1,4 +1,4 @@ idf_component_register(SRC_DIRS "." PRIV_INCLUDE_DIRS "." - PRIV_REQUIRES cmock test_utils app_update bootloader_support nvs_flash + PRIV_REQUIRES cmock test_utils app_update bootloader_support nvs_flash driver ) diff --git a/components/cxx/test/CMakeLists.txt b/components/cxx/test/CMakeLists.txt index f2df0fd7cc..dc24ac276d 100644 --- a/components/cxx/test/CMakeLists.txt +++ b/components/cxx/test/CMakeLists.txt @@ -1,3 +1,3 @@ idf_component_register(SRC_DIRS "." PRIV_INCLUDE_DIRS "." - PRIV_REQUIRES cmock) + PRIV_REQUIRES cmock driver) diff --git a/components/driver/CMakeLists.txt b/components/driver/CMakeLists.txt index 1ad772f5f8..d8d1c6d6cf 100644 --- a/components/driver/CMakeLists.txt +++ b/components/driver/CMakeLists.txt @@ -108,13 +108,18 @@ if(IDF_TARGET STREQUAL "esp32c2") list(APPEND srcs "spi_slave_hd.c") endif() -idf_component_register(SRCS "${srcs}" - INCLUDE_DIRS ${includes} - PRIV_INCLUDE_DIRS "include/driver" - PRIV_REQUIRES efuse esp_timer - REQUIRES esp_pm esp_ringbuf freertos soc hal esp_hw_support - LDFRAGMENTS linker.lf) -# (REQUIRES cannot hide soc headers, since many arguments in the driver headers are chip-dependent) +if(BOOTLOADER_BUILD) + # Bootloader shall NOT depend on the drivers + idf_component_register() +else() + # (REQUIRES cannot hide soc headers, since many arguments in the driver headers are chip-dependent) + idf_component_register(SRCS "${srcs}" + INCLUDE_DIRS ${includes} + PRIV_INCLUDE_DIRS "include/driver" + PRIV_REQUIRES efuse esp_timer + REQUIRES esp_pm esp_ringbuf freertos soc hal esp_hw_support + LDFRAGMENTS linker.lf) +endif() # uses C11 atomic feature set_source_files_properties(spi_master.c PROPERTIES COMPILE_FLAGS -std=gnu11) diff --git a/components/esp32/CMakeLists.txt b/components/esp32/CMakeLists.txt index adbaff7700..fb254f6d8c 100644 --- a/components/esp32/CMakeLists.txt +++ b/components/esp32/CMakeLists.txt @@ -6,7 +6,7 @@ endif() if(NOT BOOTLOADER_BUILD) # [refactor-todo] propagate these requirements for compatibility # remove in the future - set(legacy_reqs driver efuse soc) + set(legacy_reqs efuse soc) endif() idf_component_register(REQUIRES xtensa "${legacy_reqs}" diff --git a/components/esp32c2/CMakeLists.txt b/components/esp32c2/CMakeLists.txt index 4bf2189055..4236124d69 100644 --- a/components/esp32c2/CMakeLists.txt +++ b/components/esp32c2/CMakeLists.txt @@ -6,7 +6,7 @@ endif() if(NOT BOOTLOADER_BUILD) # [refactor-todo] propagate these requirements for compatibility # remove in the future - set(legacy_reqs driver efuse soc) + set(legacy_reqs efuse soc) endif() idf_component_register(REQUIRES riscv "${legacy_reqs}" diff --git a/components/esp32c3/CMakeLists.txt b/components/esp32c3/CMakeLists.txt index 0b4306ec90..83cb87cdca 100644 --- a/components/esp32c3/CMakeLists.txt +++ b/components/esp32c3/CMakeLists.txt @@ -6,7 +6,7 @@ endif() if(NOT BOOTLOADER_BUILD) # [refactor-todo] propagate these requirements for compatibility # remove in the future - set(legacy_reqs driver efuse soc) + set(legacy_reqs efuse soc) endif() idf_component_register(REQUIRES riscv "${legacy_reqs}" diff --git a/components/esp32h2/CMakeLists.txt b/components/esp32h2/CMakeLists.txt index de20b8490f..40192457cc 100644 --- a/components/esp32h2/CMakeLists.txt +++ b/components/esp32h2/CMakeLists.txt @@ -6,7 +6,7 @@ endif() if(NOT BOOTLOADER_BUILD) # [refactor-todo] propagate these requirements for compatibility # remove in the future - set(legacy_reqs driver efuse soc) + set(legacy_reqs efuse soc) endif() idf_component_register(REQUIRES riscv "${legacy_reqs}" diff --git a/components/esp32s2/CMakeLists.txt b/components/esp32s2/CMakeLists.txt index 662cf9f91f..4c51299002 100644 --- a/components/esp32s2/CMakeLists.txt +++ b/components/esp32s2/CMakeLists.txt @@ -6,7 +6,7 @@ endif() if(NOT BOOTLOADER_BUILD) # [refactor-todo] propagate these requirements for compatibility # remove in the future - set(legacy_reqs driver efuse soc) + set(legacy_reqs efuse soc) endif() idf_component_register(REQUIRES xtensa "${legacy_reqs}" diff --git a/components/esp32s3/CMakeLists.txt b/components/esp32s3/CMakeLists.txt index b28a01f8fd..6bbed41684 100644 --- a/components/esp32s3/CMakeLists.txt +++ b/components/esp32s3/CMakeLists.txt @@ -6,7 +6,7 @@ endif() if(NOT BOOTLOADER_BUILD) # [refactor-todo] propagate these requirements for compatibility # remove in the future - set(legacy_reqs driver efuse soc) + set(legacy_reqs efuse soc) endif() idf_component_register(REQUIRES xtensa "${legacy_reqs}" diff --git a/components/esp_eth/CMakeLists.txt b/components/esp_eth/CMakeLists.txt index 444882fab8..56119ae9b6 100644 --- a/components/esp_eth/CMakeLists.txt +++ b/components/esp_eth/CMakeLists.txt @@ -2,13 +2,15 @@ idf_build_get_property(components_to_build BUILD_COMPONENTS) set(srcs) set(include) -set(priv_requires) +# As CONFIG_ETH_ENABLED comes from Kconfig, it is not evaluated yet +# when components are being registered. +# Thus, always add the (private) requirements, regardless of Kconfig +set(priv_requires driver log esp_timer) # If Ethernet disabled in Kconfig, this is a config-only component if(CONFIG_ETH_ENABLED) set(srcs "src/esp_eth.c" "src/esp_eth_phy.c") set(include "include") - set(priv_requires "driver" "log" "esp_timer") # require "driver" for using some GPIO APIs if(NOT CMAKE_BUILD_EARLY_EXPANSION) # esp_netif related diff --git a/components/esp_hw_support/CMakeLists.txt b/components/esp_hw_support/CMakeLists.txt index 589f9feb4c..2bdc6525dc 100644 --- a/components/esp_hw_support/CMakeLists.txt +++ b/components/esp_hw_support/CMakeLists.txt @@ -18,6 +18,10 @@ if(NOT BOOTLOADER_BUILD) if(NOT CONFIG_IDF_TARGET_ESP32 AND NOT CONFIG_IDF_TARGET_ESP32S2) list(APPEND srcs "sleep_retention.c") endif() + + # [refactor-todo]: requires "driver" for GPIO and RTC (by sleep_gpio and sleep_modes) + list(APPEND priv_requires driver) + else() # Requires "_esp_error_check_failed()" function list(APPEND priv_requires "esp_system") diff --git a/components/esp_lcd/test_apps/i2c_lcd/main/CMakeLists.txt b/components/esp_lcd/test_apps/i2c_lcd/main/CMakeLists.txt index dfec558f2d..687518660d 100644 --- a/components/esp_lcd/test_apps/i2c_lcd/main/CMakeLists.txt +++ b/components/esp_lcd/test_apps/i2c_lcd/main/CMakeLists.txt @@ -2,6 +2,6 @@ set(srcs "test_app_main.c" "test_i2c_lcd_panel.c") idf_component_register(SRCS ${srcs} - PRIV_REQUIRES esp_lcd unity) + PRIV_REQUIRES esp_lcd unity driver) target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_i2c_lcd") diff --git a/components/esp_lcd/test_apps/i80_lcd/main/CMakeLists.txt b/components/esp_lcd/test_apps/i80_lcd/main/CMakeLists.txt index d8421978f1..ef0741a205 100644 --- a/components/esp_lcd/test_apps/i80_lcd/main/CMakeLists.txt +++ b/components/esp_lcd/test_apps/i80_lcd/main/CMakeLists.txt @@ -2,6 +2,6 @@ set(srcs "test_app_main.c" "test_i80_lcd_panel.c") idf_component_register(SRCS ${srcs} - PRIV_REQUIRES esp_lcd unity) + PRIV_REQUIRES esp_lcd unity driver) target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_i80_lcd") diff --git a/components/esp_lcd/test_apps/spi_lcd/main/CMakeLists.txt b/components/esp_lcd/test_apps/spi_lcd/main/CMakeLists.txt index d3fff0f65b..8fce5f1489 100644 --- a/components/esp_lcd/test_apps/spi_lcd/main/CMakeLists.txt +++ b/components/esp_lcd/test_apps/spi_lcd/main/CMakeLists.txt @@ -2,6 +2,6 @@ set(srcs "test_app_main.c" "test_spi_lcd_panel.c") idf_component_register(SRCS ${srcs} - PRIV_REQUIRES esp_lcd unity) + PRIV_REQUIRES esp_lcd unity driver) target_link_libraries(${COMPONENT_LIB} INTERFACE "-u test_app_include_spi_lcd") diff --git a/components/esp_netif/test/CMakeLists.txt b/components/esp_netif/test/CMakeLists.txt index 3e433f8f27..c6b2652edd 100644 --- a/components/esp_netif/test/CMakeLists.txt +++ b/components/esp_netif/test/CMakeLists.txt @@ -1,3 +1,3 @@ idf_component_register(SRC_DIRS "." PRIV_INCLUDE_DIRS "../private_include" "." - PRIV_REQUIRES cmock test_utils esp_netif nvs_flash) + PRIV_REQUIRES cmock test_utils esp_netif nvs_flash driver) diff --git a/components/esp_phy/CMakeLists.txt b/components/esp_phy/CMakeLists.txt index d505483386..7a5a18808f 100644 --- a/components/esp_phy/CMakeLists.txt +++ b/components/esp_phy/CMakeLists.txt @@ -28,17 +28,18 @@ if(CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN) endif() endif() +# [refactor-todo]: requires "driver" component for periph_ctrl header file if(CONFIG_ESP_PHY_MULTIPLE_INIT_DATA_BIN_EMBED) idf_component_register(SRCS "${srcs}" INCLUDE_DIRS "include" "${idf_target}/include" - PRIV_REQUIRES nvs_flash + PRIV_REQUIRES nvs_flash driver LDFRAGMENTS "${ldfragments}" EMBED_FILES "${build_dir}/phy_multiple_init_data.bin" ) else() idf_component_register(SRCS "${srcs}" INCLUDE_DIRS "include" "${idf_target}/include" - PRIV_REQUIRES nvs_flash + PRIV_REQUIRES nvs_flash driver LDFRAGMENTS "${ldfragments}" ) endif() diff --git a/components/esp_pm/test/CMakeLists.txt b/components/esp_pm/test/CMakeLists.txt index 3decbe6dcf..009da5486a 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) + PRIV_REQUIRES unity esp_pm ulp driver) diff --git a/components/esp_system/CMakeLists.txt b/components/esp_system/CMakeLists.txt index 8b867bfa62..a555e65138 100644 --- a/components/esp_system/CMakeLists.txt +++ b/components/esp_system/CMakeLists.txt @@ -41,7 +41,11 @@ else() # should be removable once using component init functions # link-time registration is used. esp_pm app_update nvs_flash pthread - esp_phy efuse + # [refactor-todo] requires "driver" for headers: + # - periph_ctrl.h + # - rtc_cntl.h + # - spi_common_internal.h + esp_phy efuse driver LDFRAGMENTS "linker.lf" "app.lf") add_subdirectory(port) diff --git a/components/tinyusb/CMakeLists.txt b/components/tinyusb/CMakeLists.txt index 5e90277ec2..9b8935c996 100644 --- a/components/tinyusb/CMakeLists.txt +++ b/components/tinyusb/CMakeLists.txt @@ -76,7 +76,7 @@ endif() # CONFIG_TINYUSB idf_component_register(SRCS ${srcs} INCLUDE_DIRS ${includes_public} PRIV_INCLUDE_DIRS ${includes_private} - PRIV_REQUIRES "vfs" "usb" + PRIV_REQUIRES "vfs" "usb" "driver" ) if(CONFIG_TINYUSB) diff --git a/components/usb/CMakeLists.txt b/components/usb/CMakeLists.txt index 5bf8229d5c..bb89fdd6db 100644 --- a/components/usb/CMakeLists.txt +++ b/components/usb/CMakeLists.txt @@ -1,7 +1,11 @@ set(srcs) set(include) set(priv_include) -set(priv_require) +# As CONFIG_USB_OTG_SUPPORTED comes from Kconfig, it is not evaluated yet +# when components are being registered. +# Thus, always add the (private) requirements, regardless of Kconfig +# [refactor-todo]: requires "driver" because "periph_ctrl.h" is used in "hcd.c" +set(priv_require hal driver) if(CONFIG_USB_OTG_SUPPORTED) list(APPEND srcs "hcd.c" @@ -13,7 +17,6 @@ if(CONFIG_USB_OTG_SUPPORTED) "usb_phy.c") list(APPEND include "include") list(APPEND priv_include "private_include") - list(APPEND priv_require "hal" "driver") endif() idf_component_register(SRCS ${srcs} diff --git a/docs/en/api-guides/build-system.rst b/docs/en/api-guides/build-system.rst index 061a6aaf76..87f0b8480d 100644 --- a/docs/en/api-guides/build-system.rst +++ b/docs/en/api-guides/build-system.rst @@ -627,6 +627,8 @@ Main component requirements The component named ``main`` is special because it automatically requires all other components in the build. So it's not necessary to pass ``REQUIRES`` or ``PRIV_REQUIRES`` to this component. See :ref:`renaming main ` for a description of what needs to be changed if no longer using the ``main`` component. +.. _component-common-requirements: + Common component requirements ----------------------------- diff --git a/docs/en/migration-guides/build-system.rst b/docs/en/migration-guides/build-system.rst index 0a3e790361..c1c780d23d 100644 --- a/docs/en/migration-guides/build-system.rst +++ b/docs/en/migration-guides/build-system.rst @@ -10,3 +10,8 @@ Update fragment file grammar ---------------------------- Please follow the :ref:`migrate linker script fragment files grammar` chapter for migrating v3.x grammar to the new one. + +Dependency on driver component shall be explicit +------------------------------------------------ + +In previous versions of ESP-IDF, target components (``components/esp32*``) had a dependency on ``driver`` component. 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`` component. Now that the dependency of target components on ``driver`` has been removed, every component which depends on ``driver`` has to declare this dependency explicitly. This can be done by adding ``REQUIRES driver`` or ``PRIV_REQUIRES driver`` in ``idf_component_register`` call inside component's ``CMakeLists.txt``. See :ref:`Component Requirements` for more information on specifying component requirements. diff --git a/docs/zh_CN/api-guides/build-system.rst b/docs/zh_CN/api-guides/build-system.rst index 98cb9e73f3..04e69e755f 100644 --- a/docs/zh_CN/api-guides/build-system.rst +++ b/docs/zh_CN/api-guides/build-system.rst @@ -627,6 +627,8 @@ Spark Plug 组件 ``main`` 组件比较特别,因为它在构建过程中自动依赖所有其他组件。所以不需要向这个组件传递 ``REQUIRES`` 或 ``PRIV_REQUIRES``。有关不再使用 ``main`` 组件时需要更改哪些内容,请参考 :ref:`重命名 main 组件`。 +.. _component-common-requirements: + 通用组件依赖项 -------------- 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 73d8490240..d223f9855d 100644 --- a/examples/bluetooth/esp_ble_mesh/common_components/button/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/common_components/button/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "button.c" "button_obj.cpp" - INCLUDE_DIRS "." "include") + INCLUDE_DIRS "." "include" + PRIV_REQUIRES driver) diff --git a/examples/bluetooth/esp_ble_mesh/common_components/light_driver/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/common_components/light_driver/CMakeLists.txt index 20aca5ea89..12b940ee56 100644 --- a/examples/bluetooth/esp_ble_mesh/common_components/light_driver/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/common_components/light_driver/CMakeLists.txt @@ -5,6 +5,6 @@ set(COMPONENT_SRCS "light_driver.c" set(COMPONENT_ADD_INCLUDEDIRS ". include") # requirements can't depend on config -set(COMPONENT_REQUIRES example_nvs) +set(COMPONENT_REQUIRES example_nvs driver) register_component() diff --git a/examples/bluetooth/nimble/throughput_app/blecent_throughput/components/cmd_system/CMakeLists.txt b/examples/bluetooth/nimble/throughput_app/blecent_throughput/components/cmd_system/CMakeLists.txt index 730bfff916..81198d6511 100644 --- a/examples/bluetooth/nimble/throughput_app/blecent_throughput/components/cmd_system/CMakeLists.txt +++ b/examples/bluetooth/nimble/throughput_app/blecent_throughput/components/cmd_system/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "cmd_system.c" INCLUDE_DIRS "." + PRIV_REQUIRES driver REQUIRES console spi_flash) diff --git a/examples/common_components/protocol_examples_common/CMakeLists.txt b/examples/common_components/protocol_examples_common/CMakeLists.txt index 5c19957ba6..5f9317e17d 100644 --- a/examples/common_components/protocol_examples_common/CMakeLists.txt +++ b/examples/common_components/protocol_examples_common/CMakeLists.txt @@ -1,4 +1,4 @@ idf_component_register(SRCS "connect.c" "stdin_out.c" "addr_from_stdin.c" INCLUDE_DIRS "include" - PRIV_REQUIRES esp_netif + PRIV_REQUIRES esp_netif driver ) diff --git a/examples/ethernet/enc28j60/components/eth_enc28j60/CMakeLists.txt b/examples/ethernet/enc28j60/components/eth_enc28j60/CMakeLists.txt index 687c597bc5..1ee84a2a4a 100644 --- a/examples/ethernet/enc28j60/components/eth_enc28j60/CMakeLists.txt +++ b/examples/ethernet/enc28j60/components/eth_enc28j60/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "esp_eth_mac_enc28j60.c" "esp_eth_phy_enc28j60.c" + PRIV_REQUIRES driver INCLUDE_DIRS ".") diff --git a/examples/peripherals/rmt/musical_buzzer/components/musical_buzzer/CMakeLists.txt b/examples/peripherals/rmt/musical_buzzer/components/musical_buzzer/CMakeLists.txt index 3bf7b77c25..55d61201f3 100644 --- a/examples/peripherals/rmt/musical_buzzer/components/musical_buzzer/CMakeLists.txt +++ b/examples/peripherals/rmt/musical_buzzer/components/musical_buzzer/CMakeLists.txt @@ -1,7 +1,5 @@ set(component_srcs "src/musical_buzzer_rmt.c") idf_component_register(SRCS "${component_srcs}" - INCLUDE_DIRS "include" - PRIV_INCLUDE_DIRS "" - PRIV_REQUIRES "driver" - REQUIRES "") + INCLUDE_DIRS include + PRIV_REQUIRES driver) diff --git a/examples/peripherals/rmt/musical_buzzer/main/CMakeLists.txt b/examples/peripherals/rmt/musical_buzzer/main/CMakeLists.txt index 26d4896b85..34c61acc67 100644 --- a/examples/peripherals/rmt/musical_buzzer/main/CMakeLists.txt +++ b/examples/peripherals/rmt/musical_buzzer/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "musical_buzzer_example_main.c" + PRIV_REQUIRES musical_buzzer driver INCLUDE_DIRS ".") diff --git a/examples/peripherals/spi_master/hd_eeprom/components/eeprom/CMakeLists.txt b/examples/peripherals/spi_master/hd_eeprom/components/eeprom/CMakeLists.txt index 0628cd8d09..5dc1ae18f9 100644 --- a/examples/peripherals/spi_master/hd_eeprom/components/eeprom/CMakeLists.txt +++ b/examples/peripherals/spi_master/hd_eeprom/components/eeprom/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "spi_eeprom.c" LDFRAGMENTS "linker.lf" - INCLUDE_DIRS ".") + INCLUDE_DIRS "." + PRIV_REQUIRES driver) diff --git a/examples/protocols/slip/slip_udp/components/slip_modem/CMakeLists.txt b/examples/protocols/slip/slip_udp/components/slip_modem/CMakeLists.txt index e3fc55fbf1..f35a62ba33 100644 --- a/examples/protocols/slip/slip_udp/components/slip_modem/CMakeLists.txt +++ b/examples/protocols/slip/slip_udp/components/slip_modem/CMakeLists.txt @@ -3,5 +3,5 @@ idf_component_register( SRCS "library/slip_modem.c" INCLUDE_DIRS "include" - REQUIRES esp_netif + REQUIRES esp_netif driver ) diff --git a/examples/protocols/slip/slip_udp/main/CMakeLists.txt b/examples/protocols/slip/slip_udp/main/CMakeLists.txt index 903e70d277..cecffd821b 100644 --- a/examples/protocols/slip/slip_udp/main/CMakeLists.txt +++ b/examples/protocols/slip/slip_udp/main/CMakeLists.txt @@ -3,5 +3,5 @@ idf_component_register( SRCS "slip_client_main.c" INCLUDE_DIRS "." - REQUIRES esp_netif slip_modem + REQUIRES esp_netif slip_modem driver ) diff --git a/examples/system/console/advanced/components/cmd_system/CMakeLists.txt b/examples/system/console/advanced/components/cmd_system/CMakeLists.txt index 0e922b1b4c..f54289c18c 100644 --- a/examples/system/console/advanced/components/cmd_system/CMakeLists.txt +++ b/examples/system/console/advanced/components/cmd_system/CMakeLists.txt @@ -1,3 +1,3 @@ idf_component_register(SRCS "cmd_system.c" INCLUDE_DIRS . - REQUIRES console spi_flash) + REQUIRES console spi_flash driver) diff --git a/examples/system/ulp_fsm/ulp/main/CMakeLists.txt b/examples/system/ulp_fsm/ulp/main/CMakeLists.txt index 1ac5db2578..a75dc6afb0 100644 --- a/examples/system/ulp_fsm/ulp/main/CMakeLists.txt +++ b/examples/system/ulp_fsm/ulp/main/CMakeLists.txt @@ -1,6 +1,6 @@ idf_component_register(SRCS "ulp_example_main.c" INCLUDE_DIRS "" - REQUIRES soc nvs_flash ulp) + REQUIRES driver soc nvs_flash ulp) # # ULP support additions to component CMakeLists.txt. # diff --git a/tools/test_apps/peripherals/usb/main/CMakeLists.txt b/tools/test_apps/peripherals/usb/main/CMakeLists.txt index f6a7adaa54..b25d15fabb 100644 --- a/tools/test_apps/peripherals/usb/main/CMakeLists.txt +++ b/tools/test_apps/peripherals/usb/main/CMakeLists.txt @@ -1,3 +1,3 @@ idf_component_register(SRCS "usb_test_main.c" INCLUDE_DIRS "" - REQUIRES unity) + REQUIRES unity driver usb)