diff --git a/Kconfig b/Kconfig index 1f88204897..6e16fb3248 100644 --- a/Kconfig +++ b/Kconfig @@ -668,6 +668,13 @@ mainmenu "Espressif IoT Development Framework Configuration" endmenu # Compiler Options menu "Component config" + comment "!!! MINIMAL_BUILD is enabled !!!" + depends on "${IDF_MINIMAL_BUILD}" + comment "Only common components and those transitively required by the main component are listed" + depends on "${IDF_MINIMAL_BUILD}" + comment "If a component configuration is missing, please add it to the main component's requirements" + depends on "${IDF_MINIMAL_BUILD}" + source "$COMPONENT_KCONFIGS_SOURCE_FILE" endmenu diff --git a/docs/en/api-guides/build-system.rst b/docs/en/api-guides/build-system.rst index 0532114108..a2469d325d 100644 --- a/docs/en/api-guides/build-system.rst +++ b/docs/en/api-guides/build-system.rst @@ -243,7 +243,7 @@ These variables all have default values that can be overridden for custom behavi - ``EXTRA_COMPONENT_DIRS``: Optional list of additional directories to search for components. Paths can be relative to the project directory, or absolute. -- ``COMPONENTS``: A list of component names to build into the project. Defaults to all components found in the ``COMPONENT_DIRS`` directories. Use this variable to "trim down" the project for faster build times. Note that any component which "requires" another component via the REQUIRES or PRIV_REQUIRES arguments on component registration will automatically have it added to this list, so the ``COMPONENTS`` list can be very short. +- ``COMPONENTS``: A list of component names to build into the project. Defaults to all components found in the ``COMPONENT_DIRS`` directories. Use this variable to "trim down" the project for faster build times. Note that any component which "requires" another component via the REQUIRES or PRIV_REQUIRES arguments on component registration will automatically have it added to this list, so the ``COMPONENTS`` list can be very short. The ``MINIMAL_BUILD`` :ref:`build property ` can be used as an alternative to specifying only the ``main`` component in ``COMPONENTS``. - ``BOOTLOADER_IGNORE_EXTRA_COMPONENT``: Optional list of components, placed in ``bootloader_components/``, that should be ignored by the bootloader compilation. Use this variable if a bootloader component needs to be included conditionally inside the project. @@ -618,6 +618,11 @@ Including Components in the Build - The "common" components that every component depends on. - Setting ``COMPONENTS`` to the minimal list of required components can significantly reduce compile times. +- The ``MINIMAL_BUILD`` :ref:`build property ` can be set to ``ON``, which acts as a shortcut to configure the ``COMPONENTS`` variable to include only the ``main`` component. If the ``COMPONENTS`` variable is defined while the ``MINIMAL_BUILD`` property is enabled, ``COMPONENTS`` will take precedence. + +.. note:: + + When using the ``COMPONENTS`` variable or the ``MINIMAL_BUILD`` build property to specify components, certain features and configurations, such as those provided by esp_psram or espcoredump components, may not be included by default. To include these features, you must add the relevant components to the ``COMPONENTS`` variable or list them in the ``REQUIRES`` or ``PRIV_REQUIRES`` argument during component registration. .. _component-circular-dependencies: @@ -1370,6 +1375,7 @@ These are properties that describe the build. Values of build properties can be - INCLUDE_DIRECTORIES - include directories for all component source files - KCONFIGS - list of Kconfig files found in components in build; set by ``idf_build_process`` - KCONFIG_PROJBUILDS - list of Kconfig.projbuild files found in components in build; set by ``idf_build_process`` +- MINIMAL_BUILD - perform a minimal build by including only the "common" components required by all other components, along with the components that are direct or transitive dependencies only of the ``main`` component. By default, this property is disabled (set to ``OFF``), but it can be enabled by setting it to ``ON``. - PROJECT_NAME - name of the project; set from ``idf_build_process`` PROJECT_NAME argument - PROJECT_DIR - directory of the project; set from ``idf_build_process`` PROJECT_DIR argument - PROJECT_VER - version of the project; set from ``idf_build_process`` PROJECT_VER argument diff --git a/docs/en/api-guides/core_dump.rst b/docs/en/api-guides/core_dump.rst index 065101d6bf..3ecd93c046 100644 --- a/docs/en/api-guides/core_dump.rst +++ b/docs/en/api-guides/core_dump.rst @@ -16,6 +16,9 @@ Core dump data is saved to a core dump file according to a particular format, se Configurations -------------- +.. note:: + The ``Core dump`` configuration options are available only if the ``espcoredump`` component is included in the build. + Destination ^^^^^^^^^^^ diff --git a/docs/en/api-guides/external-ram.rst b/docs/en/api-guides/external-ram.rst index 44a8d3bd7f..9ecd2ad8da 100644 --- a/docs/en/api-guides/external-ram.rst +++ b/docs/en/api-guides/external-ram.rst @@ -46,6 +46,9 @@ For specific details about connecting the SoC or module pins to an external PSRA Configuring External RAM ======================== +.. note:: + The ``SPI RAM`` configuration options are available only if the ``esp_psram`` component is included in the build. + ESP-IDF fully supports the use of external RAM in applications. Once the external RAM is initialized at startup, ESP-IDF can be configured to integrate the external RAM in several ways: .. list:: diff --git a/docs/zh_CN/api-guides/build-system.rst b/docs/zh_CN/api-guides/build-system.rst index 88adf5e5a8..0e21ecd165 100644 --- a/docs/zh_CN/api-guides/build-system.rst +++ b/docs/zh_CN/api-guides/build-system.rst @@ -243,7 +243,7 @@ ESP-IDF 适用于 Python 3.9 以上版本。 - ``EXTRA_COMPONENT_DIRS``:用于搜索组件的其它可选目录列表。路径可以是相对于项目目录的相对路径,也可以是绝对路径。 -- ``COMPONENTS``:要构建进项目中的组件名称列表,默认为 ``COMPONENT_DIRS`` 目录下检索到的所有组件。使用此变量可以“精简”项目以缩短构建时间。请注意,如果一个组件通过 ``COMPONENT_REQUIRES`` 指定了它依赖的另一个组件,则会自动将其添加到 ``COMPONENTS`` 中,所以 ``COMPONENTS`` 列表可能会非常短。 +- ``COMPONENTS``:用于指定要构建到项目中的组件名称列表,默认为 ``COMPONENT_DIRS`` 目录下检索到的所有组件。使用此变量可以“精简”项目,从而缩短构建时间。请注意,如果一个组件通过 ``COMPONENT_REQUIRES`` 指定了它依赖的另一个组件,则会自动将其添加到 ``COMPONENTS`` 中,所以 ``COMPONENTS`` 列表可能会非常短。另外,还可以通过设置 ``MINIMAL_BUILD`` :ref:`构建属性 ` 来指定 ``COMPONENTS`` 中的 ``main`` 组件。 - ``BOOTLOADER_IGNORE_EXTRA_COMPONENT``:可选组件列表,位于 ``bootloader_components/`` 目录中,引导加载程序编译时会忽略该列表中的组件。使用这一变量可以将一个组件有条件地包含在项目中。 @@ -618,6 +618,11 @@ Spark Plug 组件 * 每个组件都依赖的通用组件。 - 将 ``COMPONENTS`` 设置为所需组件的最小列表,可以显著减少项目的构建时间。 +- 可以将 ``MINIMAL_BUILD`` :ref:`构建属性 ` 设为 ``ON``,从而快捷配置 ``COMPONENTS`` 变量,使其仅包含 ``main`` 组件。如果在启用 ``MINIMAL_BUILD`` 属性的同时定义了 ``COMPONENTS`` 变量,则 ``COMPONENTS`` 会优先生效。 + +.. note:: + + 使用 ``COMPONENTS`` 变量或 ``MINIMAL_BUILD`` 构建属性指定组件时,一些功能和配置(如 esp_psram 或 espcoredump 组件提供的功能和配置)可能不会被默认包含。如需使用这些功能,须将相关组件添加到 ``COMPONENTS`` 变量中,或在组件注册时将其列入 ``REQUIRES`` 或 ``PRIV_REQUIRES`` 参数。 .. _component-circular-dependencies: @@ -1370,6 +1375,7 @@ ESP-IDF 构建属性 - INCLUDE_DIRECTORIES - 包含所有组件源文件的目录。 - KCONFIGS - 构建过程中组件里的 Kconfig 文件的列表;由 ``idf_build_process`` 设置。 - KCONFIG_PROJBUILDS - 构建过程中组件中的 Kconfig.projbuild 文件的列表;由 ``idf_build_process`` 设置。 +- MINIMAL_BUILD - 仅包含所有其他组件所需的“通用”组件,以及仅与 ``main`` 组件有直接或传递依赖关系的组件,从而进行最小化构建。默认情况下该属性处于禁用状态(设置为 ``OFF``),如需启用,可将其设置为 ``ON``。 - PROJECT_NAME - 项目名称;由 ``idf_build_process`` 的 PROJECT_NAME 参数设置。 - PROJECT_DIR - 项目的目录;由 ``idf_build_process`` 的 PROJECT_DIR 参数设置。 - PROJECT_VER - 项目的版本;由 ``idf_build_process`` 的 PROJECT_VER 参数设置。 diff --git a/docs/zh_CN/api-guides/core_dump.rst b/docs/zh_CN/api-guides/core_dump.rst index 4555d2516a..4a4ed94bf2 100644 --- a/docs/zh_CN/api-guides/core_dump.rst +++ b/docs/zh_CN/api-guides/core_dump.rst @@ -16,6 +16,9 @@ 配置 -------------- +.. note:: + 只有在构建中包含 ``espcoredump`` 组件时,``Core dump`` 配置选项才可用。 + 目标 ^^^^^^^^^^^ diff --git a/docs/zh_CN/api-guides/external-ram.rst b/docs/zh_CN/api-guides/external-ram.rst index 51a8af1b9d..4dd921ddef 100644 --- a/docs/zh_CN/api-guides/external-ram.rst +++ b/docs/zh_CN/api-guides/external-ram.rst @@ -46,6 +46,9 @@ 配置片外 RAM ======================== +.. note:: + 只有在构建中包含 ``esp_psram`` 组件时,``SPI RAM`` 配置选项才可用。 + ESP-IDF 完全支持将片外 RAM 集成到你的应用程序中。在启动并完成片外 RAM 初始化后,可以将 ESP-IDF 配置为用多种方式处理片外 RAM: .. list:: diff --git a/examples/bluetooth/ble_get_started/nimble/NimBLE_Beacon/CMakeLists.txt b/examples/bluetooth/ble_get_started/nimble/NimBLE_Beacon/CMakeLists.txt index 198b0586f0..da31a4c62a 100644 --- a/examples/bluetooth/ble_get_started/nimble/NimBLE_Beacon/CMakeLists.txt +++ b/examples/bluetooth/ble_get_started/nimble/NimBLE_Beacon/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(nimble_beacon) diff --git a/examples/bluetooth/ble_get_started/nimble/NimBLE_Beacon/main/CMakeLists.txt b/examples/bluetooth/ble_get_started/nimble/NimBLE_Beacon/main/CMakeLists.txt index 5841113299..e60bfdacb5 100644 --- a/examples/bluetooth/ble_get_started/nimble/NimBLE_Beacon/main/CMakeLists.txt +++ b/examples/bluetooth/ble_get_started/nimble/NimBLE_Beacon/main/CMakeLists.txt @@ -1,4 +1,5 @@ file(GLOB_RECURSE srcs "main.c" "src/*.c") idf_component_register(SRCS "${srcs}" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS "./include") diff --git a/examples/bluetooth/ble_get_started/nimble/NimBLE_Connection/CMakeLists.txt b/examples/bluetooth/ble_get_started/nimble/NimBLE_Connection/CMakeLists.txt index b42ec984ae..1a0f14f864 100644 --- a/examples/bluetooth/ble_get_started/nimble/NimBLE_Connection/CMakeLists.txt +++ b/examples/bluetooth/ble_get_started/nimble/NimBLE_Connection/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(nimble_connection) diff --git a/examples/bluetooth/ble_get_started/nimble/NimBLE_Connection/main/CMakeLists.txt b/examples/bluetooth/ble_get_started/nimble/NimBLE_Connection/main/CMakeLists.txt index 5841113299..7b976bfc0b 100644 --- a/examples/bluetooth/ble_get_started/nimble/NimBLE_Connection/main/CMakeLists.txt +++ b/examples/bluetooth/ble_get_started/nimble/NimBLE_Connection/main/CMakeLists.txt @@ -1,4 +1,5 @@ file(GLOB_RECURSE srcs "main.c" "src/*.c") idf_component_register(SRCS "${srcs}" + PRIV_REQUIRES bt nvs_flash esp_driver_gpio INCLUDE_DIRS "./include") diff --git a/examples/bluetooth/ble_get_started/nimble/NimBLE_GATT_Server/CMakeLists.txt b/examples/bluetooth/ble_get_started/nimble/NimBLE_GATT_Server/CMakeLists.txt index 604d8b5f68..69f6c1bfb5 100644 --- a/examples/bluetooth/ble_get_started/nimble/NimBLE_GATT_Server/CMakeLists.txt +++ b/examples/bluetooth/ble_get_started/nimble/NimBLE_GATT_Server/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(nimble_gatt_server) diff --git a/examples/bluetooth/ble_get_started/nimble/NimBLE_GATT_Server/main/CMakeLists.txt b/examples/bluetooth/ble_get_started/nimble/NimBLE_GATT_Server/main/CMakeLists.txt index 5841113299..7b976bfc0b 100644 --- a/examples/bluetooth/ble_get_started/nimble/NimBLE_GATT_Server/main/CMakeLists.txt +++ b/examples/bluetooth/ble_get_started/nimble/NimBLE_GATT_Server/main/CMakeLists.txt @@ -1,4 +1,5 @@ file(GLOB_RECURSE srcs "main.c" "src/*.c") idf_component_register(SRCS "${srcs}" + PRIV_REQUIRES bt nvs_flash esp_driver_gpio INCLUDE_DIRS "./include") diff --git a/examples/bluetooth/ble_get_started/nimble/NimBLE_Security/CMakeLists.txt b/examples/bluetooth/ble_get_started/nimble/NimBLE_Security/CMakeLists.txt index d72998f08a..bc63a9865d 100644 --- a/examples/bluetooth/ble_get_started/nimble/NimBLE_Security/CMakeLists.txt +++ b/examples/bluetooth/ble_get_started/nimble/NimBLE_Security/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(nimble_security) diff --git a/examples/bluetooth/ble_get_started/nimble/NimBLE_Security/main/CMakeLists.txt b/examples/bluetooth/ble_get_started/nimble/NimBLE_Security/main/CMakeLists.txt index 5841113299..7b976bfc0b 100644 --- a/examples/bluetooth/ble_get_started/nimble/NimBLE_Security/main/CMakeLists.txt +++ b/examples/bluetooth/ble_get_started/nimble/NimBLE_Security/main/CMakeLists.txt @@ -1,4 +1,5 @@ file(GLOB_RECURSE srcs "main.c" "src/*.c") idf_component_register(SRCS "${srcs}" + PRIV_REQUIRES bt nvs_flash esp_driver_gpio INCLUDE_DIRS "./include") diff --git a/examples/bluetooth/bluedroid/ble/ble_ancs/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/ble_ancs/CMakeLists.txt index fc70e33f60..6f8037a00b 100644 --- a/examples/bluetooth/bluedroid/ble/ble_ancs/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/ble_ancs/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ble_ancs) diff --git a/examples/bluetooth/bluedroid/ble/ble_ancs/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/ble_ancs/main/CMakeLists.txt index 18d14d5b56..5e39412c26 100644 --- a/examples/bluetooth/bluedroid/ble/ble_ancs/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/ble_ancs/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "ble_ancs_demo.c" "ble_ancs.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/ble/ble_compatibility_test/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/ble_compatibility_test/CMakeLists.txt index 0fa69cd37a..494477b2a8 100644 --- a/examples/bluetooth/bluedroid/ble/ble_compatibility_test/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/ble_compatibility_test/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ble_compatibility_test) diff --git a/examples/bluetooth/bluedroid/ble/ble_compatibility_test/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/ble_compatibility_test/main/CMakeLists.txt index 1989ce57b3..cab6954623 100644 --- a/examples/bluetooth/bluedroid/ble/ble_compatibility_test/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/ble_compatibility_test/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "ble_compatibility_test.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/ble/ble_eddystone/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/ble_eddystone/CMakeLists.txt index c16dc67db8..7d199af460 100644 --- a/examples/bluetooth/bluedroid/ble/ble_eddystone/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/ble_eddystone/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ble_eddystone_demo) diff --git a/examples/bluetooth/bluedroid/ble/ble_eddystone/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/ble_eddystone/main/CMakeLists.txt index 8290fc6305..e340ff58ea 100644 --- a/examples/bluetooth/bluedroid/ble/ble_eddystone/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/ble_eddystone/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "esp_eddystone_api.c" "esp_eddystone_demo.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS "") diff --git a/examples/bluetooth/bluedroid/ble/ble_hid_device_demo/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/ble_hid_device_demo/CMakeLists.txt index 4af1f814c1..6bd2c67839 100644 --- a/examples/bluetooth/bluedroid/ble/ble_hid_device_demo/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/ble_hid_device_demo/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(hidd_demos) diff --git a/examples/bluetooth/bluedroid/ble/ble_hid_device_demo/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/ble_hid_device_demo/main/CMakeLists.txt index 1c12b152ca..656831d36e 100644 --- a/examples/bluetooth/bluedroid/ble/ble_hid_device_demo/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/ble_hid_device_demo/main/CMakeLists.txt @@ -2,6 +2,7 @@ idf_component_register(SRCS "ble_hidd_demo_main.c" "esp_hidd_prf_api.c" "hid_dev.c" "hid_device_le_prf.c" + PRIV_REQUIRES bt nvs_flash esp_driver_gpio INCLUDE_DIRS ".") target_compile_options(${COMPONENT_LIB} PRIVATE -Wno-unused-const-variable) diff --git a/examples/bluetooth/bluedroid/ble/ble_ibeacon/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/ble_ibeacon/CMakeLists.txt index 881eabf072..49998e7b8f 100644 --- a/examples/bluetooth/bluedroid/ble/ble_ibeacon/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/ble_ibeacon/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ble_ibeacon_demo) diff --git a/examples/bluetooth/bluedroid/ble/ble_ibeacon/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/ble_ibeacon/main/CMakeLists.txt index ce4d00817e..976d040096 100644 --- a/examples/bluetooth/bluedroid/ble/ble_ibeacon/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/ble_ibeacon/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "esp_ibeacon_api.c" "ibeacon_demo.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/ble/ble_spp_client/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/ble_spp_client/CMakeLists.txt index 8f0de05daf..5c652dad4d 100644 --- a/examples/bluetooth/bluedroid/ble/ble_spp_client/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/ble_spp_client/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(spp_client_demo) diff --git a/examples/bluetooth/bluedroid/ble/ble_spp_client/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/ble_spp_client/main/CMakeLists.txt index 5fa00fb626..6ef33d3b2e 100644 --- a/examples/bluetooth/bluedroid/ble/ble_spp_client/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/ble_spp_client/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "spp_client_demo.c" + PRIV_REQUIRES bt esp_driver_uart nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/ble/ble_spp_server/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/ble_spp_server/CMakeLists.txt index 0fc8fb7d65..f7975f01f8 100644 --- a/examples/bluetooth/bluedroid/ble/ble_spp_server/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/ble_spp_server/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ble_spp_server_demo) diff --git a/examples/bluetooth/bluedroid/ble/ble_spp_server/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/ble_spp_server/main/CMakeLists.txt index a4b8961bf1..f9a9453618 100644 --- a/examples/bluetooth/bluedroid/ble/ble_spp_server/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/ble_spp_server/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "ble_spp_server_demo.c" + PRIV_REQUIRES bt nvs_flash esp_driver_uart INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_client/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_client/CMakeLists.txt index 0944282d56..4b8ec4dd56 100644 --- a/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_client/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_client/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(throughput_client_demo) diff --git a/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_client/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_client/main/CMakeLists.txt index 4695587a07..e81449e533 100644 --- a/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_client/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_client/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "example_ble_client_throughput.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/CMakeLists.txt index 33fc2e240a..269505eb80 100644 --- a/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(throughput_server_demo) diff --git a/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/main/CMakeLists.txt index 419488adc3..594a36dc21 100644 --- a/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/ble_throughput/throughput_server/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "example_ble_server_throughput.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/ble/gatt_client/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/gatt_client/CMakeLists.txt index dec0836040..8dd54ebed3 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_client/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/gatt_client/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(gatt_client_demo) diff --git a/examples/bluetooth/bluedroid/ble/gatt_client/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/gatt_client/main/CMakeLists.txt index e3ddd8400d..18c07376e5 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_client/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/gatt_client/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "gattc_demo.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/ble/gatt_security_client/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/gatt_security_client/CMakeLists.txt index 76a09b9f70..410ffc0a8c 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_security_client/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/gatt_security_client/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(sec_gattc_demo) diff --git a/examples/bluetooth/bluedroid/ble/gatt_security_client/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/gatt_security_client/main/CMakeLists.txt index 9101064d3d..7e42914e20 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_security_client/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/gatt_security_client/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "example_ble_sec_gattc_demo.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/ble/gatt_security_server/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/gatt_security_server/CMakeLists.txt index 2887157adc..23c4eb0241 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_security_server/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/gatt_security_server/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(sec_gatts_demo) diff --git a/examples/bluetooth/bluedroid/ble/gatt_security_server/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/gatt_security_server/main/CMakeLists.txt index f890f38d40..156bf589bb 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_security_server/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/gatt_security_server/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "example_ble_sec_gatts_demo.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/ble/gatt_server/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/gatt_server/CMakeLists.txt index afb3d516b4..a5e2286bde 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_server/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/gatt_server/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(gatt_server_demos) diff --git a/examples/bluetooth/bluedroid/ble/gatt_server/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/gatt_server/main/CMakeLists.txt index 379d4659ab..bceaff6a3b 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_server/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/gatt_server/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "gatts_demo.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/ble/gatt_server_service_table/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/gatt_server_service_table/CMakeLists.txt index 7d4a282dc3..a187814c3f 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_server_service_table/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/gatt_server_service_table/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(gatt_server_service_table_demo) diff --git a/examples/bluetooth/bluedroid/ble/gatt_server_service_table/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/gatt_server_service_table/main/CMakeLists.txt index c0a6838afc..c1ec9d4092 100644 --- a/examples/bluetooth/bluedroid/ble/gatt_server_service_table/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/gatt_server_service_table/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "gatts_table_creat_demo.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/ble/gattc_multi_connect/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/gattc_multi_connect/CMakeLists.txt index 54dfb58c07..4781980b20 100644 --- a/examples/bluetooth/bluedroid/ble/gattc_multi_connect/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/gattc_multi_connect/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(gatt_multi_connect) diff --git a/examples/bluetooth/bluedroid/ble/gattc_multi_connect/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble/gattc_multi_connect/main/CMakeLists.txt index 5dc7d966cd..bd1c0d4c29 100644 --- a/examples/bluetooth/bluedroid/ble/gattc_multi_connect/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble/gattc_multi_connect/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "gattc_multi_connect.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/ble_50/ble50_security_client/CMakeLists.txt b/examples/bluetooth/bluedroid/ble_50/ble50_security_client/CMakeLists.txt index 8c982e43b9..f109ed691a 100644 --- a/examples/bluetooth/bluedroid/ble_50/ble50_security_client/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble_50/ble50_security_client/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ble50_sec_gattc_demo) diff --git a/examples/bluetooth/bluedroid/ble_50/ble50_security_client/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble_50/ble50_security_client/main/CMakeLists.txt index ac38069c88..db0bd3087a 100644 --- a/examples/bluetooth/bluedroid/ble_50/ble50_security_client/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble_50/ble50_security_client/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "ble50_sec_gattc_demo.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/ble_50/ble50_security_server/CMakeLists.txt b/examples/bluetooth/bluedroid/ble_50/ble50_security_server/CMakeLists.txt index dc84c32414..05b9250a87 100644 --- a/examples/bluetooth/bluedroid/ble_50/ble50_security_server/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble_50/ble50_security_server/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ble50_sec_gatts_demo) diff --git a/examples/bluetooth/bluedroid/ble_50/ble50_security_server/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble_50/ble50_security_server/main/CMakeLists.txt index 940c38d0b3..55b5073095 100644 --- a/examples/bluetooth/bluedroid/ble_50/ble50_security_server/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble_50/ble50_security_server/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "ble50_sec_gatts_demo.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/ble_50/multi-adv/CMakeLists.txt b/examples/bluetooth/bluedroid/ble_50/multi-adv/CMakeLists.txt index 517260db54..186d54bdce 100644 --- a/examples/bluetooth/bluedroid/ble_50/multi-adv/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble_50/multi-adv/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(multi_adv_demos) diff --git a/examples/bluetooth/bluedroid/ble_50/multi-adv/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble_50/multi-adv/main/CMakeLists.txt index 23bc528757..8db33caa91 100644 --- a/examples/bluetooth/bluedroid/ble_50/multi-adv/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble_50/multi-adv/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "multi_adv_demo.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/ble_50/periodic_adv/CMakeLists.txt b/examples/bluetooth/bluedroid/ble_50/periodic_adv/CMakeLists.txt index 2f4c9b014d..51aadd7ff0 100644 --- a/examples/bluetooth/bluedroid/ble_50/periodic_adv/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble_50/periodic_adv/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(periodic_adv_demos) diff --git a/examples/bluetooth/bluedroid/ble_50/periodic_adv/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble_50/periodic_adv/main/CMakeLists.txt index cece0ca017..2098929c83 100644 --- a/examples/bluetooth/bluedroid/ble_50/periodic_adv/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble_50/periodic_adv/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "periodic_adv_demo.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/ble_50/periodic_sync/CMakeLists.txt b/examples/bluetooth/bluedroid/ble_50/periodic_sync/CMakeLists.txt index ff4a3728ea..ff53950121 100644 --- a/examples/bluetooth/bluedroid/ble_50/periodic_sync/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble_50/periodic_sync/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(periodic_sync_demos) diff --git a/examples/bluetooth/bluedroid/ble_50/periodic_sync/main/CMakeLists.txt b/examples/bluetooth/bluedroid/ble_50/periodic_sync/main/CMakeLists.txt index e5dabac7d6..6f7f6926e1 100644 --- a/examples/bluetooth/bluedroid/ble_50/periodic_sync/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/ble_50/periodic_sync/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "periodic_sync_demo.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/bluedroid_host_only/bluedroid_host_only_uart/CMakeLists.txt b/examples/bluetooth/bluedroid/bluedroid_host_only/bluedroid_host_only_uart/CMakeLists.txt index 632ea6ca8e..623ff47c21 100644 --- a/examples/bluetooth/bluedroid/bluedroid_host_only/bluedroid_host_only_uart/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/bluedroid_host_only/bluedroid_host_only_uart/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(host_hci_uart) diff --git a/examples/bluetooth/bluedroid/bluedroid_host_only/bluedroid_host_only_uart/main/CMakeLists.txt b/examples/bluetooth/bluedroid/bluedroid_host_only/bluedroid_host_only_uart/main/CMakeLists.txt index 7661c7c45e..23a03768b8 100644 --- a/examples/bluetooth/bluedroid/bluedroid_host_only/bluedroid_host_only_uart/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/bluedroid_host_only/bluedroid_host_only_uart/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "main.c" "uart_driver.c" + PRIV_REQUIRES bt nvs_flash esp_driver_uart INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/classic_bt/a2dp_sink/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/a2dp_sink/CMakeLists.txt index 67c74c35c9..1d31e07835 100644 --- a/examples/bluetooth/bluedroid/classic_bt/a2dp_sink/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/a2dp_sink/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(a2dp_sink) diff --git a/examples/bluetooth/bluedroid/classic_bt/a2dp_source/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/a2dp_source/CMakeLists.txt index 812f375731..9cb3590046 100644 --- a/examples/bluetooth/bluedroid/classic_bt/a2dp_source/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/a2dp_source/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(a2dp_source) diff --git a/examples/bluetooth/bluedroid/classic_bt/a2dp_source/main/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/a2dp_source/main/CMakeLists.txt index 9ec92bc110..a8e89b3d82 100644 --- a/examples/bluetooth/bluedroid/classic_bt/a2dp_source/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/a2dp_source/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "bt_app_core.c" "main.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_discovery/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/bt_discovery/CMakeLists.txt index 68968d2469..37fa615c70 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_discovery/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/bt_discovery/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(bt_discovery) diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_discovery/main/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/bt_discovery/main/CMakeLists.txt index cf2c455cb5..f677a03338 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_discovery/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/bt_discovery/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "main.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_hid_mouse_device/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/bt_hid_mouse_device/CMakeLists.txt index c7137f9a6a..22f7b2ec57 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_hid_mouse_device/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/bt_hid_mouse_device/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(bt_hid_mouse_device) diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_hid_mouse_device/main/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/bt_hid_mouse_device/main/CMakeLists.txt index 5d47675980..2d220b14b1 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_hid_mouse_device/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/bt_hid_mouse_device/main/CMakeLists.txt @@ -4,4 +4,5 @@ #register_component() idf_component_register(SRCS "main.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_l2cap_client/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/bt_l2cap_client/CMakeLists.txt index eac64bfd1b..18ca7519f4 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_l2cap_client/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/bt_l2cap_client/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(bt_l2cap_client) diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_l2cap_client/main/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/bt_l2cap_client/main/CMakeLists.txt index e2d9e2f26b..f7c8dfd4a2 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_l2cap_client/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/bt_l2cap_client/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "main.c" "bt_app_core.c" + PRIV_REQUIRES bt nvs_flash esp_ringbuf vfs INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_l2cap_server/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/bt_l2cap_server/CMakeLists.txt index 81ebafe79c..193cf28280 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_l2cap_server/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/bt_l2cap_server/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(bt_l2cap_server) diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_l2cap_server/main/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/bt_l2cap_server/main/CMakeLists.txt index e2d9e2f26b..f7c8dfd4a2 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_l2cap_server/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/bt_l2cap_server/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "main.c" "bt_app_core.c" + PRIV_REQUIRES bt nvs_flash esp_ringbuf vfs INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/CMakeLists.txt index 5d69a898ac..8428a535bf 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(bt_spp_acceptor_demo) diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/main/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/main/CMakeLists.txt index cf2c455cb5..f677a03338 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/bt_spp_acceptor/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "main.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_spp_initiator/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/bt_spp_initiator/CMakeLists.txt index 8891d363d0..18cc698298 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_spp_initiator/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/bt_spp_initiator/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(bt_spp_initiator_demo) diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_spp_initiator/main/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/bt_spp_initiator/main/CMakeLists.txt index a9c07d5c0c..deb45fb0df 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_spp_initiator/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/bt_spp_initiator/main/CMakeLists.txt @@ -2,4 +2,5 @@ idf_component_register(SRCS "main.c" SRCS "app_spp_msg_prs.c" SRCS "app_spp_msg_set.c" SRCS "console_uart.c" + PRIV_REQUIRES bt nvs_flash esp_driver_uart INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_acceptor/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_acceptor/CMakeLists.txt index 58da023dd6..bb154b282f 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_acceptor/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_acceptor/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(bt_spp_vfs_acceptor_demo) diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_acceptor/main/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_acceptor/main/CMakeLists.txt index 89b4347dcd..cfbb75e592 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_acceptor/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_acceptor/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "main.c" "spp_task.c" + PRIV_REQUIRES bt nvs_flash vfs INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_initiator/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_initiator/CMakeLists.txt index 82af4280d2..3ea66c0e72 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_initiator/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_initiator/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(bt_spp_vfs_initiator_demo) diff --git a/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_initiator/main/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_initiator/main/CMakeLists.txt index 89b4347dcd..cfbb75e592 100644 --- a/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_initiator/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/bt_spp_vfs_initiator/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "main.c" "spp_task.c" + PRIV_REQUIRES bt nvs_flash vfs INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/classic_bt/hfp_ag/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/hfp_ag/CMakeLists.txt index e5384b7240..8f3180377e 100644 --- a/examples/bluetooth/bluedroid/classic_bt/hfp_ag/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/hfp_ag/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(hfp_ag) diff --git a/examples/bluetooth/bluedroid/classic_bt/hfp_ag/main/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/hfp_ag/main/CMakeLists.txt index ef91821c37..728e74c352 100644 --- a/examples/bluetooth/bluedroid/classic_bt/hfp_ag/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/hfp_ag/main/CMakeLists.txt @@ -3,4 +3,5 @@ idf_component_register(SRCS "app_hf_msg_set.c" "bt_app_hf.c" "gpio_pcm_config.c" "main.c" + PRIV_REQUIRES bt nvs_flash esp_driver_gpio console esp_ringbuf INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/classic_bt/hfp_hf/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/hfp_hf/CMakeLists.txt index 64d7d09e08..5966443c9d 100644 --- a/examples/bluetooth/bluedroid/classic_bt/hfp_hf/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/hfp_hf/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(hfp_hf) diff --git a/examples/bluetooth/bluedroid/classic_bt/hfp_hf/main/CMakeLists.txt b/examples/bluetooth/bluedroid/classic_bt/hfp_hf/main/CMakeLists.txt index ef91821c37..728e74c352 100644 --- a/examples/bluetooth/bluedroid/classic_bt/hfp_hf/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/classic_bt/hfp_hf/main/CMakeLists.txt @@ -3,4 +3,5 @@ idf_component_register(SRCS "app_hf_msg_set.c" "bt_app_hf.c" "gpio_pcm_config.c" "main.c" + PRIV_REQUIRES bt nvs_flash esp_driver_gpio console esp_ringbuf INCLUDE_DIRS ".") diff --git a/examples/bluetooth/bluedroid/coex/a2dp_gatts_coex/CMakeLists.txt b/examples/bluetooth/bluedroid/coex/a2dp_gatts_coex/CMakeLists.txt index f660e01557..4d5a2bfe50 100644 --- a/examples/bluetooth/bluedroid/coex/a2dp_gatts_coex/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/coex/a2dp_gatts_coex/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(bt_ble_coex) diff --git a/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/CMakeLists.txt b/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/CMakeLists.txt index bda9130ea9..9f4e5ddca6 100644 --- a/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(gattc_gatts_coex) diff --git a/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/main/CMakeLists.txt b/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/main/CMakeLists.txt index 912d96da7b..08dc19ff06 100644 --- a/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/main/CMakeLists.txt +++ b/examples/bluetooth/bluedroid/coex/gattc_gatts_coex/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "gattc_gatts_coex.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/blufi/CMakeLists.txt b/examples/bluetooth/blufi/CMakeLists.txt index c508ab2c30..b2b22fbb35 100644 --- a/examples/bluetooth/blufi/CMakeLists.txt +++ b/examples/bluetooth/blufi/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(blufi_demo) diff --git a/examples/bluetooth/blufi/main/CMakeLists.txt b/examples/bluetooth/blufi/main/CMakeLists.txt index a8b056e73a..f2e8202696 100644 --- a/examples/bluetooth/blufi/main/CMakeLists.txt +++ b/examples/bluetooth/blufi/main/CMakeLists.txt @@ -1,4 +1,5 @@ idf_component_register(SRCS "blufi_example_main.c" "blufi_security.c" "blufi_init.c" + PRIV_REQUIRES bt nvs_flash mbedtls INCLUDE_DIRS ".") diff --git a/examples/bluetooth/esp_ble_mesh/aligenie_demo/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/aligenie_demo/CMakeLists.txt index ef3d39b844..4f1b682847 100644 --- a/examples/bluetooth/esp_ble_mesh/aligenie_demo/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/aligenie_demo/CMakeLists.txt @@ -3,5 +3,7 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(aligenie_demo) diff --git a/examples/bluetooth/esp_ble_mesh/aligenie_demo/main/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/aligenie_demo/main/CMakeLists.txt index 8cf3cefba1..ab00a5b3c8 100644 --- a/examples/bluetooth/esp_ble_mesh/aligenie_demo/main/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/aligenie_demo/main/CMakeLists.txt @@ -1,7 +1,4 @@ - -set(COMPONENT_SRCS "board.c" - "aligenie_demo.c") - -set(COMPONENT_ADD_INCLUDEDIRS ". include") - -register_component() +idf_component_register(SRCS "board.c" + "aligenie_demo.c" + PRIV_REQUIRES vendor_model esp_driver_gpio mbedtls + INCLUDE_DIRS "." "include") diff --git a/examples/bluetooth/esp_ble_mesh/directed_forwarding/df_client/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/directed_forwarding/df_client/CMakeLists.txt index dcb999f2ef..521af073f9 100644 --- a/examples/bluetooth/esp_ble_mesh/directed_forwarding/df_client/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/directed_forwarding/df_client/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(onoff_client) diff --git a/examples/bluetooth/esp_ble_mesh/directed_forwarding/df_server/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/directed_forwarding/df_server/CMakeLists.txt index c2e123e768..e94148ac96 100644 --- a/examples/bluetooth/esp_ble_mesh/directed_forwarding/df_server/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/directed_forwarding/df_server/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(onoff_server) diff --git a/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_client/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_client/CMakeLists.txt index e3d91badd2..756e955f5f 100644 --- a/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_client/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_client/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(fast_prov_client) diff --git a/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/CMakeLists.txt index 9191b78100..f83245b38f 100644 --- a/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(fast_prov_server) diff --git a/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/main/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/main/CMakeLists.txt index 98d0fc613c..4ea0ac0160 100644 --- a/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/main/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/fast_provisioning/fast_prov_server/main/CMakeLists.txt @@ -2,4 +2,5 @@ set(srcs "main.c" "board.c") idf_component_register(SRCS "${srcs}" + PRIV_REQUIRES esp_psram nvs_flash esp_driver_gpio INCLUDE_DIRS ".") diff --git a/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_client/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_client/CMakeLists.txt index dcb999f2ef..521af073f9 100644 --- a/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_client/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_client/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(onoff_client) diff --git a/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_server/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_server/CMakeLists.txt index c2e123e768..e94148ac96 100644 --- a/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_server/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/onoff_models/onoff_server/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(onoff_server) diff --git a/examples/bluetooth/esp_ble_mesh/provisioner/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/provisioner/CMakeLists.txt index bb23642349..bc0b538d2e 100644 --- a/examples/bluetooth/esp_ble_mesh/provisioner/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/provisioner/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(provisioner) diff --git a/examples/bluetooth/esp_ble_mesh/remote_provisioning/rpr_client/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/remote_provisioning/rpr_client/CMakeLists.txt index 2fc83bab6b..7fc7f54784 100644 --- a/examples/bluetooth/esp_ble_mesh/remote_provisioning/rpr_client/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/remote_provisioning/rpr_client/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ble_mesh_provisioner) diff --git a/examples/bluetooth/esp_ble_mesh/remote_provisioning/rpr_server/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/remote_provisioning/rpr_server/CMakeLists.txt index c2e123e768..e94148ac96 100644 --- a/examples/bluetooth/esp_ble_mesh/remote_provisioning/rpr_server/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/remote_provisioning/rpr_server/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(onoff_server) diff --git a/examples/bluetooth/esp_ble_mesh/remote_provisioning/unprov_dev/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/remote_provisioning/unprov_dev/CMakeLists.txt index c2e123e768..e94148ac96 100644 --- a/examples/bluetooth/esp_ble_mesh/remote_provisioning/unprov_dev/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/remote_provisioning/unprov_dev/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(onoff_server) diff --git a/examples/bluetooth/esp_ble_mesh/sensor_models/sensor_client/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/sensor_models/sensor_client/CMakeLists.txt index df8cdc2a6f..238a711f28 100644 --- a/examples/bluetooth/esp_ble_mesh/sensor_models/sensor_client/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/sensor_models/sensor_client/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(sensor_client) diff --git a/examples/bluetooth/esp_ble_mesh/sensor_models/sensor_server/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/sensor_models/sensor_server/CMakeLists.txt index a6d68ca161..717f9fc6e3 100644 --- a/examples/bluetooth/esp_ble_mesh/sensor_models/sensor_server/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/sensor_models/sensor_server/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(sensor_server) diff --git a/examples/bluetooth/esp_ble_mesh/vendor_models/vendor_client/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/vendor_models/vendor_client/CMakeLists.txt index aa90008899..20498f7114 100644 --- a/examples/bluetooth/esp_ble_mesh/vendor_models/vendor_client/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/vendor_models/vendor_client/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(vendor_client) diff --git a/examples/bluetooth/esp_ble_mesh/vendor_models/vendor_server/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/vendor_models/vendor_server/CMakeLists.txt index a389de923f..60f3eb9f37 100644 --- a/examples/bluetooth/esp_ble_mesh/vendor_models/vendor_server/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/vendor_models/vendor_server/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(vendor_server) diff --git a/examples/bluetooth/esp_ble_mesh/wifi_coexist/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/wifi_coexist/CMakeLists.txt index 63fc9622bd..130d790ead 100644 --- a/examples/bluetooth/esp_ble_mesh/wifi_coexist/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/wifi_coexist/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(wifi_coexist) diff --git a/examples/bluetooth/esp_ble_mesh/wifi_coexist/main/CMakeLists.txt b/examples/bluetooth/esp_ble_mesh/wifi_coexist/main/CMakeLists.txt index 442dfcb3aa..648ae7a138 100644 --- a/examples/bluetooth/esp_ble_mesh/wifi_coexist/main/CMakeLists.txt +++ b/examples/bluetooth/esp_ble_mesh/wifi_coexist/main/CMakeLists.txt @@ -3,4 +3,5 @@ set(srcs "main.c" "cmd_wifi.c") idf_component_register(SRCS "${srcs}" + PRIV_REQUIRES nvs_flash console esp_driver_gpio esp_driver_uart INCLUDE_DIRS ".") diff --git a/examples/bluetooth/esp_hid_device/CMakeLists.txt b/examples/bluetooth/esp_hid_device/CMakeLists.txt index 4362e0a162..264cf86cdc 100644 --- a/examples/bluetooth/esp_hid_device/CMakeLists.txt +++ b/examples/bluetooth/esp_hid_device/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(esp_hid_device) diff --git a/examples/bluetooth/esp_hid_host/CMakeLists.txt b/examples/bluetooth/esp_hid_host/CMakeLists.txt index e56c3d0ad2..5185fe42ff 100644 --- a/examples/bluetooth/esp_hid_host/CMakeLists.txt +++ b/examples/bluetooth/esp_hid_host/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(esp_hid_host) diff --git a/examples/bluetooth/hci/ble_adv_scan_combined/CMakeLists.txt b/examples/bluetooth/hci/ble_adv_scan_combined/CMakeLists.txt index f5e3555891..6940b955f2 100644 --- a/examples/bluetooth/hci/ble_adv_scan_combined/CMakeLists.txt +++ b/examples/bluetooth/hci/ble_adv_scan_combined/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ble_adv_scan) diff --git a/examples/bluetooth/hci/ble_adv_scan_combined/main/CMakeLists.txt b/examples/bluetooth/hci/ble_adv_scan_combined/main/CMakeLists.txt index b5fc77a0d2..a0ac0d698d 100644 --- a/examples/bluetooth/hci/ble_adv_scan_combined/main/CMakeLists.txt +++ b/examples/bluetooth/hci/ble_adv_scan_combined/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "app_bt.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/hci/controller_hci_uart_esp32/CMakeLists.txt b/examples/bluetooth/hci/controller_hci_uart_esp32/CMakeLists.txt index 063fc7ebf1..d7988b85d2 100644 --- a/examples/bluetooth/hci/controller_hci_uart_esp32/CMakeLists.txt +++ b/examples/bluetooth/hci/controller_hci_uart_esp32/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(controller_hci_uart) diff --git a/examples/bluetooth/hci/controller_hci_uart_esp32/main/CMakeLists.txt b/examples/bluetooth/hci/controller_hci_uart_esp32/main/CMakeLists.txt index a9c05c1e1c..3fc8b712b2 100644 --- a/examples/bluetooth/hci/controller_hci_uart_esp32/main/CMakeLists.txt +++ b/examples/bluetooth/hci/controller_hci_uart_esp32/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "controller_hci_uart_demo.c" + PRIV_REQUIRES bt nvs_flash esp_driver_uart INCLUDE_DIRS ".") diff --git a/examples/bluetooth/hci/controller_hci_uart_esp32c3_and_esp32s3/CMakeLists.txt b/examples/bluetooth/hci/controller_hci_uart_esp32c3_and_esp32s3/CMakeLists.txt index 1bf328464b..52d85ab45f 100644 --- a/examples/bluetooth/hci/controller_hci_uart_esp32c3_and_esp32s3/CMakeLists.txt +++ b/examples/bluetooth/hci/controller_hci_uart_esp32c3_and_esp32s3/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(controller_hci_uart_demo) diff --git a/examples/bluetooth/hci/controller_hci_uart_esp32c3_and_esp32s3/main/CMakeLists.txt b/examples/bluetooth/hci/controller_hci_uart_esp32c3_and_esp32s3/main/CMakeLists.txt index 8a3ab69279..ac5aa2d71c 100644 --- a/examples/bluetooth/hci/controller_hci_uart_esp32c3_and_esp32s3/main/CMakeLists.txt +++ b/examples/bluetooth/hci/controller_hci_uart_esp32c3_and_esp32s3/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "main.c" + PRIV_REQUIRES bt nvs_flash esp_driver_uart esp_driver_gpio INCLUDE_DIRS "") diff --git a/examples/bluetooth/hci/controller_vhci_ble_adv/CMakeLists.txt b/examples/bluetooth/hci/controller_vhci_ble_adv/CMakeLists.txt index f10daca8a7..8b46189789 100644 --- a/examples/bluetooth/hci/controller_vhci_ble_adv/CMakeLists.txt +++ b/examples/bluetooth/hci/controller_vhci_ble_adv/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ble_adv) diff --git a/examples/bluetooth/hci/controller_vhci_ble_adv/main/CMakeLists.txt b/examples/bluetooth/hci/controller_vhci_ble_adv/main/CMakeLists.txt index b5fc77a0d2..a0ac0d698d 100644 --- a/examples/bluetooth/hci/controller_vhci_ble_adv/main/CMakeLists.txt +++ b/examples/bluetooth/hci/controller_vhci_ble_adv/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "app_bt.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/nimble/ble_cts/cts_cent/CMakeLists.txt b/examples/bluetooth/nimble/ble_cts/cts_cent/CMakeLists.txt index 30e34b1f9b..96444df0fc 100644 --- a/examples/bluetooth/nimble/ble_cts/cts_cent/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_cts/cts_cent/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(cts_cent) diff --git a/examples/bluetooth/nimble/ble_cts/cts_prph/CMakeLists.txt b/examples/bluetooth/nimble/ble_cts/cts_prph/CMakeLists.txt index 81409326b1..b79be75172 100644 --- a/examples/bluetooth/nimble/ble_cts/cts_prph/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_cts/cts_prph/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(cts_prph) diff --git a/examples/bluetooth/nimble/ble_dynamic_service/CMakeLists.txt b/examples/bluetooth/nimble/ble_dynamic_service/CMakeLists.txt index ec090376e9..430f643a55 100644 --- a/examples/bluetooth/nimble/ble_dynamic_service/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_dynamic_service/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ble_dynamic_service) diff --git a/examples/bluetooth/nimble/ble_enc_adv_data/enc_adv_data_cent/CMakeLists.txt b/examples/bluetooth/nimble/ble_enc_adv_data/enc_adv_data_cent/CMakeLists.txt index 3e16261643..b7945d6e1f 100644 --- a/examples/bluetooth/nimble/ble_enc_adv_data/enc_adv_data_cent/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_enc_adv_data/enc_adv_data_cent/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(enc_adv_data_cent) diff --git a/examples/bluetooth/nimble/ble_enc_adv_data/enc_adv_data_prph/CMakeLists.txt b/examples/bluetooth/nimble/ble_enc_adv_data/enc_adv_data_prph/CMakeLists.txt index ca984ef42a..2332cd554c 100644 --- a/examples/bluetooth/nimble/ble_enc_adv_data/enc_adv_data_prph/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_enc_adv_data/enc_adv_data_prph/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(enc_adv_data_prph) diff --git a/examples/bluetooth/nimble/ble_htp/htp_cent/CMakeLists.txt b/examples/bluetooth/nimble/ble_htp/htp_cent/CMakeLists.txt index 598618f67c..d6fe9dd722 100644 --- a/examples/bluetooth/nimble/ble_htp/htp_cent/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_htp/htp_cent/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(htp_cent) diff --git a/examples/bluetooth/nimble/ble_htp/htp_prph/CMakeLists.txt b/examples/bluetooth/nimble/ble_htp/htp_prph/CMakeLists.txt index dafb03f850..0d957818e9 100644 --- a/examples/bluetooth/nimble/ble_htp/htp_prph/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_htp/htp_prph/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(htp_prph) diff --git a/examples/bluetooth/nimble/ble_htp/htp_prph/main/CMakeLists.txt b/examples/bluetooth/nimble/ble_htp/htp_prph/main/CMakeLists.txt index e8a76d0b09..5c01dee04f 100644 --- a/examples/bluetooth/nimble/ble_htp/htp_prph/main/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_htp/htp_prph/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "main.c" "gatt_svr.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/nimble/ble_l2cap_coc/coc_blecent/CMakeLists.txt b/examples/bluetooth/nimble/ble_l2cap_coc/coc_blecent/CMakeLists.txt index 6265291dec..838d30c534 100644 --- a/examples/bluetooth/nimble/ble_l2cap_coc/coc_blecent/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_l2cap_coc/coc_blecent/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.5) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(coc_blecent) diff --git a/examples/bluetooth/nimble/ble_l2cap_coc/coc_bleprph/CMakeLists.txt b/examples/bluetooth/nimble/ble_l2cap_coc/coc_bleprph/CMakeLists.txt index 74e6734037..ff711cd243 100644 --- a/examples/bluetooth/nimble/ble_l2cap_coc/coc_bleprph/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_l2cap_coc/coc_bleprph/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.5) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(coc_bleprph) diff --git a/examples/bluetooth/nimble/ble_multi_adv/CMakeLists.txt b/examples/bluetooth/nimble/ble_multi_adv/CMakeLists.txt index 1870d856d7..9e2f2a134e 100644 --- a/examples/bluetooth/nimble/ble_multi_adv/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_multi_adv/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ble_multi_adv) diff --git a/examples/bluetooth/nimble/ble_multi_conn/ble_multi_conn_cent/CMakeLists.txt b/examples/bluetooth/nimble/ble_multi_conn/ble_multi_conn_cent/CMakeLists.txt index f443dbefda..f3f3a38bc6 100644 --- a/examples/bluetooth/nimble/ble_multi_conn/ble_multi_conn_cent/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_multi_conn/ble_multi_conn_cent/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(blecent) diff --git a/examples/bluetooth/nimble/ble_multi_conn/ble_multi_conn_prph/CMakeLists.txt b/examples/bluetooth/nimble/ble_multi_conn/ble_multi_conn_prph/CMakeLists.txt index 0e8a4553f9..55ce78a43a 100644 --- a/examples/bluetooth/nimble/ble_multi_conn/ble_multi_conn_prph/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_multi_conn/ble_multi_conn_prph/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(bleprph) diff --git a/examples/bluetooth/nimble/ble_periodic_adv/CMakeLists.txt b/examples/bluetooth/nimble/ble_periodic_adv/CMakeLists.txt index eb90d28ab6..5b46c82ede 100644 --- a/examples/bluetooth/nimble/ble_periodic_adv/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_periodic_adv/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ble_periodic_adv) diff --git a/examples/bluetooth/nimble/ble_periodic_sync/CMakeLists.txt b/examples/bluetooth/nimble/ble_periodic_sync/CMakeLists.txt index 74095c0ea8..e898c55405 100644 --- a/examples/bluetooth/nimble/ble_periodic_sync/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_periodic_sync/CMakeLists.txt @@ -2,4 +2,6 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ble_periodic_sync) diff --git a/examples/bluetooth/nimble/ble_phy/phy_cent/CMakeLists.txt b/examples/bluetooth/nimble/ble_phy/phy_cent/CMakeLists.txt index b72760eacf..1cec2b1e43 100644 --- a/examples/bluetooth/nimble/ble_phy/phy_cent/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_phy/phy_cent/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(phy_cent) diff --git a/examples/bluetooth/nimble/ble_phy/phy_prph/CMakeLists.txt b/examples/bluetooth/nimble/ble_phy/phy_prph/CMakeLists.txt index 793e1a330a..4e76e59b28 100644 --- a/examples/bluetooth/nimble/ble_phy/phy_prph/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_phy/phy_prph/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(phy_prph) diff --git a/examples/bluetooth/nimble/ble_proximity_sensor/proximity_sensor_cent/CMakeLists.txt b/examples/bluetooth/nimble/ble_proximity_sensor/proximity_sensor_cent/CMakeLists.txt index bfb3c5c81b..0cf1022443 100644 --- a/examples/bluetooth/nimble/ble_proximity_sensor/proximity_sensor_cent/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_proximity_sensor/proximity_sensor_cent/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(proximity_sensor_cent) diff --git a/examples/bluetooth/nimble/ble_proximity_sensor/proximity_sensor_prph/CMakeLists.txt b/examples/bluetooth/nimble/ble_proximity_sensor/proximity_sensor_prph/CMakeLists.txt index bd9e73ae51..5495f702f2 100644 --- a/examples/bluetooth/nimble/ble_proximity_sensor/proximity_sensor_prph/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_proximity_sensor/proximity_sensor_prph/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(proximity_sensor_prph) diff --git a/examples/bluetooth/nimble/ble_proximity_sensor/proximity_sensor_prph/main/CMakeLists.txt b/examples/bluetooth/nimble/ble_proximity_sensor/proximity_sensor_prph/main/CMakeLists.txt index cf2c455cb5..f677a03338 100644 --- a/examples/bluetooth/nimble/ble_proximity_sensor/proximity_sensor_prph/main/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_proximity_sensor/proximity_sensor_prph/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "main.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/nimble/ble_spp/spp_client/CMakeLists.txt b/examples/bluetooth/nimble/ble_spp/spp_client/CMakeLists.txt index 615f271b6c..b9ecbe35a2 100644 --- a/examples/bluetooth/nimble/ble_spp/spp_client/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_spp/spp_client/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(spp_client) diff --git a/examples/bluetooth/nimble/ble_spp/spp_server/CMakeLists.txt b/examples/bluetooth/nimble/ble_spp/spp_server/CMakeLists.txt index 99cadaff23..96309b33bd 100644 --- a/examples/bluetooth/nimble/ble_spp/spp_server/CMakeLists.txt +++ b/examples/bluetooth/nimble/ble_spp/spp_server/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(spp_server) diff --git a/examples/bluetooth/nimble/blecent/CMakeLists.txt b/examples/bluetooth/nimble/blecent/CMakeLists.txt index f443dbefda..f3f3a38bc6 100644 --- a/examples/bluetooth/nimble/blecent/CMakeLists.txt +++ b/examples/bluetooth/nimble/blecent/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(blecent) diff --git a/examples/bluetooth/nimble/blecsc/CMakeLists.txt b/examples/bluetooth/nimble/blecsc/CMakeLists.txt index 7643b1c40b..fa0177c55d 100644 --- a/examples/bluetooth/nimble/blecsc/CMakeLists.txt +++ b/examples/bluetooth/nimble/blecsc/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(blecsc) diff --git a/examples/bluetooth/nimble/blecsc/main/CMakeLists.txt b/examples/bluetooth/nimble/blecsc/main/CMakeLists.txt index 9e539a9fc0..46ed7b9608 100644 --- a/examples/bluetooth/nimble/blecsc/main/CMakeLists.txt +++ b/examples/bluetooth/nimble/blecsc/main/CMakeLists.txt @@ -2,4 +2,5 @@ set(srcs "main.c" "gatt_svr.c") idf_component_register(SRCS "${srcs}" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/nimble/blehr/CMakeLists.txt b/examples/bluetooth/nimble/blehr/CMakeLists.txt index dc7bb2c94c..f7b35a40ef 100644 --- a/examples/bluetooth/nimble/blehr/CMakeLists.txt +++ b/examples/bluetooth/nimble/blehr/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(blehr) diff --git a/examples/bluetooth/nimble/blehr/main/CMakeLists.txt b/examples/bluetooth/nimble/blehr/main/CMakeLists.txt index e8a76d0b09..5c01dee04f 100644 --- a/examples/bluetooth/nimble/blehr/main/CMakeLists.txt +++ b/examples/bluetooth/nimble/blehr/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "main.c" "gatt_svr.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/nimble/blemesh/CMakeLists.txt b/examples/bluetooth/nimble/blemesh/CMakeLists.txt index 92eea64b6e..34ff506422 100644 --- a/examples/bluetooth/nimble/blemesh/CMakeLists.txt +++ b/examples/bluetooth/nimble/blemesh/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(blemesh) diff --git a/examples/bluetooth/nimble/blemesh/main/CMakeLists.txt b/examples/bluetooth/nimble/blemesh/main/CMakeLists.txt index 99da938f3b..120c9f43e6 100644 --- a/examples/bluetooth/nimble/blemesh/main/CMakeLists.txt +++ b/examples/bluetooth/nimble/blemesh/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "app_mesh.c" + PRIV_REQUIRES bt nvs_flash mbedtls INCLUDE_DIRS ".") diff --git a/examples/bluetooth/nimble/bleprph/CMakeLists.txt b/examples/bluetooth/nimble/bleprph/CMakeLists.txt index 0e8a4553f9..55ce78a43a 100644 --- a/examples/bluetooth/nimble/bleprph/CMakeLists.txt +++ b/examples/bluetooth/nimble/bleprph/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(bleprph) diff --git a/examples/bluetooth/nimble/bleprph_host_only/CMakeLists.txt b/examples/bluetooth/nimble/bleprph_host_only/CMakeLists.txt index 07e8a161ad..8ec77fa619 100644 --- a/examples/bluetooth/nimble/bleprph_host_only/CMakeLists.txt +++ b/examples/bluetooth/nimble/bleprph_host_only/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(bleprph_host_only) diff --git a/examples/bluetooth/nimble/bleprph_wifi_coex/CMakeLists.txt b/examples/bluetooth/nimble/bleprph_wifi_coex/CMakeLists.txt index 089a3242d3..b9377ae5d8 100644 --- a/examples/bluetooth/nimble/bleprph_wifi_coex/CMakeLists.txt +++ b/examples/bluetooth/nimble/bleprph_wifi_coex/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(bleprph_wifi_coex) diff --git a/examples/bluetooth/nimble/bleprph_wifi_coex/main/CMakeLists.txt b/examples/bluetooth/nimble/bleprph_wifi_coex/main/CMakeLists.txt index e8a76d0b09..5c01dee04f 100644 --- a/examples/bluetooth/nimble/bleprph_wifi_coex/main/CMakeLists.txt +++ b/examples/bluetooth/nimble/bleprph_wifi_coex/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "main.c" "gatt_svr.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/bluetooth/nimble/hci/CMakeLists.txt b/examples/bluetooth/nimble/hci/CMakeLists.txt index ab9d65e43b..6e0b4af580 100644 --- a/examples/bluetooth/nimble/hci/CMakeLists.txt +++ b/examples/bluetooth/nimble/hci/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.5) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(hci) diff --git a/examples/bluetooth/nimble/hci/main/CMakeLists.txt b/examples/bluetooth/nimble/hci/main/CMakeLists.txt index 023dd5e462..e931f527f8 100644 --- a/examples/bluetooth/nimble/hci/main/CMakeLists.txt +++ b/examples/bluetooth/nimble/hci/main/CMakeLists.txt @@ -1,4 +1,5 @@ set(srcs "main.c") idf_component_register(SRCS "${srcs}" + PRIV_REQUIRES bt nvs_flash esp_driver_uart INCLUDE_DIRS ".") diff --git a/examples/bluetooth/nimble/power_save/CMakeLists.txt b/examples/bluetooth/nimble/power_save/CMakeLists.txt index 908aa9b15a..63bd404a98 100644 --- a/examples/bluetooth/nimble/power_save/CMakeLists.txt +++ b/examples/bluetooth/nimble/power_save/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(power_save) diff --git a/examples/bluetooth/nimble/throughput_app/blecent_throughput/CMakeLists.txt b/examples/bluetooth/nimble/throughput_app/blecent_throughput/CMakeLists.txt index 3a88e21f85..86a559dba6 100644 --- a/examples/bluetooth/nimble/throughput_app/blecent_throughput/CMakeLists.txt +++ b/examples/bluetooth/nimble/throughput_app/blecent_throughput/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(blecent_throughput) diff --git a/examples/bluetooth/nimble/throughput_app/blecent_throughput/main/CMakeLists.txt b/examples/bluetooth/nimble/throughput_app/blecent_throughput/main/CMakeLists.txt index 7488f906a1..714a3c885d 100644 --- a/examples/bluetooth/nimble/throughput_app/blecent_throughput/main/CMakeLists.txt +++ b/examples/bluetooth/nimble/throughput_app/blecent_throughput/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "main.c" "misc.c" "peer.c" "scli.c" + PRIV_REQUIRES bt nvs_flash console esp_driver_uart cmd_system INCLUDE_DIRS ".") diff --git a/examples/bluetooth/nimble/throughput_app/bleprph_throughput/CMakeLists.txt b/examples/bluetooth/nimble/throughput_app/bleprph_throughput/CMakeLists.txt index 7c5a3fc6d4..5fb9f9a86c 100644 --- a/examples/bluetooth/nimble/throughput_app/bleprph_throughput/CMakeLists.txt +++ b/examples/bluetooth/nimble/throughput_app/bleprph_throughput/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(bleprph_throughput) diff --git a/examples/bluetooth/nimble/throughput_app/bleprph_throughput/main/CMakeLists.txt b/examples/bluetooth/nimble/throughput_app/bleprph_throughput/main/CMakeLists.txt index e8a76d0b09..5c01dee04f 100644 --- a/examples/bluetooth/nimble/throughput_app/bleprph_throughput/main/CMakeLists.txt +++ b/examples/bluetooth/nimble/throughput_app/bleprph_throughput/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "main.c" "gatt_svr.c" + PRIV_REQUIRES bt nvs_flash INCLUDE_DIRS ".") diff --git a/examples/build_system/cmake/component_manager/CMakeLists.txt b/examples/build_system/cmake/component_manager/CMakeLists.txt index 97b6fef1f7..165acd4539 100644 --- a/examples/build_system/cmake/component_manager/CMakeLists.txt +++ b/examples/build_system/cmake/component_manager/CMakeLists.txt @@ -5,4 +5,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(component_manager) diff --git a/examples/build_system/cmake/import_lib/CMakeLists.txt b/examples/build_system/cmake/import_lib/CMakeLists.txt index 7cc92dcd8e..636ad16efb 100644 --- a/examples/build_system/cmake/import_lib/CMakeLists.txt +++ b/examples/build_system/cmake/import_lib/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(import_lib) diff --git a/examples/build_system/cmake/import_prebuilt/CMakeLists.txt b/examples/build_system/cmake/import_prebuilt/CMakeLists.txt index db3d2d3ffd..b60b1cb89c 100644 --- a/examples/build_system/cmake/import_prebuilt/CMakeLists.txt +++ b/examples/build_system/cmake/import_prebuilt/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(import_prebuilt) diff --git a/examples/build_system/cmake/import_prebuilt/prebuilt/CMakeLists.txt b/examples/build_system/cmake/import_prebuilt/prebuilt/CMakeLists.txt index ac85e0ee82..e51b9dbf90 100644 --- a/examples/build_system/cmake/import_prebuilt/prebuilt/CMakeLists.txt +++ b/examples/build_system/cmake/import_prebuilt/prebuilt/CMakeLists.txt @@ -1,8 +1,7 @@ cmake_minimum_required(VERSION 3.16) -# Since we're only interested in the prebuilt library, trim -# the build -set(COMPONENTS prebuilt main esptool_py) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(prebuilt C) diff --git a/examples/build_system/cmake/import_prebuilt/prebuilt/main/CMakeLists.txt b/examples/build_system/cmake/import_prebuilt/prebuilt/main/CMakeLists.txt index 8a3ab69279..6ee0c4445a 100644 --- a/examples/build_system/cmake/import_prebuilt/prebuilt/main/CMakeLists.txt +++ b/examples/build_system/cmake/import_prebuilt/prebuilt/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "main.c" + PRIV_REQUIRES prebuilt esptool_py INCLUDE_DIRS "") diff --git a/examples/build_system/cmake/multi_config/CMakeLists.txt b/examples/build_system/cmake/multi_config/CMakeLists.txt index cdc2534279..2ea430c090 100644 --- a/examples/build_system/cmake/multi_config/CMakeLists.txt +++ b/examples/build_system/cmake/multi_config/CMakeLists.txt @@ -6,5 +6,7 @@ cmake_minimum_required(VERSION 3.16) set(SDKCONFIG "${CMAKE_BINARY_DIR}/sdkconfig") include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(multi_config) diff --git a/examples/build_system/wrappers/CMakeLists.txt b/examples/build_system/wrappers/CMakeLists.txt index 1457f6eb9b..0470a513ae 100644 --- a/examples/build_system/wrappers/CMakeLists.txt +++ b/examples/build_system/wrappers/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(wrappers) diff --git a/examples/custom_bootloader/bootloader_hooks/CMakeLists.txt b/examples/custom_bootloader/bootloader_hooks/CMakeLists.txt index 664d45871d..5acabc0ccf 100644 --- a/examples/custom_bootloader/bootloader_hooks/CMakeLists.txt +++ b/examples/custom_bootloader/bootloader_hooks/CMakeLists.txt @@ -5,4 +5,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(main) diff --git a/examples/custom_bootloader/bootloader_override/CMakeLists.txt b/examples/custom_bootloader/bootloader_override/CMakeLists.txt index 664d45871d..5acabc0ccf 100644 --- a/examples/custom_bootloader/bootloader_override/CMakeLists.txt +++ b/examples/custom_bootloader/bootloader_override/CMakeLists.txt @@ -5,4 +5,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(main) diff --git a/examples/custom_bootloader/bootloader_override/README.md b/examples/custom_bootloader/bootloader_override/README.md index 78d15e06b7..3e73ded409 100644 --- a/examples/custom_bootloader/bootloader_override/README.md +++ b/examples/custom_bootloader/bootloader_override/README.md @@ -60,6 +60,8 @@ For example, if the custom bootloader shall not be compiled for ESP32-C3 targets cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) if(${IDF_TARGET} STREQUAL "esp32c3") set(BOOTLOADER_IGNORE_EXTRA_COMPONENT "main") diff --git a/examples/cxx/exceptions/CMakeLists.txt b/examples/cxx/exceptions/CMakeLists.txt index 6f3fde23c2..3033276315 100644 --- a/examples/cxx/exceptions/CMakeLists.txt +++ b/examples/cxx/exceptions/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(cpp_exceptions_example) diff --git a/examples/cxx/pthread/CMakeLists.txt b/examples/cxx/pthread/CMakeLists.txt index a99b69ffc3..3eab51bc01 100644 --- a/examples/cxx/pthread/CMakeLists.txt +++ b/examples/cxx/pthread/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(cpp_pthread) diff --git a/examples/cxx/rtti/CMakeLists.txt b/examples/cxx/rtti/CMakeLists.txt index 4f55493a5a..7c7bfdd9f6 100644 --- a/examples/cxx/rtti/CMakeLists.txt +++ b/examples/cxx/rtti/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(cpp_rtti) diff --git a/examples/ethernet/basic/CMakeLists.txt b/examples/ethernet/basic/CMakeLists.txt index d619b7f11e..cb7439bb3d 100644 --- a/examples/ethernet/basic/CMakeLists.txt +++ b/examples/ethernet/basic/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ethernet_basic) diff --git a/examples/ethernet/basic/main/CMakeLists.txt b/examples/ethernet/basic/main/CMakeLists.txt index ff186a4a5b..098c570025 100644 --- a/examples/ethernet/basic/main/CMakeLists.txt +++ b/examples/ethernet/basic/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "ethernet_example_main.c" + PRIV_REQUIRES esp_netif esp_eth ethernet_init INCLUDE_DIRS ".") diff --git a/examples/ethernet/iperf/CMakeLists.txt b/examples/ethernet/iperf/CMakeLists.txt index 773736ed19..a49e0516b2 100644 --- a/examples/ethernet/iperf/CMakeLists.txt +++ b/examples/ethernet/iperf/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ethernet_iperf) diff --git a/examples/ethernet/iperf/main/CMakeLists.txt b/examples/ethernet/iperf/main/CMakeLists.txt index a5933f6aa1..2f10effdf3 100644 --- a/examples/ethernet/iperf/main/CMakeLists.txt +++ b/examples/ethernet/iperf/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "cmd_ethernet.c" "ethernet_iperf_main.c" + PRIV_REQUIRES fatfs esp_netif esp_eth INCLUDE_DIRS ".") diff --git a/examples/get-started/blink/CMakeLists.txt b/examples/get-started/blink/CMakeLists.txt index 489742ae56..bfd633619d 100644 --- a/examples/get-started/blink/CMakeLists.txt +++ b/examples/get-started/blink/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(blink) diff --git a/examples/get-started/hello_world/CMakeLists.txt b/examples/get-started/hello_world/CMakeLists.txt index 0a454d064c..1405a7ca69 100644 --- a/examples/get-started/hello_world/CMakeLists.txt +++ b/examples/get-started/hello_world/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(hello_world) diff --git a/examples/get-started/hello_world/main/CMakeLists.txt b/examples/get-started/hello_world/main/CMakeLists.txt index d1acf9e518..28ab405bd6 100644 --- a/examples/get-started/hello_world/main/CMakeLists.txt +++ b/examples/get-started/hello_world/main/CMakeLists.txt @@ -1,3 +1,3 @@ idf_component_register(SRCS "hello_world_main.c" - PRIV_REQUIRES spi_flash - INCLUDE_DIRS "") + PRIV_REQUIRES spi_flash + INCLUDE_DIRS "") diff --git a/examples/ieee802154/ieee802154_cli/CMakeLists.txt b/examples/ieee802154/ieee802154_cli/CMakeLists.txt index 4aba22f75c..8c8c413fda 100644 --- a/examples/ieee802154/ieee802154_cli/CMakeLists.txt +++ b/examples/ieee802154/ieee802154_cli/CMakeLists.txt @@ -4,6 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) # "Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main) +idf_build_set_property(MINIMAL_BUILD ON) project(ieee802154_cli) diff --git a/examples/mesh/internal_communication/CMakeLists.txt b/examples/mesh/internal_communication/CMakeLists.txt index 71de1a1f00..69cd2ef90c 100644 --- a/examples/mesh/internal_communication/CMakeLists.txt +++ b/examples/mesh/internal_communication/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(internal_communication) diff --git a/examples/mesh/internal_communication/main/CMakeLists.txt b/examples/mesh/internal_communication/main/CMakeLists.txt index 686ab05acf..0c946d55ea 100644 --- a/examples/mesh/internal_communication/main/CMakeLists.txt +++ b/examples/mesh/internal_communication/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "mesh_light.c" "mesh_main.c" + PRIV_REQUIRES esp_wifi esp_driver_gpio esp_driver_ledc nvs_flash INCLUDE_DIRS "." "include") diff --git a/examples/mesh/ip_internal_network/CMakeLists.txt b/examples/mesh/ip_internal_network/CMakeLists.txt index 6d5691345a..054d2c4e64 100644 --- a/examples/mesh/ip_internal_network/CMakeLists.txt +++ b/examples/mesh/ip_internal_network/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ip_internal_network) diff --git a/examples/mesh/ip_internal_network/main/CMakeLists.txt b/examples/mesh/ip_internal_network/main/CMakeLists.txt index 06403090a4..2177ed3999 100644 --- a/examples/mesh/ip_internal_network/main/CMakeLists.txt +++ b/examples/mesh/ip_internal_network/main/CMakeLists.txt @@ -1,4 +1,5 @@ idf_component_register(SRCS "mesh_main.c" "mesh_netif.c" "mqtt_app.c" + PRIV_REQUIRES esp_wifi esp-tls nvs_flash mqtt esp_driver_gpio INCLUDE_DIRS "." "include") diff --git a/examples/mesh/manual_networking/CMakeLists.txt b/examples/mesh/manual_networking/CMakeLists.txt index 6185603dcf..89556b502e 100644 --- a/examples/mesh/manual_networking/CMakeLists.txt +++ b/examples/mesh/manual_networking/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(manual_networking) diff --git a/examples/mesh/manual_networking/main/CMakeLists.txt b/examples/mesh/manual_networking/main/CMakeLists.txt index 686ab05acf..81fc4105b5 100644 --- a/examples/mesh/manual_networking/main/CMakeLists.txt +++ b/examples/mesh/manual_networking/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "mesh_light.c" "mesh_main.c" + PRIV_REQUIRES esp_wifi esp_driver_gpio nvs_flash esp_driver_ledc INCLUDE_DIRS "." "include") diff --git a/examples/network/bridge/CMakeLists.txt b/examples/network/bridge/CMakeLists.txt index 774bc527d7..0a7d8f7837 100644 --- a/examples/network/bridge/CMakeLists.txt +++ b/examples/network/bridge/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(bridge) diff --git a/examples/network/bridge/main/CMakeLists.txt b/examples/network/bridge/main/CMakeLists.txt index a86e4dbacc..35ac7b4010 100644 --- a/examples/network/bridge/main/CMakeLists.txt +++ b/examples/network/bridge/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "bridge_example_main.c" "bridge_console_cmd.c" + PRIV_REQUIRES esp_eth console esp_netif esp_wifi INCLUDE_DIRS ".") diff --git a/examples/network/eth2ap/CMakeLists.txt b/examples/network/eth2ap/CMakeLists.txt index ec2b0f57d9..61acb18d8e 100644 --- a/examples/network/eth2ap/CMakeLists.txt +++ b/examples/network/eth2ap/CMakeLists.txt @@ -1,4 +1,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(eth2ap) diff --git a/examples/network/eth2ap/main/CMakeLists.txt b/examples/network/eth2ap/main/CMakeLists.txt index ff186a4a5b..f3dbfb227e 100644 --- a/examples/network/eth2ap/main/CMakeLists.txt +++ b/examples/network/eth2ap/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "ethernet_example_main.c" + PRIV_REQUIRES esp_wifi esp_eth nvs_flash INCLUDE_DIRS ".") diff --git a/examples/network/simple_sniffer/CMakeLists.txt b/examples/network/simple_sniffer/CMakeLists.txt index 5097b1500a..14532d0e05 100644 --- a/examples/network/simple_sniffer/CMakeLists.txt +++ b/examples/network/simple_sniffer/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(simple_sniffer) diff --git a/examples/network/simple_sniffer/main/CMakeLists.txt b/examples/network/simple_sniffer/main/CMakeLists.txt index 5d4205471d..ad9166bc60 100644 --- a/examples/network/simple_sniffer/main/CMakeLists.txt +++ b/examples/network/simple_sniffer/main/CMakeLists.txt @@ -1,4 +1,5 @@ idf_component_register(SRCS "simple_sniffer_example_main.c" "cmd_sniffer.c" "cmd_pcap.c" + PRIV_REQUIRES console esp_wifi fatfs esp_eth app_trace nvs_flash INCLUDE_DIRS ".") diff --git a/examples/network/sta2eth/CMakeLists.txt b/examples/network/sta2eth/CMakeLists.txt index a565b19f34..b4edbbb1cc 100644 --- a/examples/network/sta2eth/CMakeLists.txt +++ b/examples/network/sta2eth/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(sta_to_eth) diff --git a/examples/network/sta2eth/main/CMakeLists.txt b/examples/network/sta2eth/main/CMakeLists.txt index 8ed65161d4..339a891b99 100644 --- a/examples/network/sta2eth/main/CMakeLists.txt +++ b/examples/network/sta2eth/main/CMakeLists.txt @@ -13,4 +13,6 @@ endif() idf_component_register(SRCS sta2eth_main.c ${wired_iface} ${config_method} + PRIV_REQUIRES esp_wifi esp_timer esp_eth esp_http_server + nvs_flash esp_driver_gpio wifi_provisioning INCLUDE_DIRS "") diff --git a/examples/network/vlan_support/CMakeLists.txt b/examples/network/vlan_support/CMakeLists.txt index c70832fdbb..1f6d2f861b 100644 --- a/examples/network/vlan_support/CMakeLists.txt +++ b/examples/network/vlan_support/CMakeLists.txt @@ -4,6 +4,8 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(vlan_support) diff --git a/examples/network/vlan_support/main/CMakeLists.txt b/examples/network/vlan_support/main/CMakeLists.txt index ab2281f9d9..51c3b1ba41 100644 --- a/examples/network/vlan_support/main/CMakeLists.txt +++ b/examples/network/vlan_support/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "vlan_support_main.c" "eth_vlan_utils.c" + PRIV_REQUIRES esp_netif esp_eth lwip INCLUDE_DIRS ".") diff --git a/examples/openthread/ot_br/CMakeLists.txt b/examples/openthread/ot_br/CMakeLists.txt index 9354593549..e4857959d9 100644 --- a/examples/openthread/ot_br/CMakeLists.txt +++ b/examples/openthread/ot_br/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(esp_ot_br) diff --git a/examples/openthread/ot_br/main/CMakeLists.txt b/examples/openthread/ot_br/main/CMakeLists.txt index 83b4e7608e..2d15e4a4f9 100644 --- a/examples/openthread/ot_br/main/CMakeLists.txt +++ b/examples/openthread/ot_br/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "esp_ot_br.c" + PRIV_REQUIRES esp_psram openthread esp_coex esp_wifi nvs_flash INCLUDE_DIRS ".") diff --git a/examples/openthread/ot_cli/CMakeLists.txt b/examples/openthread/ot_cli/CMakeLists.txt index b12d49bfa3..bd22015b83 100644 --- a/examples/openthread/ot_cli/CMakeLists.txt +++ b/examples/openthread/ot_cli/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(esp_ot_cli) diff --git a/examples/openthread/ot_rcp/CMakeLists.txt b/examples/openthread/ot_rcp/CMakeLists.txt index 125d506133..bf07926d7a 100644 --- a/examples/openthread/ot_rcp/CMakeLists.txt +++ b/examples/openthread/ot_rcp/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(esp_ot_rcp) diff --git a/examples/openthread/ot_rcp/main/CMakeLists.txt b/examples/openthread/ot_rcp/main/CMakeLists.txt index 83b084e909..0261895e05 100644 --- a/examples/openthread/ot_rcp/main/CMakeLists.txt +++ b/examples/openthread/ot_rcp/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "esp_ot_rcp.c" + PRIV_REQUIRES esp_event nvs_flash openthread INCLUDE_DIRS ".") diff --git a/examples/openthread/ot_sleepy_device/deep_sleep/CMakeLists.txt b/examples/openthread/ot_sleepy_device/deep_sleep/CMakeLists.txt index 876f5798c5..5c8740c364 100644 --- a/examples/openthread/ot_sleepy_device/deep_sleep/CMakeLists.txt +++ b/examples/openthread/ot_sleepy_device/deep_sleep/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ot_sleepy_device) diff --git a/examples/openthread/ot_sleepy_device/deep_sleep/main/CMakeLists.txt b/examples/openthread/ot_sleepy_device/deep_sleep/main/CMakeLists.txt index a7cde9d16a..e205eff4b8 100644 --- a/examples/openthread/ot_sleepy_device/deep_sleep/main/CMakeLists.txt +++ b/examples/openthread/ot_sleepy_device/deep_sleep/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "esp_ot_sleepy_device.c" + PRIV_REQUIRES esp_event esp_timer openthread nvs_flash ulp INCLUDE_DIRS ".") diff --git a/examples/openthread/ot_sleepy_device/light_sleep/CMakeLists.txt b/examples/openthread/ot_sleepy_device/light_sleep/CMakeLists.txt index 876f5798c5..5c8740c364 100644 --- a/examples/openthread/ot_sleepy_device/light_sleep/CMakeLists.txt +++ b/examples/openthread/ot_sleepy_device/light_sleep/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ot_sleepy_device) diff --git a/examples/openthread/ot_sleepy_device/light_sleep/main/CMakeLists.txt b/examples/openthread/ot_sleepy_device/light_sleep/main/CMakeLists.txt index a7cde9d16a..bc690befe7 100644 --- a/examples/openthread/ot_sleepy_device/light_sleep/main/CMakeLists.txt +++ b/examples/openthread/ot_sleepy_device/light_sleep/main/CMakeLists.txt @@ -1,2 +1,7 @@ idf_component_register(SRCS "esp_ot_sleepy_device.c" + PRIV_REQUIRES esp_event openthread nvs_flash INCLUDE_DIRS ".") + +if(CONFIG_ESP_SLEEP_DEBUG) + idf_component_optional_requires(PRIVATE esp_timer) +endif() diff --git a/examples/peripherals/adc/continuous_read/CMakeLists.txt b/examples/peripherals/adc/continuous_read/CMakeLists.txt index 2d54383253..fba0874179 100644 --- a/examples/peripherals/adc/continuous_read/CMakeLists.txt +++ b/examples/peripherals/adc/continuous_read/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(continuous_read) diff --git a/examples/peripherals/adc/continuous_read/main/CMakeLists.txt b/examples/peripherals/adc/continuous_read/main/CMakeLists.txt index 902872a063..68c3de7f62 100644 --- a/examples/peripherals/adc/continuous_read/main/CMakeLists.txt +++ b/examples/peripherals/adc/continuous_read/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "continuous_read_main.c" + PRIV_REQUIRES esp_adc INCLUDE_DIRS ".") diff --git a/examples/peripherals/adc/oneshot_read/CMakeLists.txt b/examples/peripherals/adc/oneshot_read/CMakeLists.txt index a76caf2c71..f45f3674fd 100644 --- a/examples/peripherals/adc/oneshot_read/CMakeLists.txt +++ b/examples/peripherals/adc/oneshot_read/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(oneshot_read) diff --git a/examples/peripherals/adc/oneshot_read/main/CMakeLists.txt b/examples/peripherals/adc/oneshot_read/main/CMakeLists.txt index 6d708b2e3e..4dbef6a838 100644 --- a/examples/peripherals/adc/oneshot_read/main/CMakeLists.txt +++ b/examples/peripherals/adc/oneshot_read/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "oneshot_read_main.c" + PRIV_REQUIRES esp_adc INCLUDE_DIRS ".") diff --git a/examples/peripherals/analog_comparator/CMakeLists.txt b/examples/peripherals/analog_comparator/CMakeLists.txt index 914719a3fb..aba0a3e74d 100644 --- a/examples/peripherals/analog_comparator/CMakeLists.txt +++ b/examples/peripherals/analog_comparator/CMakeLists.txt @@ -5,6 +5,7 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) -set(COMPONENTS main) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(analog_comparator_example) diff --git a/examples/peripherals/camera/camera_dsi/CMakeLists.txt b/examples/peripherals/camera/camera_dsi/CMakeLists.txt index 69a158b554..30767da933 100644 --- a/examples/peripherals/camera/camera_dsi/CMakeLists.txt +++ b/examples/peripherals/camera/camera_dsi/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(camera_dsi) diff --git a/examples/peripherals/dac/dac_continuous/dac_audio/CMakeLists.txt b/examples/peripherals/dac/dac_continuous/dac_audio/CMakeLists.txt index 7618655484..c6ed415baa 100644 --- a/examples/peripherals/dac/dac_continuous/dac_audio/CMakeLists.txt +++ b/examples/peripherals/dac/dac_continuous/dac_audio/CMakeLists.txt @@ -2,8 +2,7 @@ # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -# "Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main) - include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(dac_audio) diff --git a/examples/peripherals/dac/dac_continuous/signal_generator/CMakeLists.txt b/examples/peripherals/dac/dac_continuous/signal_generator/CMakeLists.txt index 9ad91aea66..7cbc502cfb 100644 --- a/examples/peripherals/dac/dac_continuous/signal_generator/CMakeLists.txt +++ b/examples/peripherals/dac/dac_continuous/signal_generator/CMakeLists.txt @@ -2,8 +2,7 @@ # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -# "Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main) - include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(signal_generator) diff --git a/examples/peripherals/dac/dac_cosine_wave/CMakeLists.txt b/examples/peripherals/dac/dac_cosine_wave/CMakeLists.txt index 531110f366..1566c42097 100644 --- a/examples/peripherals/dac/dac_cosine_wave/CMakeLists.txt +++ b/examples/peripherals/dac/dac_cosine_wave/CMakeLists.txt @@ -2,8 +2,7 @@ # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -# "Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main) - include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(dac_cosine_wave) diff --git a/examples/peripherals/dac/dac_oneshot/CMakeLists.txt b/examples/peripherals/dac/dac_oneshot/CMakeLists.txt index 0f427f4d0e..d09d0d8020 100644 --- a/examples/peripherals/dac/dac_oneshot/CMakeLists.txt +++ b/examples/peripherals/dac/dac_oneshot/CMakeLists.txt @@ -2,8 +2,7 @@ # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -# "Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main) - include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(dac_oneshot) diff --git a/examples/peripherals/dedicated_gpio/soft_i2c/CMakeLists.txt b/examples/peripherals/dedicated_gpio/soft_i2c/CMakeLists.txt index 9d29d1ffbc..88c319e071 100644 --- a/examples/peripherals/dedicated_gpio/soft_i2c/CMakeLists.txt +++ b/examples/peripherals/dedicated_gpio/soft_i2c/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(soft_i2c) diff --git a/examples/peripherals/dedicated_gpio/soft_spi/CMakeLists.txt b/examples/peripherals/dedicated_gpio/soft_spi/CMakeLists.txt index e902edc9be..d8b15d1ace 100644 --- a/examples/peripherals/dedicated_gpio/soft_spi/CMakeLists.txt +++ b/examples/peripherals/dedicated_gpio/soft_spi/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(soft_spi) diff --git a/examples/peripherals/dedicated_gpio/soft_spi/main/CMakeLists.txt b/examples/peripherals/dedicated_gpio/soft_spi/main/CMakeLists.txt index c4f4551057..bc4b728616 100644 --- a/examples/peripherals/dedicated_gpio/soft_spi/main/CMakeLists.txt +++ b/examples/peripherals/dedicated_gpio/soft_spi/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "soft_spi_master_main.c" + PRIV_REQUIRES soft_spi INCLUDE_DIRS ".") diff --git a/examples/peripherals/dedicated_gpio/soft_uart/CMakeLists.txt b/examples/peripherals/dedicated_gpio/soft_uart/CMakeLists.txt index 58222002c8..e434661ecb 100644 --- a/examples/peripherals/dedicated_gpio/soft_uart/CMakeLists.txt +++ b/examples/peripherals/dedicated_gpio/soft_uart/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(soft_uart) diff --git a/examples/peripherals/gpio/generic_gpio/CMakeLists.txt b/examples/peripherals/gpio/generic_gpio/CMakeLists.txt index caf47b30c4..b354756e4b 100644 --- a/examples/peripherals/gpio/generic_gpio/CMakeLists.txt +++ b/examples/peripherals/gpio/generic_gpio/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(generic_gpio) diff --git a/examples/peripherals/gpio/matrix_keyboard/CMakeLists.txt b/examples/peripherals/gpio/matrix_keyboard/CMakeLists.txt index e67b1e3e7d..172a3e6dd4 100644 --- a/examples/peripherals/gpio/matrix_keyboard/CMakeLists.txt +++ b/examples/peripherals/gpio/matrix_keyboard/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(matrix_keyboard) diff --git a/examples/peripherals/gpio/matrix_keyboard/main/CMakeLists.txt b/examples/peripherals/gpio/matrix_keyboard/main/CMakeLists.txt index ce42fe41d6..31ef38ac3a 100644 --- a/examples/peripherals/gpio/matrix_keyboard/main/CMakeLists.txt +++ b/examples/peripherals/gpio/matrix_keyboard/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "matrix_keyboard_example_main.c" + PRIV_REQUIRES matrix_keyboard INCLUDE_DIRS "") diff --git a/examples/peripherals/i2c/i2c_eeprom/CMakeLists.txt b/examples/peripherals/i2c/i2c_eeprom/CMakeLists.txt index f563c4da95..49cd6deba4 100644 --- a/examples/peripherals/i2c/i2c_eeprom/CMakeLists.txt +++ b/examples/peripherals/i2c/i2c_eeprom/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(i2c_eeprom) diff --git a/examples/peripherals/i2c/i2c_eeprom/main/CMakeLists.txt b/examples/peripherals/i2c/i2c_eeprom/main/CMakeLists.txt index da62cead63..d0405dc097 100644 --- a/examples/peripherals/i2c/i2c_eeprom/main/CMakeLists.txt +++ b/examples/peripherals/i2c/i2c_eeprom/main/CMakeLists.txt @@ -1,4 +1,5 @@ set(srcs "i2c_eeprom_main.c") idf_component_register(SRCS ${srcs} - INCLUDE_DIRS ".") + PRIV_REQUIRES esp_driver_i2c i2c_eeprom + INCLUDE_DIRS ".") diff --git a/examples/peripherals/i2c/i2c_tools/CMakeLists.txt b/examples/peripherals/i2c/i2c_tools/CMakeLists.txt index c44548e53b..5b693f3d12 100644 --- a/examples/peripherals/i2c/i2c_tools/CMakeLists.txt +++ b/examples/peripherals/i2c/i2c_tools/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(i2c_tools) diff --git a/examples/peripherals/i2c/i2c_tools/main/CMakeLists.txt b/examples/peripherals/i2c/i2c_tools/main/CMakeLists.txt index 60f09894c4..7d3822660c 100644 --- a/examples/peripherals/i2c/i2c_tools/main/CMakeLists.txt +++ b/examples/peripherals/i2c/i2c_tools/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "i2ctools_example_main.c" "cmd_i2ctools.c" + PRIV_REQUIRES fatfs esp_driver_i2c INCLUDE_DIRS ".") diff --git a/examples/peripherals/i2s/i2s_basic/i2s_pdm/CMakeLists.txt b/examples/peripherals/i2s/i2s_basic/i2s_pdm/CMakeLists.txt index d5a6a35e1f..da16f9f226 100644 --- a/examples/peripherals/i2s/i2s_basic/i2s_pdm/CMakeLists.txt +++ b/examples/peripherals/i2s/i2s_basic/i2s_pdm/CMakeLists.txt @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) -set(COMPONENTS main) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(i2s_pdm_example) diff --git a/examples/peripherals/i2s/i2s_basic/i2s_std/CMakeLists.txt b/examples/peripherals/i2s/i2s_basic/i2s_std/CMakeLists.txt index 46dd23bba4..34b4d8c573 100644 --- a/examples/peripherals/i2s/i2s_basic/i2s_std/CMakeLists.txt +++ b/examples/peripherals/i2s/i2s_basic/i2s_std/CMakeLists.txt @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) -set(COMPONENTS main) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(i2s_std_example) diff --git a/examples/peripherals/i2s/i2s_basic/i2s_tdm/CMakeLists.txt b/examples/peripherals/i2s/i2s_basic/i2s_tdm/CMakeLists.txt index 8acb7b8a39..5d7df5de35 100644 --- a/examples/peripherals/i2s/i2s_basic/i2s_tdm/CMakeLists.txt +++ b/examples/peripherals/i2s/i2s_basic/i2s_tdm/CMakeLists.txt @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) -set(COMPONENTS main) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(i2s_tdm_example) diff --git a/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/CMakeLists.txt b/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/CMakeLists.txt index 515e28c303..0a7c3907c8 100644 --- a/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/CMakeLists.txt +++ b/examples/peripherals/i2s/i2s_codec/i2s_es7210_tdm/CMakeLists.txt @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) -set(COMPONENTS main) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(es7210_tdm_record_example) diff --git a/examples/peripherals/i2s/i2s_codec/i2s_es8311/CMakeLists.txt b/examples/peripherals/i2s/i2s_codec/i2s_es8311/CMakeLists.txt index f4203cb3ac..da20141913 100644 --- a/examples/peripherals/i2s/i2s_codec/i2s_es8311/CMakeLists.txt +++ b/examples/peripherals/i2s/i2s_codec/i2s_es8311/CMakeLists.txt @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) -set(COMPONENTS main) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(i2s-es8311-example) diff --git a/examples/peripherals/i2s/i2s_recorder/CMakeLists.txt b/examples/peripherals/i2s/i2s_recorder/CMakeLists.txt index 31e41a0899..4f2f210d4e 100644 --- a/examples/peripherals/i2s/i2s_recorder/CMakeLists.txt +++ b/examples/peripherals/i2s/i2s_recorder/CMakeLists.txt @@ -3,6 +3,7 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) -set(COMPONENTS main) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(esp32_i2s_driver_example) diff --git a/examples/peripherals/isp/multi_pipelines/CMakeLists.txt b/examples/peripherals/isp/multi_pipelines/CMakeLists.txt index 3f12d866db..58d194eeff 100644 --- a/examples/peripherals/isp/multi_pipelines/CMakeLists.txt +++ b/examples/peripherals/isp/multi_pipelines/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(isp_multi_pipelines) diff --git a/examples/peripherals/jpeg/jpeg_decode/CMakeLists.txt b/examples/peripherals/jpeg/jpeg_decode/CMakeLists.txt index 3b371a6c85..e7fedd3575 100644 --- a/examples/peripherals/jpeg/jpeg_decode/CMakeLists.txt +++ b/examples/peripherals/jpeg/jpeg_decode/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(jpeg_decode) diff --git a/examples/peripherals/jpeg/jpeg_decode/main/CMakeLists.txt b/examples/peripherals/jpeg/jpeg_decode/main/CMakeLists.txt index 90f7897d87..96f77a9d2c 100644 --- a/examples/peripherals/jpeg/jpeg_decode/main/CMakeLists.txt +++ b/examples/peripherals/jpeg/jpeg_decode/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "jpeg_decode_main.c" + PRIV_REQUIRES fatfs esp_driver_jpeg esp_psram INCLUDE_DIRS ".") diff --git a/examples/peripherals/jpeg/jpeg_encode/CMakeLists.txt b/examples/peripherals/jpeg/jpeg_encode/CMakeLists.txt index 9add4676cd..175d488a92 100644 --- a/examples/peripherals/jpeg/jpeg_encode/CMakeLists.txt +++ b/examples/peripherals/jpeg/jpeg_encode/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(jpeg_encode) diff --git a/examples/peripherals/jpeg/jpeg_encode/main/CMakeLists.txt b/examples/peripherals/jpeg/jpeg_encode/main/CMakeLists.txt index 1da51f537f..491dcb7a84 100644 --- a/examples/peripherals/jpeg/jpeg_encode/main/CMakeLists.txt +++ b/examples/peripherals/jpeg/jpeg_encode/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "jpeg_encode_main.c" + PRIV_REQUIRES fatfs esp_driver_jpeg INCLUDE_DIRS ".") diff --git a/examples/peripherals/lcd/i2c_oled/CMakeLists.txt b/examples/peripherals/lcd/i2c_oled/CMakeLists.txt index 5013862768..7085f73391 100644 --- a/examples/peripherals/lcd/i2c_oled/CMakeLists.txt +++ b/examples/peripherals/lcd/i2c_oled/CMakeLists.txt @@ -1,4 +1,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(i2c_oled) diff --git a/examples/peripherals/lcd/i80_controller/CMakeLists.txt b/examples/peripherals/lcd/i80_controller/CMakeLists.txt index 71ef82085e..f1053f560b 100644 --- a/examples/peripherals/lcd/i80_controller/CMakeLists.txt +++ b/examples/peripherals/lcd/i80_controller/CMakeLists.txt @@ -1,4 +1,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(i80_controller) diff --git a/examples/peripherals/lcd/i80_controller/main/CMakeLists.txt b/examples/peripherals/lcd/i80_controller/main/CMakeLists.txt index d779b67c9f..4ff1a82f4e 100644 --- a/examples/peripherals/lcd/i80_controller/main/CMakeLists.txt +++ b/examples/peripherals/lcd/i80_controller/main/CMakeLists.txt @@ -4,6 +4,7 @@ if(CONFIG_EXAMPLE_LCD_IMAGE_FROM_EMBEDDED_BINARY) endif() idf_component_register(SRCS "i80_controller_example_main.c" "lvgl_demo_ui.c" ${embedded_images} + PRIV_REQUIRES esp_lcd spiffs esp_psram INCLUDE_DIRS ".") if(CONFIG_EXAMPLE_LCD_IMAGE_FROM_FILE_SYSTEM) diff --git a/examples/peripherals/lcd/mipi_dsi/CMakeLists.txt b/examples/peripherals/lcd/mipi_dsi/CMakeLists.txt index 0e9eb371ab..8d70b03559 100644 --- a/examples/peripherals/lcd/mipi_dsi/CMakeLists.txt +++ b/examples/peripherals/lcd/mipi_dsi/CMakeLists.txt @@ -1,4 +1,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(mipi_dsi_panel) diff --git a/examples/peripherals/lcd/rgb_panel/CMakeLists.txt b/examples/peripherals/lcd/rgb_panel/CMakeLists.txt index 27eba1aa4c..e624386b37 100644 --- a/examples/peripherals/lcd/rgb_panel/CMakeLists.txt +++ b/examples/peripherals/lcd/rgb_panel/CMakeLists.txt @@ -1,4 +1,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(rgb_panel) diff --git a/examples/peripherals/lcd/rgb_panel/main/CMakeLists.txt b/examples/peripherals/lcd/rgb_panel/main/CMakeLists.txt index 4e9a3d43e5..0b88bc41fb 100644 --- a/examples/peripherals/lcd/rgb_panel/main/CMakeLists.txt +++ b/examples/peripherals/lcd/rgb_panel/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "rgb_lcd_example_main.c" "lvgl_demo_ui.c" + PRIV_REQUIRES esp_lcd INCLUDE_DIRS ".") diff --git a/examples/peripherals/lcd/spi_lcd_touch/CMakeLists.txt b/examples/peripherals/lcd/spi_lcd_touch/CMakeLists.txt index ec78aa1cc8..15d15a89bf 100644 --- a/examples/peripherals/lcd/spi_lcd_touch/CMakeLists.txt +++ b/examples/peripherals/lcd/spi_lcd_touch/CMakeLists.txt @@ -1,4 +1,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(spi_lcd_touch) diff --git a/examples/peripherals/lcd/tjpgd/CMakeLists.txt b/examples/peripherals/lcd/tjpgd/CMakeLists.txt index 0355a698b5..129aa1d419 100644 --- a/examples/peripherals/lcd/tjpgd/CMakeLists.txt +++ b/examples/peripherals/lcd/tjpgd/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(lcd_tjpgd) diff --git a/examples/peripherals/lcd/tjpgd/main/CMakeLists.txt b/examples/peripherals/lcd/tjpgd/main/CMakeLists.txt index 8abed53131..c1a014fe78 100644 --- a/examples/peripherals/lcd/tjpgd/main/CMakeLists.txt +++ b/examples/peripherals/lcd/tjpgd/main/CMakeLists.txt @@ -5,4 +5,5 @@ set(srcs "pretty_effect.c" idf_component_register(SRCS ${srcs} INCLUDE_DIRS "." + PRIV_REQUIRES esp_lcd EMBED_FILES image.jpg) diff --git a/examples/peripherals/ledc/ledc_basic/CMakeLists.txt b/examples/peripherals/ledc/ledc_basic/CMakeLists.txt index 6fd196565b..2f47b2d06d 100644 --- a/examples/peripherals/ledc/ledc_basic/CMakeLists.txt +++ b/examples/peripherals/ledc/ledc_basic/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ledc) diff --git a/examples/peripherals/ledc/ledc_basic/main/CMakeLists.txt b/examples/peripherals/ledc/ledc_basic/main/CMakeLists.txt index 04207465b2..df8f8fae0c 100644 --- a/examples/peripherals/ledc/ledc_basic/main/CMakeLists.txt +++ b/examples/peripherals/ledc/ledc_basic/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "ledc_basic_example_main.c" + PRIV_REQUIRES esp_driver_ledc esp_driver_gpio INCLUDE_DIRS ".") diff --git a/examples/peripherals/ledc/ledc_fade/CMakeLists.txt b/examples/peripherals/ledc/ledc_fade/CMakeLists.txt index cd73adaf4b..5a140e8784 100644 --- a/examples/peripherals/ledc/ledc_fade/CMakeLists.txt +++ b/examples/peripherals/ledc/ledc_fade/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ledc_fade) diff --git a/examples/peripherals/ledc/ledc_fade/main/CMakeLists.txt b/examples/peripherals/ledc/ledc_fade/main/CMakeLists.txt index 7602af34bd..6be956a461 100644 --- a/examples/peripherals/ledc/ledc_fade/main/CMakeLists.txt +++ b/examples/peripherals/ledc/ledc_fade/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "ledc_fade_example_main.c" + PRIV_REQUIRES esp_driver_ledc esp_driver_gpio INCLUDE_DIRS ".") diff --git a/examples/peripherals/ledc/ledc_gamma_curve_fade/CMakeLists.txt b/examples/peripherals/ledc/ledc_gamma_curve_fade/CMakeLists.txt index e615f5ed1f..0b75248c7b 100644 --- a/examples/peripherals/ledc/ledc_gamma_curve_fade/CMakeLists.txt +++ b/examples/peripherals/ledc/ledc_gamma_curve_fade/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ledc_gamma_curve_fade) diff --git a/examples/peripherals/ledc/ledc_gamma_curve_fade/main/CMakeLists.txt b/examples/peripherals/ledc/ledc_gamma_curve_fade/main/CMakeLists.txt index 0948cd72b2..af89b4a176 100644 --- a/examples/peripherals/ledc/ledc_gamma_curve_fade/main/CMakeLists.txt +++ b/examples/peripherals/ledc/ledc_gamma_curve_fade/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "ledc_gamma_curve_fade_example_main.c" + PRIV_REQUIRES esp_driver_ledc esp_driver_gpio INCLUDE_DIRS ".") diff --git a/examples/peripherals/mcpwm/mcpwm_bdc_speed_control/CMakeLists.txt b/examples/peripherals/mcpwm/mcpwm_bdc_speed_control/CMakeLists.txt index 44878b060a..27b7d65a6b 100644 --- a/examples/peripherals/mcpwm/mcpwm_bdc_speed_control/CMakeLists.txt +++ b/examples/peripherals/mcpwm/mcpwm_bdc_speed_control/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(mcpwm_brushed_dc_control) diff --git a/examples/peripherals/mcpwm/mcpwm_bldc_hall_control/CMakeLists.txt b/examples/peripherals/mcpwm/mcpwm_bldc_hall_control/CMakeLists.txt index 8a6c0d6d18..9e05e0762f 100644 --- a/examples/peripherals/mcpwm/mcpwm_bldc_hall_control/CMakeLists.txt +++ b/examples/peripherals/mcpwm/mcpwm_bldc_hall_control/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(mcpwm_bldc_hall_control) diff --git a/examples/peripherals/mcpwm/mcpwm_bldc_hall_control/main/CMakeLists.txt b/examples/peripherals/mcpwm/mcpwm_bldc_hall_control/main/CMakeLists.txt index 1d97d04dc0..2ba409a27f 100644 --- a/examples/peripherals/mcpwm/mcpwm_bldc_hall_control/main/CMakeLists.txt +++ b/examples/peripherals/mcpwm/mcpwm_bldc_hall_control/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "mcpwm_bldc_hall_control_example_main.c" + PRIV_REQUIRES esp_driver_mcpwm esp_timer esp_driver_gpio INCLUDE_DIRS ".") diff --git a/examples/peripherals/mcpwm/mcpwm_capture_hc_sr04/CMakeLists.txt b/examples/peripherals/mcpwm/mcpwm_capture_hc_sr04/CMakeLists.txt index da606681cd..670605e4a1 100644 --- a/examples/peripherals/mcpwm/mcpwm_capture_hc_sr04/CMakeLists.txt +++ b/examples/peripherals/mcpwm/mcpwm_capture_hc_sr04/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(mcpwm_capture_hc_sr04) diff --git a/examples/peripherals/mcpwm/mcpwm_capture_hc_sr04/main/CMakeLists.txt b/examples/peripherals/mcpwm/mcpwm_capture_hc_sr04/main/CMakeLists.txt index 450a211ce5..67c1afe61b 100644 --- a/examples/peripherals/mcpwm/mcpwm_capture_hc_sr04/main/CMakeLists.txt +++ b/examples/peripherals/mcpwm/mcpwm_capture_hc_sr04/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "mcpwm_capture_hc_sr04.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES esp_driver_mcpwm esp_driver_gpio + INCLUDE_DIRS ".") diff --git a/examples/peripherals/mcpwm/mcpwm_foc_svpwm_open_loop/CMakeLists.txt b/examples/peripherals/mcpwm/mcpwm_foc_svpwm_open_loop/CMakeLists.txt index 300e9dc2a4..da030acd39 100644 --- a/examples/peripherals/mcpwm/mcpwm_foc_svpwm_open_loop/CMakeLists.txt +++ b/examples/peripherals/mcpwm/mcpwm_foc_svpwm_open_loop/CMakeLists.txt @@ -5,4 +5,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(mcpwm_foc_svpwm_generate) diff --git a/examples/peripherals/mcpwm/mcpwm_servo_control/CMakeLists.txt b/examples/peripherals/mcpwm/mcpwm_servo_control/CMakeLists.txt index 7c7b0ee936..5b7eb3a884 100644 --- a/examples/peripherals/mcpwm/mcpwm_servo_control/CMakeLists.txt +++ b/examples/peripherals/mcpwm/mcpwm_servo_control/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(mcpwm_servo_control) diff --git a/examples/peripherals/mcpwm/mcpwm_servo_control/main/CMakeLists.txt b/examples/peripherals/mcpwm/mcpwm_servo_control/main/CMakeLists.txt index 010d6a1d47..e3c84c9f62 100644 --- a/examples/peripherals/mcpwm/mcpwm_servo_control/main/CMakeLists.txt +++ b/examples/peripherals/mcpwm/mcpwm_servo_control/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "mcpwm_servo_control_example_main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES esp_driver_mcpwm + INCLUDE_DIRS ".") diff --git a/examples/peripherals/mcpwm/mcpwm_sync/CMakeLists.txt b/examples/peripherals/mcpwm/mcpwm_sync/CMakeLists.txt index 7bfcd825e0..960a298214 100644 --- a/examples/peripherals/mcpwm/mcpwm_sync/CMakeLists.txt +++ b/examples/peripherals/mcpwm/mcpwm_sync/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(mcpwm_sync) diff --git a/examples/peripherals/mcpwm/mcpwm_sync/main/CMakeLists.txt b/examples/peripherals/mcpwm/mcpwm_sync/main/CMakeLists.txt index cdf25dbaf1..c5931ce3d6 100644 --- a/examples/peripherals/mcpwm/mcpwm_sync/main/CMakeLists.txt +++ b/examples/peripherals/mcpwm/mcpwm_sync/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "mcpwm_sync_example_main.c" + PRIV_REQUIRES esp_driver_mcpwm esp_driver_gpio INCLUDE_DIRS ".") diff --git a/examples/peripherals/parlio/parlio_rx/logic_analyzer/CMakeLists.txt b/examples/peripherals/parlio/parlio_rx/logic_analyzer/CMakeLists.txt index 7432fd34b2..628f3d50d4 100644 --- a/examples/peripherals/parlio/parlio_rx/logic_analyzer/CMakeLists.txt +++ b/examples/peripherals/parlio/parlio_rx/logic_analyzer/CMakeLists.txt @@ -5,6 +5,7 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) -set(COMPONENTS main) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(logic_analyzer) diff --git a/examples/peripherals/parlio/parlio_tx/simple_rgb_led_matrix/CMakeLists.txt b/examples/peripherals/parlio/parlio_tx/simple_rgb_led_matrix/CMakeLists.txt index 943a2b7e0b..44abdb8dec 100644 --- a/examples/peripherals/parlio/parlio_tx/simple_rgb_led_matrix/CMakeLists.txt +++ b/examples/peripherals/parlio/parlio_tx/simple_rgb_led_matrix/CMakeLists.txt @@ -5,6 +5,7 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) -set(COMPONENTS main) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(rgb_led_matrix) diff --git a/examples/peripherals/pcnt/rotary_encoder/CMakeLists.txt b/examples/peripherals/pcnt/rotary_encoder/CMakeLists.txt index fce6431cc2..cde47b0c02 100644 --- a/examples/peripherals/pcnt/rotary_encoder/CMakeLists.txt +++ b/examples/peripherals/pcnt/rotary_encoder/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(rotary_encoder) diff --git a/examples/peripherals/pcnt/rotary_encoder/main/CMakeLists.txt b/examples/peripherals/pcnt/rotary_encoder/main/CMakeLists.txt index f49bb25673..3b1407fc50 100644 --- a/examples/peripherals/pcnt/rotary_encoder/main/CMakeLists.txt +++ b/examples/peripherals/pcnt/rotary_encoder/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "rotary_encoder_example_main.c" + PRIV_REQUIRES esp_driver_pcnt esp_driver_gpio INCLUDE_DIRS ".") diff --git a/examples/peripherals/ppa/ppa_dsi/CMakeLists.txt b/examples/peripherals/ppa/ppa_dsi/CMakeLists.txt index 41d2d696ac..f6a8b69b06 100644 --- a/examples/peripherals/ppa/ppa_dsi/CMakeLists.txt +++ b/examples/peripherals/ppa/ppa_dsi/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ppa_dsi) diff --git a/examples/peripherals/rmt/dshot_esc/CMakeLists.txt b/examples/peripherals/rmt/dshot_esc/CMakeLists.txt index 67961dcb41..d8895a6caa 100644 --- a/examples/peripherals/rmt/dshot_esc/CMakeLists.txt +++ b/examples/peripherals/rmt/dshot_esc/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(dshot_esc) diff --git a/examples/peripherals/rmt/dshot_esc/main/CMakeLists.txt b/examples/peripherals/rmt/dshot_esc/main/CMakeLists.txt index 0e27b9096b..ce375fcae4 100644 --- a/examples/peripherals/rmt/dshot_esc/main/CMakeLists.txt +++ b/examples/peripherals/rmt/dshot_esc/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "dshot_esc_example_main.c" "dshot_esc_encoder.c" + PRIV_REQUIRES esp_driver_rmt INCLUDE_DIRS ".") diff --git a/examples/peripherals/rmt/ir_nec_transceiver/CMakeLists.txt b/examples/peripherals/rmt/ir_nec_transceiver/CMakeLists.txt index d3a4afa247..b08d62f4c1 100644 --- a/examples/peripherals/rmt/ir_nec_transceiver/CMakeLists.txt +++ b/examples/peripherals/rmt/ir_nec_transceiver/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ir_nec_transceiver) diff --git a/examples/peripherals/rmt/ir_nec_transceiver/main/CMakeLists.txt b/examples/peripherals/rmt/ir_nec_transceiver/main/CMakeLists.txt index 129f0fa792..940215de0e 100644 --- a/examples/peripherals/rmt/ir_nec_transceiver/main/CMakeLists.txt +++ b/examples/peripherals/rmt/ir_nec_transceiver/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "ir_nec_transceiver_main.c" "ir_nec_encoder.c" + PRIV_REQUIRES esp_driver_rmt INCLUDE_DIRS ".") diff --git a/examples/peripherals/rmt/led_strip/CMakeLists.txt b/examples/peripherals/rmt/led_strip/CMakeLists.txt index 72d322b621..9e17a59a98 100644 --- a/examples/peripherals/rmt/led_strip/CMakeLists.txt +++ b/examples/peripherals/rmt/led_strip/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(led_strip) diff --git a/examples/peripherals/rmt/led_strip/main/CMakeLists.txt b/examples/peripherals/rmt/led_strip/main/CMakeLists.txt index 1515a1d90d..07171ccfc4 100644 --- a/examples/peripherals/rmt/led_strip/main/CMakeLists.txt +++ b/examples/peripherals/rmt/led_strip/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "led_strip_example_main.c" "led_strip_encoder.c" + PRIV_REQUIRES esp_driver_rmt INCLUDE_DIRS ".") diff --git a/examples/peripherals/rmt/led_strip_simple_encoder/CMakeLists.txt b/examples/peripherals/rmt/led_strip_simple_encoder/CMakeLists.txt index 222fe02322..caaa99185f 100644 --- a/examples/peripherals/rmt/led_strip_simple_encoder/CMakeLists.txt +++ b/examples/peripherals/rmt/led_strip_simple_encoder/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(led_strip_simple_encoder) diff --git a/examples/peripherals/rmt/led_strip_simple_encoder/main/CMakeLists.txt b/examples/peripherals/rmt/led_strip_simple_encoder/main/CMakeLists.txt index 5032ef1834..b3b4254b26 100644 --- a/examples/peripherals/rmt/led_strip_simple_encoder/main/CMakeLists.txt +++ b/examples/peripherals/rmt/led_strip_simple_encoder/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "led_strip_example_main.c" + PRIV_REQUIRES esp_driver_rmt INCLUDE_DIRS ".") diff --git a/examples/peripherals/rmt/musical_buzzer/CMakeLists.txt b/examples/peripherals/rmt/musical_buzzer/CMakeLists.txt index 28f82b160e..f1aa73b996 100644 --- a/examples/peripherals/rmt/musical_buzzer/CMakeLists.txt +++ b/examples/peripherals/rmt/musical_buzzer/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(musical_buzzer) diff --git a/examples/peripherals/rmt/musical_buzzer/main/CMakeLists.txt b/examples/peripherals/rmt/musical_buzzer/main/CMakeLists.txt index 6f8ea967c3..383a6d8d08 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" "musical_score_encoder.c" + PRIV_REQUIRES esp_driver_rmt INCLUDE_DIRS ".") diff --git a/examples/peripherals/rmt/onewire/CMakeLists.txt b/examples/peripherals/rmt/onewire/CMakeLists.txt index 8e815472af..898f4133df 100644 --- a/examples/peripherals/rmt/onewire/CMakeLists.txt +++ b/examples/peripherals/rmt/onewire/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(onewire) diff --git a/examples/peripherals/rmt/stepper_motor/CMakeLists.txt b/examples/peripherals/rmt/stepper_motor/CMakeLists.txt index 360e699ac9..5c4b02cf47 100644 --- a/examples/peripherals/rmt/stepper_motor/CMakeLists.txt +++ b/examples/peripherals/rmt/stepper_motor/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(step_motor) diff --git a/examples/peripherals/rmt/stepper_motor/main/CMakeLists.txt b/examples/peripherals/rmt/stepper_motor/main/CMakeLists.txt index ca5fa8da19..e112f1ccfd 100644 --- a/examples/peripherals/rmt/stepper_motor/main/CMakeLists.txt +++ b/examples/peripherals/rmt/stepper_motor/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "stepper_motor_example_main.c" "stepper_motor_encoder.c" + PRIV_REQUIRES esp_driver_rmt esp_driver_gpio INCLUDE_DIRS ".") diff --git a/examples/peripherals/sdio/host/CMakeLists.txt b/examples/peripherals/sdio/host/CMakeLists.txt index 861c2f4b64..165eefa573 100644 --- a/examples/peripherals/sdio/host/CMakeLists.txt +++ b/examples/peripherals/sdio/host/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(sdio_host) diff --git a/examples/peripherals/sdio/slave/CMakeLists.txt b/examples/peripherals/sdio/slave/CMakeLists.txt index 9624e3e158..0767074c56 100644 --- a/examples/peripherals/sdio/slave/CMakeLists.txt +++ b/examples/peripherals/sdio/slave/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(sdio_slave) diff --git a/examples/peripherals/sdio/slave/main/CMakeLists.txt b/examples/peripherals/sdio/slave/main/CMakeLists.txt index 61fac40e63..8381ce64b8 100644 --- a/examples/peripherals/sdio/slave/main/CMakeLists.txt +++ b/examples/peripherals/sdio/slave/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "app_main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES esp_driver_sdio esp_ringbuf + INCLUDE_DIRS ".") diff --git a/examples/peripherals/sigma_delta/sdm_dac/CMakeLists.txt b/examples/peripherals/sigma_delta/sdm_dac/CMakeLists.txt index 633eb379be..67ceff61f7 100644 --- a/examples/peripherals/sigma_delta/sdm_dac/CMakeLists.txt +++ b/examples/peripherals/sigma_delta/sdm_dac/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(sdm_dac_example) diff --git a/examples/peripherals/sigma_delta/sdm_dac/main/CMakeLists.txt b/examples/peripherals/sigma_delta/sdm_dac/main/CMakeLists.txt index c597f431d5..996b1aafde 100644 --- a/examples/peripherals/sigma_delta/sdm_dac/main/CMakeLists.txt +++ b/examples/peripherals/sigma_delta/sdm_dac/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "sdm_dac_example_main.c" + PRIV_REQUIRES esp_driver_sdm esp_driver_gptimer INCLUDE_DIRS ".") diff --git a/examples/peripherals/sigma_delta/sdm_led/CMakeLists.txt b/examples/peripherals/sigma_delta/sdm_led/CMakeLists.txt index c0fe198f89..a486dd89b6 100644 --- a/examples/peripherals/sigma_delta/sdm_led/CMakeLists.txt +++ b/examples/peripherals/sigma_delta/sdm_led/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(sdm_led_example) diff --git a/examples/peripherals/sigma_delta/sdm_led/main/CMakeLists.txt b/examples/peripherals/sigma_delta/sdm_led/main/CMakeLists.txt index ecad9cff66..80671e9b6a 100644 --- a/examples/peripherals/sigma_delta/sdm_led/main/CMakeLists.txt +++ b/examples/peripherals/sigma_delta/sdm_led/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "sdm_led_example_main.c" + PRIV_REQUIRES esp_driver_sdm INCLUDE_DIRS ".") diff --git a/examples/peripherals/spi_master/hd_eeprom/CMakeLists.txt b/examples/peripherals/spi_master/hd_eeprom/CMakeLists.txt index 088229bd22..937a6fe4ff 100644 --- a/examples/peripherals/spi_master/hd_eeprom/CMakeLists.txt +++ b/examples/peripherals/spi_master/hd_eeprom/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(spi_eeprom) diff --git a/examples/peripherals/spi_master/hd_eeprom/main/CMakeLists.txt b/examples/peripherals/spi_master/hd_eeprom/main/CMakeLists.txt index 1bfe621902..b2d38e5ffc 100644 --- a/examples/peripherals/spi_master/hd_eeprom/main/CMakeLists.txt +++ b/examples/peripherals/spi_master/hd_eeprom/main/CMakeLists.txt @@ -1,4 +1,5 @@ set(srcs "spi_eeprom_main.c") idf_component_register(SRCS ${srcs} - INCLUDE_DIRS ".") + PRIV_REQUIRES esp_driver_spi esp_driver_gpio eeprom + INCLUDE_DIRS ".") diff --git a/examples/peripherals/spi_master/lcd/CMakeLists.txt b/examples/peripherals/spi_master/lcd/CMakeLists.txt index 9a60384676..8ee7cc0bd4 100644 --- a/examples/peripherals/spi_master/lcd/CMakeLists.txt +++ b/examples/peripherals/spi_master/lcd/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(spi_master) diff --git a/examples/peripherals/spi_master/lcd/main/CMakeLists.txt b/examples/peripherals/spi_master/lcd/main/CMakeLists.txt index 0d34bee60e..535aefb32c 100644 --- a/examples/peripherals/spi_master/lcd/main/CMakeLists.txt +++ b/examples/peripherals/spi_master/lcd/main/CMakeLists.txt @@ -5,4 +5,5 @@ set(srcs "pretty_effect.c" idf_component_register(SRCS ${srcs} INCLUDE_DIRS "." + PRIV_REQUIRES esp_driver_spi esp_driver_gpio EMBED_FILES image.jpg) diff --git a/examples/peripherals/spi_slave/receiver/CMakeLists.txt b/examples/peripherals/spi_slave/receiver/CMakeLists.txt index 76db81f1a7..31882905eb 100644 --- a/examples/peripherals/spi_slave/receiver/CMakeLists.txt +++ b/examples/peripherals/spi_slave/receiver/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(spi_slave_receiver) diff --git a/examples/peripherals/spi_slave/receiver/main/CMakeLists.txt b/examples/peripherals/spi_slave/receiver/main/CMakeLists.txt index 61fac40e63..70c0f245a9 100644 --- a/examples/peripherals/spi_slave/receiver/main/CMakeLists.txt +++ b/examples/peripherals/spi_slave/receiver/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "app_main.c" + PRIV_REQUIRES esp_driver_spi esp_driver_gpio INCLUDE_DIRS ".") diff --git a/examples/peripherals/spi_slave/sender/CMakeLists.txt b/examples/peripherals/spi_slave/sender/CMakeLists.txt index 883f0f6886..8481d60474 100644 --- a/examples/peripherals/spi_slave/sender/CMakeLists.txt +++ b/examples/peripherals/spi_slave/sender/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(spi_slave_sender) diff --git a/examples/peripherals/spi_slave/sender/main/CMakeLists.txt b/examples/peripherals/spi_slave/sender/main/CMakeLists.txt index 61fac40e63..b101a3ca96 100644 --- a/examples/peripherals/spi_slave/sender/main/CMakeLists.txt +++ b/examples/peripherals/spi_slave/sender/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "app_main.c" + PRIV_REQUIRES esp_driver_spi esp_driver_gpio esp_timer INCLUDE_DIRS ".") diff --git a/examples/peripherals/spi_slave_hd/append_mode/master/CMakeLists.txt b/examples/peripherals/spi_slave_hd/append_mode/master/CMakeLists.txt index 4b9b733a2c..693a873604 100644 --- a/examples/peripherals/spi_slave_hd/append_mode/master/CMakeLists.txt +++ b/examples/peripherals/spi_slave_hd/append_mode/master/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(spi-slave-hd-append-master) diff --git a/examples/peripherals/spi_slave_hd/append_mode/slave/CMakeLists.txt b/examples/peripherals/spi_slave_hd/append_mode/slave/CMakeLists.txt index f713da029a..0f5b59a059 100644 --- a/examples/peripherals/spi_slave_hd/append_mode/slave/CMakeLists.txt +++ b/examples/peripherals/spi_slave_hd/append_mode/slave/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(spi-slave-hd-append-slave) diff --git a/examples/peripherals/spi_slave_hd/append_mode/slave/main/CMakeLists.txt b/examples/peripherals/spi_slave_hd/append_mode/slave/main/CMakeLists.txt index 61fac40e63..03588e7148 100644 --- a/examples/peripherals/spi_slave_hd/append_mode/slave/main/CMakeLists.txt +++ b/examples/peripherals/spi_slave_hd/append_mode/slave/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "app_main.c" + PRIV_REQUIRES esp_driver_spi INCLUDE_DIRS ".") diff --git a/examples/peripherals/spi_slave_hd/segment_mode/seg_master/CMakeLists.txt b/examples/peripherals/spi_slave_hd/segment_mode/seg_master/CMakeLists.txt index 29a0b67221..c16aa10cd6 100644 --- a/examples/peripherals/spi_slave_hd/segment_mode/seg_master/CMakeLists.txt +++ b/examples/peripherals/spi_slave_hd/segment_mode/seg_master/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(seg_master) diff --git a/examples/peripherals/spi_slave_hd/segment_mode/seg_slave/CMakeLists.txt b/examples/peripherals/spi_slave_hd/segment_mode/seg_slave/CMakeLists.txt index 309c6b437c..01219435b9 100644 --- a/examples/peripherals/spi_slave_hd/segment_mode/seg_slave/CMakeLists.txt +++ b/examples/peripherals/spi_slave_hd/segment_mode/seg_slave/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(seg_slave) diff --git a/examples/peripherals/spi_slave_hd/segment_mode/seg_slave/main/CMakeLists.txt b/examples/peripherals/spi_slave_hd/segment_mode/seg_slave/main/CMakeLists.txt index 61fac40e63..03588e7148 100644 --- a/examples/peripherals/spi_slave_hd/segment_mode/seg_slave/main/CMakeLists.txt +++ b/examples/peripherals/spi_slave_hd/segment_mode/seg_slave/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "app_main.c" + PRIV_REQUIRES esp_driver_spi INCLUDE_DIRS ".") diff --git a/examples/peripherals/temperature_sensor/temp_sensor/CMakeLists.txt b/examples/peripherals/temperature_sensor/temp_sensor/CMakeLists.txt index b2c11f8205..58c4bf05c0 100644 --- a/examples/peripherals/temperature_sensor/temp_sensor/CMakeLists.txt +++ b/examples/peripherals/temperature_sensor/temp_sensor/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(temp_sensor) diff --git a/examples/peripherals/temperature_sensor/temp_sensor/main/CMakeLists.txt b/examples/peripherals/temperature_sensor/temp_sensor/main/CMakeLists.txt index 8e713a2504..fb0b0aa5aa 100644 --- a/examples/peripherals/temperature_sensor/temp_sensor/main/CMakeLists.txt +++ b/examples/peripherals/temperature_sensor/temp_sensor/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "temp_sensor_main.c" + PRIV_REQUIRES esp_driver_tsens INCLUDE_DIRS ".") diff --git a/examples/peripherals/temperature_sensor/temp_sensor_monitor/CMakeLists.txt b/examples/peripherals/temperature_sensor/temp_sensor_monitor/CMakeLists.txt index 44aa59aaff..127bb3d3b1 100644 --- a/examples/peripherals/temperature_sensor/temp_sensor_monitor/CMakeLists.txt +++ b/examples/peripherals/temperature_sensor/temp_sensor_monitor/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(temp_sensor_monitor) diff --git a/examples/peripherals/temperature_sensor/temp_sensor_monitor/main/CMakeLists.txt b/examples/peripherals/temperature_sensor/temp_sensor_monitor/main/CMakeLists.txt index d0a8e29105..5b3f3203b4 100644 --- a/examples/peripherals/temperature_sensor/temp_sensor_monitor/main/CMakeLists.txt +++ b/examples/peripherals/temperature_sensor/temp_sensor_monitor/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "temp_sensor_monitor_main.c" + PRIV_REQUIRES esp_driver_tsens INCLUDE_DIRS ".") diff --git a/examples/peripherals/timer_group/gptimer/CMakeLists.txt b/examples/peripherals/timer_group/gptimer/CMakeLists.txt index dc397a8a42..49a5861218 100644 --- a/examples/peripherals/timer_group/gptimer/CMakeLists.txt +++ b/examples/peripherals/timer_group/gptimer/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(gptimer) diff --git a/examples/peripherals/timer_group/gptimer/main/CMakeLists.txt b/examples/peripherals/timer_group/gptimer/main/CMakeLists.txt index 81e0fad7b2..bc25d1bd88 100644 --- a/examples/peripherals/timer_group/gptimer/main/CMakeLists.txt +++ b/examples/peripherals/timer_group/gptimer/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "gptimer_example_main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES esp_driver_gptimer + INCLUDE_DIRS ".") diff --git a/examples/peripherals/timer_group/gptimer_capture_hc_sr04/CMakeLists.txt b/examples/peripherals/timer_group/gptimer_capture_hc_sr04/CMakeLists.txt index 0176118ad8..c73909995d 100644 --- a/examples/peripherals/timer_group/gptimer_capture_hc_sr04/CMakeLists.txt +++ b/examples/peripherals/timer_group/gptimer_capture_hc_sr04/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(gptimer_etm_capture) diff --git a/examples/peripherals/timer_group/gptimer_capture_hc_sr04/main/CMakeLists.txt b/examples/peripherals/timer_group/gptimer_capture_hc_sr04/main/CMakeLists.txt index 1580e9084e..a1ef40bdcd 100644 --- a/examples/peripherals/timer_group/gptimer_capture_hc_sr04/main/CMakeLists.txt +++ b/examples/peripherals/timer_group/gptimer_capture_hc_sr04/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "gptimer_capture_hc_sr04.c" + PRIV_REQUIRES esp_driver_gptimer esp_driver_gpio INCLUDE_DIRS ".") diff --git a/examples/peripherals/timer_group/wiegand_interface/CMakeLists.txt b/examples/peripherals/timer_group/wiegand_interface/CMakeLists.txt index b77b0be2ae..833e2fd829 100644 --- a/examples/peripherals/timer_group/wiegand_interface/CMakeLists.txt +++ b/examples/peripherals/timer_group/wiegand_interface/CMakeLists.txt @@ -2,7 +2,7 @@ # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -set(COMPONENTS main) - include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(wiegand_interface) diff --git a/examples/peripherals/touch_sensor/touch_element/touch_button/CMakeLists.txt b/examples/peripherals/touch_sensor/touch_element/touch_button/CMakeLists.txt index e880462b2e..d014ce55ee 100644 --- a/examples/peripherals/touch_sensor/touch_element/touch_button/CMakeLists.txt +++ b/examples/peripherals/touch_sensor/touch_element/touch_button/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(touch_button) diff --git a/examples/peripherals/touch_sensor/touch_element/touch_element_waterproof/CMakeLists.txt b/examples/peripherals/touch_sensor/touch_element/touch_element_waterproof/CMakeLists.txt index f0c35ea4a1..13aaa7e002 100644 --- a/examples/peripherals/touch_sensor/touch_element/touch_element_waterproof/CMakeLists.txt +++ b/examples/peripherals/touch_sensor/touch_element/touch_element_waterproof/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(touch_element_waterproof) diff --git a/examples/peripherals/touch_sensor/touch_element/touch_elements_combination/CMakeLists.txt b/examples/peripherals/touch_sensor/touch_element/touch_elements_combination/CMakeLists.txt index ef4d02ce81..56d6bc9cfb 100644 --- a/examples/peripherals/touch_sensor/touch_element/touch_elements_combination/CMakeLists.txt +++ b/examples/peripherals/touch_sensor/touch_element/touch_elements_combination/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(touch_elements_combination) diff --git a/examples/peripherals/touch_sensor/touch_element/touch_matrix/CMakeLists.txt b/examples/peripherals/touch_sensor/touch_element/touch_matrix/CMakeLists.txt index e678e38955..c23a8dc5dd 100644 --- a/examples/peripherals/touch_sensor/touch_element/touch_matrix/CMakeLists.txt +++ b/examples/peripherals/touch_sensor/touch_element/touch_matrix/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(touch_matrix) diff --git a/examples/peripherals/touch_sensor/touch_element/touch_slider/CMakeLists.txt b/examples/peripherals/touch_sensor/touch_element/touch_slider/CMakeLists.txt index c6c0341c9e..8ee31d1316 100644 --- a/examples/peripherals/touch_sensor/touch_element/touch_slider/CMakeLists.txt +++ b/examples/peripherals/touch_sensor/touch_element/touch_slider/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(touch_slider) diff --git a/examples/peripherals/touch_sensor/touch_sens_basic/CMakeLists.txt b/examples/peripherals/touch_sensor/touch_sens_basic/CMakeLists.txt index dc484f27e8..0723c35f78 100644 --- a/examples/peripherals/touch_sensor/touch_sens_basic/CMakeLists.txt +++ b/examples/peripherals/touch_sensor/touch_sens_basic/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(touch_sens_example) diff --git a/examples/peripherals/touch_sensor/touch_sensor_v1/touch_pad_interrupt/CMakeLists.txt b/examples/peripherals/touch_sensor/touch_sensor_v1/touch_pad_interrupt/CMakeLists.txt index c7504c7d03..13f81188a6 100644 --- a/examples/peripherals/touch_sensor/touch_sensor_v1/touch_pad_interrupt/CMakeLists.txt +++ b/examples/peripherals/touch_sensor/touch_sensor_v1/touch_pad_interrupt/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(touch_pad_interrupt) diff --git a/examples/peripherals/touch_sensor/touch_sensor_v1/touch_pad_interrupt/main/CMakeLists.txt b/examples/peripherals/touch_sensor/touch_sensor_v1/touch_pad_interrupt/main/CMakeLists.txt index 94fac9872e..f847eb386a 100644 --- a/examples/peripherals/touch_sensor/touch_sensor_v1/touch_pad_interrupt/main/CMakeLists.txt +++ b/examples/peripherals/touch_sensor/touch_sensor_v1/touch_pad_interrupt/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "tp_interrupt_main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES driver + INCLUDE_DIRS ".") diff --git a/examples/peripherals/touch_sensor/touch_sensor_v1/touch_pad_read/CMakeLists.txt b/examples/peripherals/touch_sensor/touch_sensor_v1/touch_pad_read/CMakeLists.txt index 9baf66a8bb..ad694528d1 100644 --- a/examples/peripherals/touch_sensor/touch_sensor_v1/touch_pad_read/CMakeLists.txt +++ b/examples/peripherals/touch_sensor/touch_sensor_v1/touch_pad_read/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(touch_pad_read) diff --git a/examples/peripherals/touch_sensor/touch_sensor_v1/touch_pad_read/main/CMakeLists.txt b/examples/peripherals/touch_sensor/touch_sensor_v1/touch_pad_read/main/CMakeLists.txt index 2b9a209ec4..80aca5a15e 100644 --- a/examples/peripherals/touch_sensor/touch_sensor_v1/touch_pad_read/main/CMakeLists.txt +++ b/examples/peripherals/touch_sensor/touch_sensor_v1/touch_pad_read/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "tp_read_main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES driver + INCLUDE_DIRS ".") diff --git a/examples/peripherals/twai/twai_alert_and_recovery/CMakeLists.txt b/examples/peripherals/twai/twai_alert_and_recovery/CMakeLists.txt index 70c8d3ece7..e3213669f4 100644 --- a/examples/peripherals/twai/twai_alert_and_recovery/CMakeLists.txt +++ b/examples/peripherals/twai/twai_alert_and_recovery/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(can_alert_and_recovery_example) diff --git a/examples/peripherals/twai/twai_alert_and_recovery/main/CMakeLists.txt b/examples/peripherals/twai/twai_alert_and_recovery/main/CMakeLists.txt index 2e9a791fea..b800800bf1 100644 --- a/examples/peripherals/twai/twai_alert_and_recovery/main/CMakeLists.txt +++ b/examples/peripherals/twai/twai_alert_and_recovery/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "twai_alert_and_recovery_example_main.c" + REQUIRES driver INCLUDE_DIRS ".") diff --git a/examples/peripherals/twai/twai_network/twai_network_listen_only/CMakeLists.txt b/examples/peripherals/twai/twai_network/twai_network_listen_only/CMakeLists.txt index 8fdb41aca2..f5b56fa7ff 100644 --- a/examples/peripherals/twai/twai_network/twai_network_listen_only/CMakeLists.txt +++ b/examples/peripherals/twai/twai_network/twai_network_listen_only/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(twai_network_listen_only) diff --git a/examples/peripherals/twai/twai_network/twai_network_listen_only/main/CMakeLists.txt b/examples/peripherals/twai/twai_network/twai_network_listen_only/main/CMakeLists.txt index e26450a577..9e924d4b1a 100644 --- a/examples/peripherals/twai/twai_network/twai_network_listen_only/main/CMakeLists.txt +++ b/examples/peripherals/twai/twai_network/twai_network_listen_only/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "twai_network_example_listen_only_main.c" + REQUIRES driver INCLUDE_DIRS ".") diff --git a/examples/peripherals/twai/twai_network/twai_network_master/CMakeLists.txt b/examples/peripherals/twai/twai_network/twai_network_master/CMakeLists.txt index 01bc1c86da..2cfde1c6f9 100644 --- a/examples/peripherals/twai/twai_network/twai_network_master/CMakeLists.txt +++ b/examples/peripherals/twai/twai_network/twai_network_master/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(twai_network_master) diff --git a/examples/peripherals/twai/twai_network/twai_network_master/main/CMakeLists.txt b/examples/peripherals/twai/twai_network/twai_network_master/main/CMakeLists.txt index 112b3ca1b4..0fd5bdf859 100644 --- a/examples/peripherals/twai/twai_network/twai_network_master/main/CMakeLists.txt +++ b/examples/peripherals/twai/twai_network/twai_network_master/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "twai_network_example_master_main.c" + REQUIRES driver INCLUDE_DIRS ".") diff --git a/examples/peripherals/twai/twai_network/twai_network_slave/CMakeLists.txt b/examples/peripherals/twai/twai_network/twai_network_slave/CMakeLists.txt index 9b8d3049cc..dd8dec0f26 100644 --- a/examples/peripherals/twai/twai_network/twai_network_slave/CMakeLists.txt +++ b/examples/peripherals/twai/twai_network/twai_network_slave/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(twai_network_slave) diff --git a/examples/peripherals/twai/twai_network/twai_network_slave/main/CMakeLists.txt b/examples/peripherals/twai/twai_network/twai_network_slave/main/CMakeLists.txt index 84241dd1d3..5220b9c8ff 100644 --- a/examples/peripherals/twai/twai_network/twai_network_slave/main/CMakeLists.txt +++ b/examples/peripherals/twai/twai_network/twai_network_slave/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "twai_network_example_slave_main.c" + REQUIRES driver INCLUDE_DIRS ".") diff --git a/examples/peripherals/twai/twai_self_test/CMakeLists.txt b/examples/peripherals/twai/twai_self_test/CMakeLists.txt index 6c53fb45d2..1eb3683c9c 100644 --- a/examples/peripherals/twai/twai_self_test/CMakeLists.txt +++ b/examples/peripherals/twai/twai_self_test/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(twai_self_test_example) diff --git a/examples/peripherals/twai/twai_self_test/main/CMakeLists.txt b/examples/peripherals/twai/twai_self_test/main/CMakeLists.txt index dcf7bf7fbf..a1d798b3b4 100644 --- a/examples/peripherals/twai/twai_self_test/main/CMakeLists.txt +++ b/examples/peripherals/twai/twai_self_test/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "twai_self_test_example_main.c" + REQUIRES driver INCLUDE_DIRS ".") diff --git a/examples/peripherals/uart/nmea0183_parser/CMakeLists.txt b/examples/peripherals/uart/nmea0183_parser/CMakeLists.txt index e0d59ea09a..e49067d65b 100644 --- a/examples/peripherals/uart/nmea0183_parser/CMakeLists.txt +++ b/examples/peripherals/uart/nmea0183_parser/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(nmea_parser) diff --git a/examples/peripherals/uart/nmea0183_parser/main/CMakeLists.txt b/examples/peripherals/uart/nmea0183_parser/main/CMakeLists.txt index 25ef324dd8..1fc343aeaf 100644 --- a/examples/peripherals/uart/nmea0183_parser/main/CMakeLists.txt +++ b/examples/peripherals/uart/nmea0183_parser/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "nmea_parser_example_main.c" "nmea_parser.c" + REQUIRES esp_event esp_driver_uart INCLUDE_DIRS ".") diff --git a/examples/peripherals/uart/uart_async_rxtxtasks/CMakeLists.txt b/examples/peripherals/uart/uart_async_rxtxtasks/CMakeLists.txt index 211ab31ad9..95eef61c93 100644 --- a/examples/peripherals/uart/uart_async_rxtxtasks/CMakeLists.txt +++ b/examples/peripherals/uart/uart_async_rxtxtasks/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(uart_async_rxtxtasks) diff --git a/examples/peripherals/uart/uart_async_rxtxtasks/main/CMakeLists.txt b/examples/peripherals/uart/uart_async_rxtxtasks/main/CMakeLists.txt index 30e774e666..3d69195b66 100644 --- a/examples/peripherals/uart/uart_async_rxtxtasks/main/CMakeLists.txt +++ b/examples/peripherals/uart/uart_async_rxtxtasks/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "uart_async_rxtxtasks_main.c" + REQUIRES esp_driver_uart esp_driver_gpio INCLUDE_DIRS ".") diff --git a/examples/peripherals/uart/uart_echo/CMakeLists.txt b/examples/peripherals/uart/uart_echo/CMakeLists.txt index 097c398e7d..10d5641671 100644 --- a/examples/peripherals/uart/uart_echo/CMakeLists.txt +++ b/examples/peripherals/uart/uart_echo/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(uart_echo) diff --git a/examples/peripherals/uart/uart_echo/main/CMakeLists.txt b/examples/peripherals/uart/uart_echo/main/CMakeLists.txt index a25733646b..59e6e34083 100644 --- a/examples/peripherals/uart/uart_echo/main/CMakeLists.txt +++ b/examples/peripherals/uart/uart_echo/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "uart_echo_example_main.c" + REQUIRES esp_driver_uart esp_driver_gpio INCLUDE_DIRS ".") diff --git a/examples/peripherals/uart/uart_echo_rs485/CMakeLists.txt b/examples/peripherals/uart/uart_echo_rs485/CMakeLists.txt index 53658e678b..1a6dc26fc4 100644 --- a/examples/peripherals/uart/uart_echo_rs485/CMakeLists.txt +++ b/examples/peripherals/uart/uart_echo_rs485/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(echo_rs485) diff --git a/examples/peripherals/uart/uart_echo_rs485/main/CMakeLists.txt b/examples/peripherals/uart/uart_echo_rs485/main/CMakeLists.txt index d6c0cf5f5a..c068ab1f59 100644 --- a/examples/peripherals/uart/uart_echo_rs485/main/CMakeLists.txt +++ b/examples/peripherals/uart/uart_echo_rs485/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "rs485_example.c" + REQUIRES nvs_flash esp_driver_uart INCLUDE_DIRS ".") diff --git a/examples/peripherals/uart/uart_events/CMakeLists.txt b/examples/peripherals/uart/uart_events/CMakeLists.txt index 4a8529ec94..30358a8ba6 100644 --- a/examples/peripherals/uart/uart_events/CMakeLists.txt +++ b/examples/peripherals/uart/uart_events/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(uart_events) diff --git a/examples/peripherals/uart/uart_events/main/CMakeLists.txt b/examples/peripherals/uart/uart_events/main/CMakeLists.txt index 18f72d682b..02cc4ca3fa 100644 --- a/examples/peripherals/uart/uart_events/main/CMakeLists.txt +++ b/examples/peripherals/uart/uart_events/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "uart_events_example_main.c" + REQUIRES esp_driver_uart INCLUDE_DIRS ".") diff --git a/examples/peripherals/uart/uart_repl/CMakeLists.txt b/examples/peripherals/uart/uart_repl/CMakeLists.txt index 49babbbacd..a01755f886 100644 --- a/examples/peripherals/uart/uart_repl/CMakeLists.txt +++ b/examples/peripherals/uart/uart_repl/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(uart_repl) diff --git a/examples/peripherals/uart/uart_repl/main/CMakeLists.txt b/examples/peripherals/uart/uart_repl/main/CMakeLists.txt index be3f1fa35a..e5ecb5fecc 100644 --- a/examples/peripherals/uart/uart_repl/main/CMakeLists.txt +++ b/examples/peripherals/uart/uart_repl/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "uart_repl_example_main.c" + REQUIRES esp_driver_uart esp_driver_gpio console INCLUDE_DIRS ".") diff --git a/examples/peripherals/uart/uart_select/CMakeLists.txt b/examples/peripherals/uart/uart_select/CMakeLists.txt index 87b744ecc2..73bcb41538 100644 --- a/examples/peripherals/uart/uart_select/CMakeLists.txt +++ b/examples/peripherals/uart/uart_select/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(uart_select) diff --git a/examples/peripherals/uart/uart_select/main/CMakeLists.txt b/examples/peripherals/uart/uart_select/main/CMakeLists.txt index e30ac8b036..4ed74585b8 100644 --- a/examples/peripherals/uart/uart_select/main/CMakeLists.txt +++ b/examples/peripherals/uart/uart_select/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "uart_select_example_main.c" + REQUIRES esp_driver_uart vfs INCLUDE_DIRS ".") diff --git a/examples/peripherals/usb/device/tusb_composite_msc_serialdevice/CMakeLists.txt b/examples/peripherals/usb/device/tusb_composite_msc_serialdevice/CMakeLists.txt index 9cfe2365c2..ac369a25f3 100644 --- a/examples/peripherals/usb/device/tusb_composite_msc_serialdevice/CMakeLists.txt +++ b/examples/peripherals/usb/device/tusb_composite_msc_serialdevice/CMakeLists.txt @@ -5,7 +5,7 @@ cmake_minimum_required(VERSION 3.16) add_compile_options(-w) # Turn off warnings until esp_tinyusb is updated IEC-86 -# "Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(tusb_composite) diff --git a/examples/peripherals/usb/device/tusb_console/CMakeLists.txt b/examples/peripherals/usb/device/tusb_console/CMakeLists.txt index 261df3fb6e..c8353934e9 100644 --- a/examples/peripherals/usb/device/tusb_console/CMakeLists.txt +++ b/examples/peripherals/usb/device/tusb_console/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16) add_compile_options(-w) # Turn off warnings until esp_tinyusb is updated IEC-86 -# "Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(tusb_console) diff --git a/examples/peripherals/usb/device/tusb_hid/CMakeLists.txt b/examples/peripherals/usb/device/tusb_hid/CMakeLists.txt index 7ca5ffba94..258a4dcee9 100644 --- a/examples/peripherals/usb/device/tusb_hid/CMakeLists.txt +++ b/examples/peripherals/usb/device/tusb_hid/CMakeLists.txt @@ -4,7 +4,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -# "Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(tusb_hid) diff --git a/examples/peripherals/usb/device/tusb_midi/CMakeLists.txt b/examples/peripherals/usb/device/tusb_midi/CMakeLists.txt index 0cf190b786..91e90baafd 100644 --- a/examples/peripherals/usb/device/tusb_midi/CMakeLists.txt +++ b/examples/peripherals/usb/device/tusb_midi/CMakeLists.txt @@ -2,7 +2,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -# "Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(tusb_midi) diff --git a/examples/peripherals/usb/device/tusb_msc/CMakeLists.txt b/examples/peripherals/usb/device/tusb_msc/CMakeLists.txt index f5696c5231..0863d42364 100644 --- a/examples/peripherals/usb/device/tusb_msc/CMakeLists.txt +++ b/examples/peripherals/usb/device/tusb_msc/CMakeLists.txt @@ -4,7 +4,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -# "Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(tusb_msc) diff --git a/examples/peripherals/usb/device/tusb_ncm/CMakeLists.txt b/examples/peripherals/usb/device/tusb_ncm/CMakeLists.txt index 4b7716256d..9772549e64 100644 --- a/examples/peripherals/usb/device/tusb_ncm/CMakeLists.txt +++ b/examples/peripherals/usb/device/tusb_ncm/CMakeLists.txt @@ -2,7 +2,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -# "Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(tusb_ncm) diff --git a/examples/peripherals/usb/device/tusb_serial_device/CMakeLists.txt b/examples/peripherals/usb/device/tusb_serial_device/CMakeLists.txt index 319eb01822..c2897f7222 100644 --- a/examples/peripherals/usb/device/tusb_serial_device/CMakeLists.txt +++ b/examples/peripherals/usb/device/tusb_serial_device/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16) add_compile_options(-w) # Turn off warnings until esp_tinyusb is updated IEC-86 -# "Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(tusb_serial_device) diff --git a/examples/peripherals/usb/host/cdc/cdc_acm_host/CMakeLists.txt b/examples/peripherals/usb/host/cdc/cdc_acm_host/CMakeLists.txt index 8c87d66a05..dd45c278fd 100644 --- a/examples/peripherals/usb/host/cdc/cdc_acm_host/CMakeLists.txt +++ b/examples/peripherals/usb/host/cdc/cdc_acm_host/CMakeLists.txt @@ -4,7 +4,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -# "Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(cdc_acm_host) diff --git a/examples/peripherals/usb/host/cdc/cdc_acm_vcp/CMakeLists.txt b/examples/peripherals/usb/host/cdc/cdc_acm_vcp/CMakeLists.txt index 25ae86a6d1..a4d34e3f9e 100644 --- a/examples/peripherals/usb/host/cdc/cdc_acm_vcp/CMakeLists.txt +++ b/examples/peripherals/usb/host/cdc/cdc_acm_vcp/CMakeLists.txt @@ -4,7 +4,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -# "Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(cdc_acm_vcp) diff --git a/examples/peripherals/usb/host/hid/CMakeLists.txt b/examples/peripherals/usb/host/hid/CMakeLists.txt index 8539d7fc08..ad1d49fc1d 100644 --- a/examples/peripherals/usb/host/hid/CMakeLists.txt +++ b/examples/peripherals/usb/host/hid/CMakeLists.txt @@ -2,9 +2,9 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.5) -# "Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) get_filename_component(ProjectId ${CMAKE_CURRENT_LIST_DIR} NAME) string(REPLACE " " "_" ProjectId ${ProjectId}) project(${ProjectId}) diff --git a/examples/peripherals/usb/host/msc/CMakeLists.txt b/examples/peripherals/usb/host/msc/CMakeLists.txt index 6539095888..f00f0d98fa 100644 --- a/examples/peripherals/usb/host/msc/CMakeLists.txt +++ b/examples/peripherals/usb/host/msc/CMakeLists.txt @@ -2,7 +2,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -# "Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(usb-msc) diff --git a/examples/peripherals/usb/host/usb_host_lib/CMakeLists.txt b/examples/peripherals/usb/host/usb_host_lib/CMakeLists.txt index 7ec0dec360..153b20d5ff 100644 --- a/examples/peripherals/usb/host/usb_host_lib/CMakeLists.txt +++ b/examples/peripherals/usb/host/usb_host_lib/CMakeLists.txt @@ -2,7 +2,7 @@ # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -# "Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(usb_host_lib_example) diff --git a/examples/peripherals/usb/host/uvc/CMakeLists.txt b/examples/peripherals/usb/host/uvc/CMakeLists.txt index 71318b7ecb..b54c6c14f7 100644 --- a/examples/peripherals/usb/host/uvc/CMakeLists.txt +++ b/examples/peripherals/usb/host/uvc/CMakeLists.txt @@ -2,7 +2,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -# "Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(usb-uvc) diff --git a/examples/peripherals/usb_serial_jtag/usb_serial_jtag_echo/CMakeLists.txt b/examples/peripherals/usb_serial_jtag/usb_serial_jtag_echo/CMakeLists.txt index 3b5cf5be01..f66c9f3e91 100644 --- a/examples/peripherals/usb_serial_jtag/usb_serial_jtag_echo/CMakeLists.txt +++ b/examples/peripherals/usb_serial_jtag/usb_serial_jtag_echo/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(usb_serial_jtag_echo) diff --git a/examples/peripherals/usb_serial_jtag/usb_serial_jtag_echo/main/CMakeLists.txt b/examples/peripherals/usb_serial_jtag/usb_serial_jtag_echo/main/CMakeLists.txt index 5134a91080..9f10bb9535 100644 --- a/examples/peripherals/usb_serial_jtag/usb_serial_jtag_echo/main/CMakeLists.txt +++ b/examples/peripherals/usb_serial_jtag/usb_serial_jtag_echo/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "usb_serial_echo_main.c" + PRIV_REQUIRES esp_driver_usb_serial_jtag INCLUDE_DIRS ".") diff --git a/examples/phy/antenna/CMakeLists.txt b/examples/phy/antenna/CMakeLists.txt index 2e9e876a73..361e25ce29 100644 --- a/examples/phy/antenna/CMakeLists.txt +++ b/examples/phy/antenna/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(wifi_antenna) diff --git a/examples/phy/cert_test/CMakeLists.txt b/examples/phy/cert_test/CMakeLists.txt index c34a1147cd..4c83bde521 100644 --- a/examples/phy/cert_test/CMakeLists.txt +++ b/examples/phy/cert_test/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(cert_test) diff --git a/examples/phy/cert_test/main/CMakeLists.txt b/examples/phy/cert_test/main/CMakeLists.txt index 4daa822628..34ce19d25e 100644 --- a/examples/phy/cert_test/main/CMakeLists.txt +++ b/examples/phy/cert_test/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "cert_test.c" "cmd_phy.c" + PRIV_REQUIRES bt INCLUDE_DIRS ".") diff --git a/examples/protocols/esp_http_client/CMakeLists.txt b/examples/protocols/esp_http_client/CMakeLists.txt index 0715448e56..8373d220c7 100644 --- a/examples/protocols/esp_http_client/CMakeLists.txt +++ b/examples/protocols/esp_http_client/CMakeLists.txt @@ -2,10 +2,8 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -if("${IDF_TARGET}" STREQUAL "linux") - set(COMPONENTS main) -endif() - include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(esp_http_client_example) diff --git a/examples/protocols/esp_http_client/main/CMakeLists.txt b/examples/protocols/esp_http_client/main/CMakeLists.txt index bfee9f9c9e..aa7d874d31 100644 --- a/examples/protocols/esp_http_client/main/CMakeLists.txt +++ b/examples/protocols/esp_http_client/main/CMakeLists.txt @@ -1,14 +1,14 @@ # Embed the server root certificate into the final binary # # (If this was a component, we would set COMPONENT_EMBED_TXTFILES here.) -set(requires "") +set(requires esp-tls nvs_flash esp_event esp_netif esp_http_client) idf_build_get_property(target IDF_TARGET) if(${target} STREQUAL "linux") - list(APPEND requires esp_stubs esp_event esp-tls esp_http_client protocol_examples_common nvs_flash) + list(APPEND requires esp_stubs protocol_examples_common) endif() idf_component_register(SRCS "esp_http_client_example.c" INCLUDE_DIRS "." - REQUIRES ${requires} + PRIV_REQUIRES ${requires} EMBED_TXTFILES howsmyssl_com_root_cert.pem postman_root_cert.pem) diff --git a/examples/protocols/esp_local_ctrl/CMakeLists.txt b/examples/protocols/esp_local_ctrl/CMakeLists.txt index ce8a5b0ba4..1d1674b3e9 100644 --- a/examples/protocols/esp_local_ctrl/CMakeLists.txt +++ b/examples/protocols/esp_local_ctrl/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(esp_local_ctrl) diff --git a/examples/protocols/esp_local_ctrl/main/CMakeLists.txt b/examples/protocols/esp_local_ctrl/main/CMakeLists.txt index cb680e3bce..52195c9ad3 100644 --- a/examples/protocols/esp_local_ctrl/main/CMakeLists.txt +++ b/examples/protocols/esp_local_ctrl/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "app_main.c" "esp_local_ctrl_service.c" INCLUDE_DIRS "." + PRIV_REQUIRES esp_local_ctrl nvs_flash EMBED_TXTFILES "certs/servercert.pem" "certs/prvtkey.pem") diff --git a/examples/protocols/http_request/CMakeLists.txt b/examples/protocols/http_request/CMakeLists.txt index 428aa223d1..4b34cec71e 100644 --- a/examples/protocols/http_request/CMakeLists.txt +++ b/examples/protocols/http_request/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(http_request) diff --git a/examples/protocols/http_server/advanced_tests/CMakeLists.txt b/examples/protocols/http_server/advanced_tests/CMakeLists.txt index ced9a1e677..d02df748fd 100644 --- a/examples/protocols/http_server/advanced_tests/CMakeLists.txt +++ b/examples/protocols/http_server/advanced_tests/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(tests) diff --git a/examples/protocols/http_server/advanced_tests/main/CMakeLists.txt b/examples/protocols/http_server/advanced_tests/main/CMakeLists.txt index dbb0d54046..6ba46d02d0 100644 --- a/examples/protocols/http_server/advanced_tests/main/CMakeLists.txt +++ b/examples/protocols/http_server/advanced_tests/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "main.c" "tests.c" + PRIV_REQUIRES esp_http_server esp_wifi nvs_flash esp_eth INCLUDE_DIRS "." "include") diff --git a/examples/protocols/http_server/async_handlers/CMakeLists.txt b/examples/protocols/http_server/async_handlers/CMakeLists.txt index 3ada908f26..65541b8092 100644 --- a/examples/protocols/http_server/async_handlers/CMakeLists.txt +++ b/examples/protocols/http_server/async_handlers/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(simple) diff --git a/examples/protocols/http_server/async_handlers/main/CMakeLists.txt b/examples/protocols/http_server/async_handlers/main/CMakeLists.txt index cf2c455cb5..8c20d89d32 100644 --- a/examples/protocols/http_server/async_handlers/main/CMakeLists.txt +++ b/examples/protocols/http_server/async_handlers/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "main.c" + PRIV_REQUIRES esp-tls esp_wifi nvs_flash esp_eth esp_http_server INCLUDE_DIRS ".") diff --git a/examples/protocols/http_server/captive_portal/CMakeLists.txt b/examples/protocols/http_server/captive_portal/CMakeLists.txt index b9f3f31f6a..eaf53d5ab6 100644 --- a/examples/protocols/http_server/captive_portal/CMakeLists.txt +++ b/examples/protocols/http_server/captive_portal/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(captive_portal) diff --git a/examples/protocols/http_server/captive_portal/main/CMakeLists.txt b/examples/protocols/http_server/captive_portal/main/CMakeLists.txt index f103a236d6..c1e55e63f9 100644 --- a/examples/protocols/http_server/captive_portal/main/CMakeLists.txt +++ b/examples/protocols/http_server/captive_portal/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS main.c + PRIV_REQUIRES esp_event nvs_flash esp_wifi esp_http_server dns_server EMBED_FILES root.html) diff --git a/examples/protocols/http_server/file_serving/CMakeLists.txt b/examples/protocols/http_server/file_serving/CMakeLists.txt index b4edc23832..7b13fa6a2b 100644 --- a/examples/protocols/http_server/file_serving/CMakeLists.txt +++ b/examples/protocols/http_server/file_serving/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(file_server) diff --git a/examples/protocols/http_server/file_serving/main/CMakeLists.txt b/examples/protocols/http_server/file_serving/main/CMakeLists.txt index 3cd37d278b..97f18ae334 100644 --- a/examples/protocols/http_server/file_serving/main/CMakeLists.txt +++ b/examples/protocols/http_server/file_serving/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "main.c" "file_server.c" "mount.c" INCLUDE_DIRS "." + PRIV_REQUIRES fatfs esp_event vfs esp_netif nvs_flash spiffs esp_http_server EMBED_FILES "favicon.ico" "upload_script.html") diff --git a/examples/protocols/http_server/persistent_sockets/CMakeLists.txt b/examples/protocols/http_server/persistent_sockets/CMakeLists.txt index c2f23bebcd..4ca16f8537 100644 --- a/examples/protocols/http_server/persistent_sockets/CMakeLists.txt +++ b/examples/protocols/http_server/persistent_sockets/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(persistent_sockets) diff --git a/examples/protocols/http_server/persistent_sockets/main/CMakeLists.txt b/examples/protocols/http_server/persistent_sockets/main/CMakeLists.txt index cf2c455cb5..d3a16c66ad 100644 --- a/examples/protocols/http_server/persistent_sockets/main/CMakeLists.txt +++ b/examples/protocols/http_server/persistent_sockets/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "main.c" + PRIV_REQUIRES esp_http_server esp_wifi nvs_flash esp_eth INCLUDE_DIRS ".") diff --git a/examples/protocols/http_server/restful_server/CMakeLists.txt b/examples/protocols/http_server/restful_server/CMakeLists.txt index 7d7eaa220c..0ea48face2 100644 --- a/examples/protocols/http_server/restful_server/CMakeLists.txt +++ b/examples/protocols/http_server/restful_server/CMakeLists.txt @@ -2,4 +2,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(restful_server) diff --git a/examples/protocols/http_server/restful_server/main/CMakeLists.txt b/examples/protocols/http_server/restful_server/main/CMakeLists.txt index 0c90965da3..fdc6a82515 100644 --- a/examples/protocols/http_server/restful_server/main/CMakeLists.txt +++ b/examples/protocols/http_server/restful_server/main/CMakeLists.txt @@ -1,5 +1,6 @@ idf_component_register(SRCS "esp_rest_main.c" "rest_server.c" + PRIV_REQUIRES esp_http_server esp_driver_gpio fatfs json spiffs nvs_flash INCLUDE_DIRS ".") if(CONFIG_EXAMPLE_WEB_DEPLOY_SF) diff --git a/examples/protocols/http_server/simple/CMakeLists.txt b/examples/protocols/http_server/simple/CMakeLists.txt index 910296f3b3..5409901953 100644 --- a/examples/protocols/http_server/simple/CMakeLists.txt +++ b/examples/protocols/http_server/simple/CMakeLists.txt @@ -2,4 +2,6 @@ # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(simple) diff --git a/examples/protocols/http_server/simple/main/CMakeLists.txt b/examples/protocols/http_server/simple/main/CMakeLists.txt index 564c3f54f6..0b347b59b4 100644 --- a/examples/protocols/http_server/simple/main/CMakeLists.txt +++ b/examples/protocols/http_server/simple/main/CMakeLists.txt @@ -1,9 +1,9 @@ -set(requires "") +set(requires esp-tls nvs_flash esp_netif esp_http_server esp_wifi esp_eth) idf_build_get_property(target IDF_TARGET) if(${target} STREQUAL "linux") - list(APPEND requires esp_stubs esp-tls esp_http_server protocol_examples_common nvs_flash) + list(APPEND requires esp_stubs protocol_examples_common) endif() idf_component_register(SRCS "main.c" INCLUDE_DIRS "." - REQUIRES ${requires}) + PRIV_REQUIRES ${requires}) diff --git a/examples/protocols/http_server/ws_echo_server/CMakeLists.txt b/examples/protocols/http_server/ws_echo_server/CMakeLists.txt index f2f53ffd02..7aa59efd9f 100644 --- a/examples/protocols/http_server/ws_echo_server/CMakeLists.txt +++ b/examples/protocols/http_server/ws_echo_server/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ws_echo_server) diff --git a/examples/protocols/http_server/ws_echo_server/main/CMakeLists.txt b/examples/protocols/http_server/ws_echo_server/main/CMakeLists.txt index 45de9dcb06..96b07e0041 100644 --- a/examples/protocols/http_server/ws_echo_server/main/CMakeLists.txt +++ b/examples/protocols/http_server/ws_echo_server/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "ws_echo_server.c" + PRIV_REQUIRES esp_http_server esp_wifi nvs_flash esp_eth INCLUDE_DIRS ".") diff --git a/examples/protocols/https_mbedtls/CMakeLists.txt b/examples/protocols/https_mbedtls/CMakeLists.txt index 0233bc37e7..73056d7a43 100644 --- a/examples/protocols/https_mbedtls/CMakeLists.txt +++ b/examples/protocols/https_mbedtls/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(https_mbedtls) diff --git a/examples/protocols/https_request/CMakeLists.txt b/examples/protocols/https_request/CMakeLists.txt index 7222b1adf5..ead3703a31 100644 --- a/examples/protocols/https_request/CMakeLists.txt +++ b/examples/protocols/https_request/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(https_request) diff --git a/examples/protocols/https_request/main/CMakeLists.txt b/examples/protocols/https_request/main/CMakeLists.txt index c3c1ddb0c1..987fbf7baf 100644 --- a/examples/protocols/https_request/main/CMakeLists.txt +++ b/examples/protocols/https_request/main/CMakeLists.txt @@ -3,4 +3,5 @@ # (If this was a component, we would set COMPONENT_EMBED_TXTFILES here.) idf_component_register(SRCS "https_request_example_main.c" "time_sync.c" INCLUDE_DIRS "include" + PRIV_REQUIRES esp-tls esp_wifi esp_timer nvs_flash EMBED_TXTFILES server_root_cert.pem local_server_cert.pem) diff --git a/examples/protocols/https_server/simple/CMakeLists.txt b/examples/protocols/https_server/simple/CMakeLists.txt index 4cd82ede08..6df8104c23 100644 --- a/examples/protocols/https_server/simple/CMakeLists.txt +++ b/examples/protocols/https_server/simple/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(https_server) diff --git a/examples/protocols/https_server/simple/main/CMakeLists.txt b/examples/protocols/https_server/simple/main/CMakeLists.txt index d2da700754..058cd558ac 100644 --- a/examples/protocols/https_server/simple/main/CMakeLists.txt +++ b/examples/protocols/https_server/simple/main/CMakeLists.txt @@ -1,4 +1,5 @@ idf_component_register(SRCS "main.c" INCLUDE_DIRS "." + PRIV_REQUIRES esp_https_server esp_wifi nvs_flash esp_eth EMBED_TXTFILES "certs/servercert.pem" "certs/prvtkey.pem") diff --git a/examples/protocols/https_server/wss_server/CMakeLists.txt b/examples/protocols/https_server/wss_server/CMakeLists.txt index 360d5db779..c9eeb2ef11 100644 --- a/examples/protocols/https_server/wss_server/CMakeLists.txt +++ b/examples/protocols/https_server/wss_server/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(wss_server) diff --git a/examples/protocols/https_server/wss_server/main/CMakeLists.txt b/examples/protocols/https_server/wss_server/main/CMakeLists.txt index 322d41956d..eb67257ab6 100644 --- a/examples/protocols/https_server/wss_server/main/CMakeLists.txt +++ b/examples/protocols/https_server/wss_server/main/CMakeLists.txt @@ -1,4 +1,5 @@ idf_component_register(SRCS "wss_server_example.c" "keep_alive.c" INCLUDE_DIRS "." + PRIV_REQUIRES esp_https_server nvs_flash esp_timer esp_netif esp_eth esp_wifi EMBED_TXTFILES "certs/servercert.pem" "certs/prvtkey.pem") diff --git a/examples/protocols/https_x509_bundle/CMakeLists.txt b/examples/protocols/https_x509_bundle/CMakeLists.txt index b911200e6b..a9269bf028 100644 --- a/examples/protocols/https_x509_bundle/CMakeLists.txt +++ b/examples/protocols/https_x509_bundle/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(https_x509_bundle) diff --git a/examples/protocols/https_x509_bundle/main/CMakeLists.txt b/examples/protocols/https_x509_bundle/main/CMakeLists.txt index 0ec7175376..b7418afbb6 100644 --- a/examples/protocols/https_x509_bundle/main/CMakeLists.txt +++ b/examples/protocols/https_x509_bundle/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "https_x509_bundle_example_main.c" + PRIV_REQUIRES esp-tls esp_wifi nvs_flash INCLUDE_DIRS ".") diff --git a/examples/protocols/icmp_echo/CMakeLists.txt b/examples/protocols/icmp_echo/CMakeLists.txt index c63cf2a829..2d93b2f843 100644 --- a/examples/protocols/icmp_echo/CMakeLists.txt +++ b/examples/protocols/icmp_echo/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(icmp_echo) diff --git a/examples/protocols/l2tap/CMakeLists.txt b/examples/protocols/l2tap/CMakeLists.txt index c978d63444..d6c05f99f4 100644 --- a/examples/protocols/l2tap/CMakeLists.txt +++ b/examples/protocols/l2tap/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(l2tap_example) diff --git a/examples/protocols/modbus/serial/mb_master/CMakeLists.txt b/examples/protocols/modbus/serial/mb_master/CMakeLists.txt index 7bfc34d339..33f66482cc 100644 --- a/examples/protocols/modbus/serial/mb_master/CMakeLists.txt +++ b/examples/protocols/modbus/serial/mb_master/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(modbus_master) diff --git a/examples/protocols/modbus/serial/mb_slave/CMakeLists.txt b/examples/protocols/modbus/serial/mb_slave/CMakeLists.txt index c45d418b46..ff8425cbd1 100644 --- a/examples/protocols/modbus/serial/mb_slave/CMakeLists.txt +++ b/examples/protocols/modbus/serial/mb_slave/CMakeLists.txt @@ -3,5 +3,7 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(modbus_slave) diff --git a/examples/protocols/modbus/tcp/mb_tcp_master/CMakeLists.txt b/examples/protocols/modbus/tcp/mb_tcp_master/CMakeLists.txt index 6364c3599a..386d3b3db3 100644 --- a/examples/protocols/modbus/tcp/mb_tcp_master/CMakeLists.txt +++ b/examples/protocols/modbus/tcp/mb_tcp_master/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(modbus_tcp_master) diff --git a/examples/protocols/modbus/tcp/mb_tcp_slave/CMakeLists.txt b/examples/protocols/modbus/tcp/mb_tcp_slave/CMakeLists.txt index 7af78457dc..d9662f4a53 100644 --- a/examples/protocols/modbus/tcp/mb_tcp_slave/CMakeLists.txt +++ b/examples/protocols/modbus/tcp/mb_tcp_slave/CMakeLists.txt @@ -6,4 +6,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(modbus_tcp_slave) diff --git a/examples/protocols/mqtt/custom_outbox/CMakeLists.txt b/examples/protocols/mqtt/custom_outbox/CMakeLists.txt index 4823b13388..746ab1cb34 100644 --- a/examples/protocols/mqtt/custom_outbox/CMakeLists.txt +++ b/examples/protocols/mqtt/custom_outbox/CMakeLists.txt @@ -3,6 +3,8 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(mqtt_tcp_custom_outbox) # Add custom outbox implementation to mqtt component diff --git a/examples/protocols/mqtt/custom_outbox/main/CMakeLists.txt b/examples/protocols/mqtt/custom_outbox/main/CMakeLists.txt index cb970c8d23..7423b6078f 100644 --- a/examples/protocols/mqtt/custom_outbox/main/CMakeLists.txt +++ b/examples/protocols/mqtt/custom_outbox/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "app_main.c" INCLUDE_DIRS "." + PRIV_REQUIRES mqtt nvs_flash esp_netif ) diff --git a/examples/protocols/mqtt/ssl/CMakeLists.txt b/examples/protocols/mqtt/ssl/CMakeLists.txt index 994f2f2379..699c86d926 100644 --- a/examples/protocols/mqtt/ssl/CMakeLists.txt +++ b/examples/protocols/mqtt/ssl/CMakeLists.txt @@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(mqtt_ssl) target_add_binary_data(mqtt_ssl.elf "main/mqtt_eclipseprojects_io.pem" TEXT) diff --git a/examples/protocols/mqtt/ssl/main/CMakeLists.txt b/examples/protocols/mqtt/ssl/main/CMakeLists.txt index 61fac40e63..d6ca62dc1f 100644 --- a/examples/protocols/mqtt/ssl/main/CMakeLists.txt +++ b/examples/protocols/mqtt/ssl/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "app_main.c" + PRIV_REQUIRES mqtt esp_partition nvs_flash esp_netif app_update INCLUDE_DIRS ".") diff --git a/examples/protocols/mqtt/ssl_ds/CMakeLists.txt b/examples/protocols/mqtt/ssl_ds/CMakeLists.txt index ce04bb08b7..acf7743cb4 100644 --- a/examples/protocols/mqtt/ssl_ds/CMakeLists.txt +++ b/examples/protocols/mqtt/ssl_ds/CMakeLists.txt @@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(mqtt_ssl_ds) # Flash the custom partition named `esp_secure_cert`. diff --git a/examples/protocols/mqtt/ssl_ds/main/CMakeLists.txt b/examples/protocols/mqtt/ssl_ds/main/CMakeLists.txt index 61fac40e63..055d4c563a 100644 --- a/examples/protocols/mqtt/ssl_ds/main/CMakeLists.txt +++ b/examples/protocols/mqtt/ssl_ds/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "app_main.c" + PRIV_REQUIRES mqtt esp_netif INCLUDE_DIRS ".") diff --git a/examples/protocols/mqtt/ssl_mutual_auth/CMakeLists.txt b/examples/protocols/mqtt/ssl_mutual_auth/CMakeLists.txt index fc3d759049..67ec43b371 100644 --- a/examples/protocols/mqtt/ssl_mutual_auth/CMakeLists.txt +++ b/examples/protocols/mqtt/ssl_mutual_auth/CMakeLists.txt @@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(mqtt_ssl_mutual_auth) target_add_binary_data(${CMAKE_PROJECT_NAME}.elf "main/client.crt" TEXT) diff --git a/examples/protocols/mqtt/ssl_mutual_auth/main/CMakeLists.txt b/examples/protocols/mqtt/ssl_mutual_auth/main/CMakeLists.txt index 61fac40e63..31650f39dd 100644 --- a/examples/protocols/mqtt/ssl_mutual_auth/main/CMakeLists.txt +++ b/examples/protocols/mqtt/ssl_mutual_auth/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "app_main.c" + PRIV_REQUIRES mqtt esp_wifi nvs_flash INCLUDE_DIRS ".") diff --git a/examples/protocols/mqtt/ssl_psk/CMakeLists.txt b/examples/protocols/mqtt/ssl_psk/CMakeLists.txt index d9c1a5fe37..d30f796166 100644 --- a/examples/protocols/mqtt/ssl_psk/CMakeLists.txt +++ b/examples/protocols/mqtt/ssl_psk/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(mqtt_ssl_psk) diff --git a/examples/protocols/mqtt/ssl_psk/main/CMakeLists.txt b/examples/protocols/mqtt/ssl_psk/main/CMakeLists.txt index 61fac40e63..31650f39dd 100644 --- a/examples/protocols/mqtt/ssl_psk/main/CMakeLists.txt +++ b/examples/protocols/mqtt/ssl_psk/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "app_main.c" + PRIV_REQUIRES mqtt esp_wifi nvs_flash INCLUDE_DIRS ".") diff --git a/examples/protocols/mqtt/tcp/CMakeLists.txt b/examples/protocols/mqtt/tcp/CMakeLists.txt index d6d9432990..d6f01d8dab 100644 --- a/examples/protocols/mqtt/tcp/CMakeLists.txt +++ b/examples/protocols/mqtt/tcp/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(mqtt_tcp) diff --git a/examples/protocols/mqtt/tcp/main/CMakeLists.txt b/examples/protocols/mqtt/tcp/main/CMakeLists.txt index 61fac40e63..3bf739cf89 100644 --- a/examples/protocols/mqtt/tcp/main/CMakeLists.txt +++ b/examples/protocols/mqtt/tcp/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "app_main.c" + PRIV_REQUIRES mqtt nvs_flash esp_netif INCLUDE_DIRS ".") diff --git a/examples/protocols/mqtt/ws/CMakeLists.txt b/examples/protocols/mqtt/ws/CMakeLists.txt index 475dd9e41e..bc5e2f1099 100644 --- a/examples/protocols/mqtt/ws/CMakeLists.txt +++ b/examples/protocols/mqtt/ws/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(mqtt_websocket) diff --git a/examples/protocols/mqtt/ws/main/CMakeLists.txt b/examples/protocols/mqtt/ws/main/CMakeLists.txt index 61fac40e63..31650f39dd 100644 --- a/examples/protocols/mqtt/ws/main/CMakeLists.txt +++ b/examples/protocols/mqtt/ws/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "app_main.c" + PRIV_REQUIRES mqtt esp_wifi nvs_flash INCLUDE_DIRS ".") diff --git a/examples/protocols/mqtt/wss/CMakeLists.txt b/examples/protocols/mqtt/wss/CMakeLists.txt index 20c1fde634..158bc62ca4 100644 --- a/examples/protocols/mqtt/wss/CMakeLists.txt +++ b/examples/protocols/mqtt/wss/CMakeLists.txt @@ -4,6 +4,8 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(mqtt_websocket_secure) target_add_binary_data(mqtt_websocket_secure.elf "main/mqtt_eclipseprojects_io.pem" TEXT) diff --git a/examples/protocols/mqtt/wss/main/CMakeLists.txt b/examples/protocols/mqtt/wss/main/CMakeLists.txt index 61fac40e63..31650f39dd 100644 --- a/examples/protocols/mqtt/wss/main/CMakeLists.txt +++ b/examples/protocols/mqtt/wss/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "app_main.c" + PRIV_REQUIRES mqtt esp_wifi nvs_flash INCLUDE_DIRS ".") diff --git a/examples/protocols/mqtt5/CMakeLists.txt b/examples/protocols/mqtt5/CMakeLists.txt index 19304b42f0..fe8bdc9cd4 100644 --- a/examples/protocols/mqtt5/CMakeLists.txt +++ b/examples/protocols/mqtt5/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(mqtt5) diff --git a/examples/protocols/mqtt5/main/CMakeLists.txt b/examples/protocols/mqtt5/main/CMakeLists.txt index 61fac40e63..3bf739cf89 100644 --- a/examples/protocols/mqtt5/main/CMakeLists.txt +++ b/examples/protocols/mqtt5/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "app_main.c" + PRIV_REQUIRES mqtt nvs_flash esp_netif INCLUDE_DIRS ".") diff --git a/examples/protocols/smtp_client/CMakeLists.txt b/examples/protocols/smtp_client/CMakeLists.txt index 8ebc873877..77f987d049 100644 --- a/examples/protocols/smtp_client/CMakeLists.txt +++ b/examples/protocols/smtp_client/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(smtp_client) diff --git a/examples/protocols/sntp/CMakeLists.txt b/examples/protocols/sntp/CMakeLists.txt index 62443a677a..3032dafc41 100644 --- a/examples/protocols/sntp/CMakeLists.txt +++ b/examples/protocols/sntp/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(sntp) diff --git a/examples/protocols/sockets/icmpv6_ping/CMakeLists.txt b/examples/protocols/sockets/icmpv6_ping/CMakeLists.txt index 40b7d39e25..ee1fce3115 100644 --- a/examples/protocols/sockets/icmpv6_ping/CMakeLists.txt +++ b/examples/protocols/sockets/icmpv6_ping/CMakeLists.txt @@ -2,5 +2,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(icmpv6_ping) diff --git a/examples/protocols/sockets/non_blocking/CMakeLists.txt b/examples/protocols/sockets/non_blocking/CMakeLists.txt index e6f06b5f08..a8a9e150da 100644 --- a/examples/protocols/sockets/non_blocking/CMakeLists.txt +++ b/examples/protocols/sockets/non_blocking/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(non_blocking_socket) diff --git a/examples/protocols/sockets/tcp_client/CMakeLists.txt b/examples/protocols/sockets/tcp_client/CMakeLists.txt index 425e07bf16..254eb86757 100644 --- a/examples/protocols/sockets/tcp_client/CMakeLists.txt +++ b/examples/protocols/sockets/tcp_client/CMakeLists.txt @@ -2,10 +2,8 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -if("${IDF_TARGET}" STREQUAL "linux") - set(COMPONENTS main) -endif() - include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(tcp_client) diff --git a/examples/protocols/sockets/tcp_client/main/CMakeLists.txt b/examples/protocols/sockets/tcp_client/main/CMakeLists.txt index 5862a63d4a..06695f6362 100644 --- a/examples/protocols/sockets/tcp_client/main/CMakeLists.txt +++ b/examples/protocols/sockets/tcp_client/main/CMakeLists.txt @@ -1,9 +1,5 @@ idf_build_get_property(target IDF_TARGET) -if(${target} STREQUAL "linux") - set(requires esp_event esp_stubs protocol_examples_common nvs_flash) -endif() - if("${CONFIG_EXAMPLE_IPV4}" STREQUAL y) set(tcp_client_ip tcp_client_v4.c) else() @@ -12,4 +8,4 @@ endif() idf_component_register(SRCS "tcp_client_main.c" "${tcp_client_ip}" INCLUDE_DIRS "." - REQUIRES ${requires}) + PRIV_REQUIRES unity nvs_flash esp_netif) diff --git a/examples/protocols/sockets/tcp_client_multi_net/CMakeLists.txt b/examples/protocols/sockets/tcp_client_multi_net/CMakeLists.txt index 2a1c0af636..d192d9c00c 100644 --- a/examples/protocols/sockets/tcp_client_multi_net/CMakeLists.txt +++ b/examples/protocols/sockets/tcp_client_multi_net/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(tcp_client_multiple) diff --git a/examples/protocols/sockets/tcp_server/CMakeLists.txt b/examples/protocols/sockets/tcp_server/CMakeLists.txt index 22ae003fdf..6e63cf1872 100644 --- a/examples/protocols/sockets/tcp_server/CMakeLists.txt +++ b/examples/protocols/sockets/tcp_server/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(tcp_server) diff --git a/examples/protocols/sockets/tcp_transport_client/CMakeLists.txt b/examples/protocols/sockets/tcp_transport_client/CMakeLists.txt index 79462a3ee5..6e1c05a5c9 100644 --- a/examples/protocols/sockets/tcp_transport_client/CMakeLists.txt +++ b/examples/protocols/sockets/tcp_transport_client/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.5) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(tcp_transport_client) diff --git a/examples/protocols/sockets/tcp_transport_client/main/CMakeLists.txt b/examples/protocols/sockets/tcp_transport_client/main/CMakeLists.txt index 1365c27b1e..25b886a08d 100644 --- a/examples/protocols/sockets/tcp_transport_client/main/CMakeLists.txt +++ b/examples/protocols/sockets/tcp_transport_client/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "tcp_transport_client.c" + PRIV_REQUIRES tcp_transport esp_wifi nvs_flash ) diff --git a/examples/protocols/sockets/udp_client/CMakeLists.txt b/examples/protocols/sockets/udp_client/CMakeLists.txt index 2db190c9d1..8613995002 100644 --- a/examples/protocols/sockets/udp_client/CMakeLists.txt +++ b/examples/protocols/sockets/udp_client/CMakeLists.txt @@ -2,9 +2,7 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -if("${IDF_TARGET}" STREQUAL "linux") - set(COMPONENTS main esp_netif lwip protocol_examples_tapif_io startup esp_hw_support esp_system nvs_flash) -endif() - include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(udp_client) diff --git a/examples/protocols/sockets/udp_client/main/CMakeLists.txt b/examples/protocols/sockets/udp_client/main/CMakeLists.txt index 3fa4a07453..e00ec36c56 100644 --- a/examples/protocols/sockets/udp_client/main/CMakeLists.txt +++ b/examples/protocols/sockets/udp_client/main/CMakeLists.txt @@ -1,2 +1,10 @@ +idf_build_get_property(target IDF_TARGET) +set(priv_requires "") + +if(${target} STREQUAL "linux") + list(APPEND priv_requires nvs_flash esp_event esp_netif lwip) +endif() + idf_component_register(SRCS "udp_client.c" + PRIV_REQUIRES ${priv_requires} INCLUDE_DIRS ".") diff --git a/examples/protocols/sockets/udp_multicast/CMakeLists.txt b/examples/protocols/sockets/udp_multicast/CMakeLists.txt index c8d4f163a6..d49e1c427a 100644 --- a/examples/protocols/sockets/udp_multicast/CMakeLists.txt +++ b/examples/protocols/sockets/udp_multicast/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(udp_multicast) diff --git a/examples/protocols/sockets/udp_server/CMakeLists.txt b/examples/protocols/sockets/udp_server/CMakeLists.txt index adc2de9086..2ff67b3929 100644 --- a/examples/protocols/sockets/udp_server/CMakeLists.txt +++ b/examples/protocols/sockets/udp_server/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(udp_server) diff --git a/examples/protocols/static_ip/CMakeLists.txt b/examples/protocols/static_ip/CMakeLists.txt index 5a10468241..5a8ccaf630 100644 --- a/examples/protocols/static_ip/CMakeLists.txt +++ b/examples/protocols/static_ip/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(static_ip) diff --git a/examples/protocols/static_ip/main/CMakeLists.txt b/examples/protocols/static_ip/main/CMakeLists.txt index e9d8891a84..8179ebca19 100644 --- a/examples/protocols/static_ip/main/CMakeLists.txt +++ b/examples/protocols/static_ip/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "static_ip_example_main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES esp_wifi esp_eth nvs_flash + INCLUDE_DIRS ".") diff --git a/examples/provisioning/wifi_prov_mgr/CMakeLists.txt b/examples/provisioning/wifi_prov_mgr/CMakeLists.txt index 17fedd3c5a..92e90a4d4b 100644 --- a/examples/provisioning/wifi_prov_mgr/CMakeLists.txt +++ b/examples/provisioning/wifi_prov_mgr/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(wifi_prov_mgr) diff --git a/examples/provisioning/wifi_prov_mgr/main/CMakeLists.txt b/examples/provisioning/wifi_prov_mgr/main/CMakeLists.txt index 61fac40e63..3b883ba551 100644 --- a/examples/provisioning/wifi_prov_mgr/main/CMakeLists.txt +++ b/examples/provisioning/wifi_prov_mgr/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "app_main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES esp_wifi nvs_flash wifi_provisioning + INCLUDE_DIRS ".") diff --git a/examples/security/flash_encryption/CMakeLists.txt b/examples/security/flash_encryption/CMakeLists.txt index 63038d1dbd..5113cb8eab 100644 --- a/examples/security/flash_encryption/CMakeLists.txt +++ b/examples/security/flash_encryption/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(flash_encryption) diff --git a/examples/security/flash_encryption/main/CMakeLists.txt b/examples/security/flash_encryption/main/CMakeLists.txt index 13c6fc5328..1b358ad0df 100644 --- a/examples/security/flash_encryption/main/CMakeLists.txt +++ b/examples/security/flash_encryption/main/CMakeLists.txt @@ -1,3 +1,5 @@ idf_component_register(SRCS "flash_encrypt_main.c" "flash_encrypt_fatfs.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES vfs nvs_flash spi_flash efuse bootloader_support + fatfs espcoredump nvs_sec_provider + INCLUDE_DIRS ".") diff --git a/examples/security/hmac_soft_jtag/CMakeLists.txt b/examples/security/hmac_soft_jtag/CMakeLists.txt index 143eb6ee54..a4c6d0bc39 100644 --- a/examples/security/hmac_soft_jtag/CMakeLists.txt +++ b/examples/security/hmac_soft_jtag/CMakeLists.txt @@ -5,4 +5,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(hmac_soft_jtag) diff --git a/examples/security/hmac_soft_jtag/main/CMakeLists.txt b/examples/security/hmac_soft_jtag/main/CMakeLists.txt index beb15285a5..8767d118fc 100644 --- a/examples/security/hmac_soft_jtag/main/CMakeLists.txt +++ b/examples/security/hmac_soft_jtag/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "example_main.c" "jtag_commands.c" - PRIV_INCLUDE_DIRS ".") + PRIV_REQUIRES console efuse mbedtls nvs_flash + PRIV_INCLUDE_DIRS ".") diff --git a/examples/security/nvs_encryption_hmac/CMakeLists.txt b/examples/security/nvs_encryption_hmac/CMakeLists.txt index b06d1d05f9..f0c2212a8a 100644 --- a/examples/security/nvs_encryption_hmac/CMakeLists.txt +++ b/examples/security/nvs_encryption_hmac/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(nvs_encryption_hmac) diff --git a/examples/security/nvs_encryption_hmac/main/CMakeLists.txt b/examples/security/nvs_encryption_hmac/main/CMakeLists.txt index 8a9d914e13..f5639600f1 100644 --- a/examples/security/nvs_encryption_hmac/main/CMakeLists.txt +++ b/examples/security/nvs_encryption_hmac/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "main.c" + PRIV_REQUIRES nvs_flash spi_flash nvs_sec_provider INCLUDE_DIRS ".") diff --git a/examples/security/security_features_app/CMakeLists.txt b/examples/security/security_features_app/CMakeLists.txt index 4a35c3aa0f..121c8ab3b1 100644 --- a/examples/security/security_features_app/CMakeLists.txt +++ b/examples/security/security_features_app/CMakeLists.txt @@ -3,6 +3,8 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(security_features_app) target_add_binary_data(${CMAKE_PROJECT_NAME}.elf "${CONFIG_EXAMPLE_SECURE_JTAG_TOKEN_PATH}" TEXT) diff --git a/examples/security/security_features_app/main/CMakeLists.txt b/examples/security/security_features_app/main/CMakeLists.txt index c9b76807b0..6040817b32 100644 --- a/examples/security/security_features_app/main/CMakeLists.txt +++ b/examples/security/security_features_app/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "security_features_app_main.c" INCLUDE_DIRS "." + PRIV_REQUIRES nvs_flash spi_flash efuse bootloader_support nvs_sec_provider REQUIRED_IDF_TARGETS esp32c3) diff --git a/examples/storage/custom_flash_driver/CMakeLists.txt b/examples/storage/custom_flash_driver/CMakeLists.txt index d4408b63c7..7e49042558 100644 --- a/examples/storage/custom_flash_driver/CMakeLists.txt +++ b/examples/storage/custom_flash_driver/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(custom_flash_driver) diff --git a/examples/storage/emmc/CMakeLists.txt b/examples/storage/emmc/CMakeLists.txt index 863c166b8f..d99bd4dd49 100644 --- a/examples/storage/emmc/CMakeLists.txt +++ b/examples/storage/emmc/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(emmc) diff --git a/examples/storage/emmc/main/CMakeLists.txt b/examples/storage/emmc/main/CMakeLists.txt index d62a469c84..0b15d6918b 100644 --- a/examples/storage/emmc/main/CMakeLists.txt +++ b/examples/storage/emmc/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "emmc_example_main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES fatfs + INCLUDE_DIRS ".") diff --git a/examples/storage/fatfs/ext_flash/CMakeLists.txt b/examples/storage/fatfs/ext_flash/CMakeLists.txt index 04aa9b31b6..fa960260a7 100644 --- a/examples/storage/fatfs/ext_flash/CMakeLists.txt +++ b/examples/storage/fatfs/ext_flash/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) -project(fatfs_ext_flash) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) +project(ext_flash_fatfs) diff --git a/examples/storage/fatfs/ext_flash/main/CMakeLists.txt b/examples/storage/fatfs/ext_flash/main/CMakeLists.txt index dea52d1cb4..8b5c288319 100644 --- a/examples/storage/fatfs/ext_flash/main/CMakeLists.txt +++ b/examples/storage/fatfs/ext_flash/main/CMakeLists.txt @@ -1 +1,2 @@ -idf_component_register(SRCS "fatfs_ext_flash_example_main.c") +idf_component_register(SRCS "fatfs_ext_flash_example_main.c" + PRIV_REQUIRES vfs nvs_flash spi_flash fatfs) diff --git a/examples/storage/fatfs/fatfsgen/CMakeLists.txt b/examples/storage/fatfs/fatfsgen/CMakeLists.txt index 0399bf40c5..a98153d8a5 100644 --- a/examples/storage/fatfs/fatfsgen/CMakeLists.txt +++ b/examples/storage/fatfs/fatfsgen/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(fatfs_fatfsgen) diff --git a/examples/storage/fatfs/fatfsgen/main/CMakeLists.txt b/examples/storage/fatfs/fatfsgen/main/CMakeLists.txt index 1b625a3722..0409c6195b 100644 --- a/examples/storage/fatfs/fatfsgen/main/CMakeLists.txt +++ b/examples/storage/fatfs/fatfsgen/main/CMakeLists.txt @@ -1,4 +1,5 @@ idf_component_register(SRCS "fatfsgen_example_main.c" + PRIV_REQUIRES vfs fatfs INCLUDE_DIRS ".") # Create a FATFS image from the contents of the 'fatfs_long_name_image' directory diff --git a/examples/storage/fatfs/fs_operations/CMakeLists.txt b/examples/storage/fatfs/fs_operations/CMakeLists.txt index 2f478de10d..3f55a91edb 100644 --- a/examples/storage/fatfs/fs_operations/CMakeLists.txt +++ b/examples/storage/fatfs/fs_operations/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(fatfs_fs_operations) diff --git a/examples/storage/fatfs/fs_operations/main/CMakeLists.txt b/examples/storage/fatfs/fs_operations/main/CMakeLists.txt index a5ae965fc4..9fec83d610 100644 --- a/examples/storage/fatfs/fs_operations/main/CMakeLists.txt +++ b/examples/storage/fatfs/fs_operations/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "fatfs_fs_operations_example_main.c" + PRIV_REQUIRES vfs fatfs INCLUDE_DIRS ".") diff --git a/examples/storage/fatfs/getting_started/CMakeLists.txt b/examples/storage/fatfs/getting_started/CMakeLists.txt index b595983679..ea3844a406 100644 --- a/examples/storage/fatfs/getting_started/CMakeLists.txt +++ b/examples/storage/fatfs/getting_started/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(fatfs_getting_started) diff --git a/examples/storage/fatfs/getting_started/main/CMakeLists.txt b/examples/storage/fatfs/getting_started/main/CMakeLists.txt index fec5d19cad..ff911f7efa 100644 --- a/examples/storage/fatfs/getting_started/main/CMakeLists.txt +++ b/examples/storage/fatfs/getting_started/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "fatfs_getting_started_main.c" + PRIV_REQUIRES vfs fatfs INCLUDE_DIRS ".") diff --git a/examples/storage/littlefs/CMakeLists.txt b/examples/storage/littlefs/CMakeLists.txt index 63aa76f77e..5ad3d48b81 100644 --- a/examples/storage/littlefs/CMakeLists.txt +++ b/examples/storage/littlefs/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(littlefs_example) diff --git a/examples/storage/nvs_rw_blob/CMakeLists.txt b/examples/storage/nvs_rw_blob/CMakeLists.txt index 3e8653cec5..70c6522baf 100644 --- a/examples/storage/nvs_rw_blob/CMakeLists.txt +++ b/examples/storage/nvs_rw_blob/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(nvs_rw_blob) diff --git a/examples/storage/nvs_rw_blob/main/CMakeLists.txt b/examples/storage/nvs_rw_blob/main/CMakeLists.txt index 13a1b50cee..38281002ae 100644 --- a/examples/storage/nvs_rw_blob/main/CMakeLists.txt +++ b/examples/storage/nvs_rw_blob/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "nvs_blob_example_main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES nvs_flash esp_driver_gpio + INCLUDE_DIRS ".") diff --git a/examples/storage/nvs_rw_value/CMakeLists.txt b/examples/storage/nvs_rw_value/CMakeLists.txt index e4113b6819..2b24db82a1 100644 --- a/examples/storage/nvs_rw_value/CMakeLists.txt +++ b/examples/storage/nvs_rw_value/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(nvs_rw_value) diff --git a/examples/storage/nvs_rw_value/main/CMakeLists.txt b/examples/storage/nvs_rw_value/main/CMakeLists.txt index fdee1d3dca..875f18eb43 100644 --- a/examples/storage/nvs_rw_value/main/CMakeLists.txt +++ b/examples/storage/nvs_rw_value/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "nvs_value_example_main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES nvs_flash + INCLUDE_DIRS ".") diff --git a/examples/storage/nvs_rw_value_cxx/CMakeLists.txt b/examples/storage/nvs_rw_value_cxx/CMakeLists.txt index 2d9bc3fd00..9250955db7 100644 --- a/examples/storage/nvs_rw_value_cxx/CMakeLists.txt +++ b/examples/storage/nvs_rw_value_cxx/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(nvs_rw_value_cxx) diff --git a/examples/storage/nvs_rw_value_cxx/main/CMakeLists.txt b/examples/storage/nvs_rw_value_cxx/main/CMakeLists.txt index 217cab6a7e..8dcde163d1 100644 --- a/examples/storage/nvs_rw_value_cxx/main/CMakeLists.txt +++ b/examples/storage/nvs_rw_value_cxx/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "nvs_value_example_main.cpp" - INCLUDE_DIRS ".") + PRIV_REQUIRES nvs_flash + INCLUDE_DIRS ".") diff --git a/examples/storage/nvsgen/CMakeLists.txt b/examples/storage/nvsgen/CMakeLists.txt index 3bdfd31f78..35c997526e 100644 --- a/examples/storage/nvsgen/CMakeLists.txt +++ b/examples/storage/nvsgen/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(nvsgen) diff --git a/examples/storage/nvsgen/main/CMakeLists.txt b/examples/storage/nvsgen/main/CMakeLists.txt index 6c3be52671..5a9f5d3423 100644 --- a/examples/storage/nvsgen/main/CMakeLists.txt +++ b/examples/storage/nvsgen/main/CMakeLists.txt @@ -1,5 +1,6 @@ idf_component_register(SRCS "nvsgen_example_main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES vfs fatfs nvs_flash + INCLUDE_DIRS ".") # Create a NVS image from the contents of the `nvs_data` CSV file # that fits the partition named 'nvs'. FLASH_IN_PROJECT indicates that diff --git a/examples/storage/partition_api/partition_find/CMakeLists.txt b/examples/storage/partition_api/partition_find/CMakeLists.txt index 8056851090..27f2b62c47 100644 --- a/examples/storage/partition_api/partition_find/CMakeLists.txt +++ b/examples/storage/partition_api/partition_find/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(partition_find) diff --git a/examples/storage/partition_api/partition_mmap/CMakeLists.txt b/examples/storage/partition_api/partition_mmap/CMakeLists.txt index 755bf509f4..4043814e6d 100644 --- a/examples/storage/partition_api/partition_mmap/CMakeLists.txt +++ b/examples/storage/partition_api/partition_mmap/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(partition_mmap) diff --git a/examples/storage/partition_api/partition_ops/CMakeLists.txt b/examples/storage/partition_api/partition_ops/CMakeLists.txt index 76f14ba025..437d340cef 100644 --- a/examples/storage/partition_api/partition_ops/CMakeLists.txt +++ b/examples/storage/partition_api/partition_ops/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(partition_ops) diff --git a/examples/storage/parttool/CMakeLists.txt b/examples/storage/parttool/CMakeLists.txt index 09e75f98c0..517ee8fb26 100644 --- a/examples/storage/parttool/CMakeLists.txt +++ b/examples/storage/parttool/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(parttool) diff --git a/examples/storage/perf_benchmark/CMakeLists.txt b/examples/storage/perf_benchmark/CMakeLists.txt index 58789b1e4b..411c0b13d3 100644 --- a/examples/storage/perf_benchmark/CMakeLists.txt +++ b/examples/storage/perf_benchmark/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(perf_benchmark) diff --git a/examples/storage/perf_benchmark/main/CMakeLists.txt b/examples/storage/perf_benchmark/main/CMakeLists.txt index a8b5c4af55..6060e52d05 100644 --- a/examples/storage/perf_benchmark/main/CMakeLists.txt +++ b/examples/storage/perf_benchmark/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "perf_benchmark_example_main.c" "perf_benchmark_example_tests.c" "perf_benchmark_example_sd_utils.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES fatfs spiffs + INCLUDE_DIRS ".") diff --git a/examples/storage/sd_card/sdmmc/CMakeLists.txt b/examples/storage/sd_card/sdmmc/CMakeLists.txt index d9424b30f4..53b763a1a2 100644 --- a/examples/storage/sd_card/sdmmc/CMakeLists.txt +++ b/examples/storage/sd_card/sdmmc/CMakeLists.txt @@ -3,7 +3,7 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) - -set(COMPONENTS main) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(sd_card) diff --git a/examples/storage/sd_card/sdspi/CMakeLists.txt b/examples/storage/sd_card/sdspi/CMakeLists.txt index e140d48625..a3cb3ed750 100644 --- a/examples/storage/sd_card/sdspi/CMakeLists.txt +++ b/examples/storage/sd_card/sdspi/CMakeLists.txt @@ -2,7 +2,7 @@ # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) -set(COMPONENTS main) - include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(sd_card) diff --git a/examples/storage/semihost_vfs/CMakeLists.txt b/examples/storage/semihost_vfs/CMakeLists.txt index b272f8b36d..741145cd91 100644 --- a/examples/storage/semihost_vfs/CMakeLists.txt +++ b/examples/storage/semihost_vfs/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(semihost_vfs) diff --git a/examples/storage/semihost_vfs/main/CMakeLists.txt b/examples/storage/semihost_vfs/main/CMakeLists.txt index ccb9434eca..ef3c959d13 100644 --- a/examples/storage/semihost_vfs/main/CMakeLists.txt +++ b/examples/storage/semihost_vfs/main/CMakeLists.txt @@ -2,4 +2,5 @@ set(COMPONENT_SRCS) set(COMPONENT_ADD_INCLUDEDIRS ".") idf_component_register(SRCS "semihost_vfs_example_main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES vfs + INCLUDE_DIRS ".") diff --git a/examples/storage/spiffs/CMakeLists.txt b/examples/storage/spiffs/CMakeLists.txt index 2394d29a3f..34645c18dd 100644 --- a/examples/storage/spiffs/CMakeLists.txt +++ b/examples/storage/spiffs/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(spiffs) diff --git a/examples/storage/spiffs/main/CMakeLists.txt b/examples/storage/spiffs/main/CMakeLists.txt index c480915abb..3691dbfceb 100644 --- a/examples/storage/spiffs/main/CMakeLists.txt +++ b/examples/storage/spiffs/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "spiffs_example_main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES spiffs + INCLUDE_DIRS ".") diff --git a/examples/storage/spiffsgen/CMakeLists.txt b/examples/storage/spiffsgen/CMakeLists.txt index 54488e0482..088b0c9593 100644 --- a/examples/storage/spiffsgen/CMakeLists.txt +++ b/examples/storage/spiffsgen/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(spiffsgen) diff --git a/examples/storage/spiffsgen/main/CMakeLists.txt b/examples/storage/spiffsgen/main/CMakeLists.txt index e0aa53dc72..9fdb033fab 100644 --- a/examples/storage/spiffsgen/main/CMakeLists.txt +++ b/examples/storage/spiffsgen/main/CMakeLists.txt @@ -1,5 +1,6 @@ idf_component_register(SRCS "spiffsgen_example_main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES spiffs mbedtls + INCLUDE_DIRS ".") # Create a SPIFFS image from the contents of the 'spiffs_image' directory # that fits the partition named 'storage'. FLASH_IN_PROJECT indicates that diff --git a/examples/storage/wear_levelling/CMakeLists.txt b/examples/storage/wear_levelling/CMakeLists.txt index 6dc560b512..84e880845d 100644 --- a/examples/storage/wear_levelling/CMakeLists.txt +++ b/examples/storage/wear_levelling/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(wear_levelling_example) diff --git a/examples/storage/wear_levelling/main/CMakeLists.txt b/examples/storage/wear_levelling/main/CMakeLists.txt index 8155abc01d..7c89b6b422 100644 --- a/examples/storage/wear_levelling/main/CMakeLists.txt +++ b/examples/storage/wear_levelling/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "wear_levelling_example_main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES vfs fatfs + INCLUDE_DIRS ".") diff --git a/examples/system/app_trace_basic/CMakeLists.txt b/examples/system/app_trace_basic/CMakeLists.txt index 9b4e372f98..7e21f2789b 100644 --- a/examples/system/app_trace_basic/CMakeLists.txt +++ b/examples/system/app_trace_basic/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(app_trace_basic) diff --git a/examples/system/app_trace_basic/main/CMakeLists.txt b/examples/system/app_trace_basic/main/CMakeLists.txt index 8447cd1cd2..0558d62cba 100644 --- a/examples/system/app_trace_basic/main/CMakeLists.txt +++ b/examples/system/app_trace_basic/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "app_trace_basic_example_main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES app_trace + INCLUDE_DIRS ".") diff --git a/examples/system/app_trace_to_plot/CMakeLists.txt b/examples/system/app_trace_to_plot/CMakeLists.txt index 78c3cdb086..655ed87e3a 100644 --- a/examples/system/app_trace_to_plot/CMakeLists.txt +++ b/examples/system/app_trace_to_plot/CMakeLists.txt @@ -5,4 +5,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(app_trace_to_plot) diff --git a/examples/system/app_trace_to_plot/main/CMakeLists.txt b/examples/system/app_trace_to_plot/main/CMakeLists.txt index 94277bd197..d96666ff74 100644 --- a/examples/system/app_trace_to_plot/main/CMakeLists.txt +++ b/examples/system/app_trace_to_plot/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "app_trace_to_plot.c" + PRIV_REQUIRES app_trace INCLUDE_DIRS ".") diff --git a/examples/system/base_mac_address/CMakeLists.txt b/examples/system/base_mac_address/CMakeLists.txt index e1e0af21eb..2558460ef4 100644 --- a/examples/system/base_mac_address/CMakeLists.txt +++ b/examples/system/base_mac_address/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(base_mac_address) diff --git a/examples/system/console/advanced/CMakeLists.txt b/examples/system/console/advanced/CMakeLists.txt index 5247b367e9..dd7c640a01 100644 --- a/examples/system/console/advanced/CMakeLists.txt +++ b/examples/system/console/advanced/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(console) diff --git a/examples/system/console/advanced/main/CMakeLists.txt b/examples/system/console/advanced/main/CMakeLists.txt index 696251c584..f8af67f147 100644 --- a/examples/system/console/advanced/main/CMakeLists.txt +++ b/examples/system/console/advanced/main/CMakeLists.txt @@ -1,2 +1,4 @@ idf_component_register(SRCS "console_example_main.c" "console_settings.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES console esp_driver_uart fatfs esp_driver_usb_serial_jtag + nvs_flash cmd_system cmd_wifi cmd_nvs + INCLUDE_DIRS ".") diff --git a/examples/system/console/basic/CMakeLists.txt b/examples/system/console/basic/CMakeLists.txt index 5247b367e9..dd7c640a01 100644 --- a/examples/system/console/basic/CMakeLists.txt +++ b/examples/system/console/basic/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(console) diff --git a/examples/system/console/basic/main/CMakeLists.txt b/examples/system/console/basic/main/CMakeLists.txt index 6833bf8b62..b13c8f2df7 100644 --- a/examples/system/console/basic/main/CMakeLists.txt +++ b/examples/system/console/basic/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "console_example_main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES fatfs + INCLUDE_DIRS ".") diff --git a/examples/system/deep_sleep/CMakeLists.txt b/examples/system/deep_sleep/CMakeLists.txt index a1e1d59155..06c8f96355 100644 --- a/examples/system/deep_sleep/CMakeLists.txt +++ b/examples/system/deep_sleep/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(deep_sleep) diff --git a/examples/system/deep_sleep/main/CMakeLists.txt b/examples/system/deep_sleep/main/CMakeLists.txt index f6c3a57090..b4a8c428a4 100644 --- a/examples/system/deep_sleep/main/CMakeLists.txt +++ b/examples/system/deep_sleep/main/CMakeLists.txt @@ -2,4 +2,5 @@ idf_component_register(SRCS "deep_sleep_example_main.c" "gpio_wakeup.c" "ext_wakeup.c" "touch_wakeup.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES driver nvs_flash ulp + INCLUDE_DIRS ".") diff --git a/examples/system/deep_sleep_wake_stub/CMakeLists.txt b/examples/system/deep_sleep_wake_stub/CMakeLists.txt index ce31ed4013..7dcf948d44 100644 --- a/examples/system/deep_sleep_wake_stub/CMakeLists.txt +++ b/examples/system/deep_sleep_wake_stub/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(deep_sleep_wake_stub) diff --git a/examples/system/efuse/CMakeLists.txt b/examples/system/efuse/CMakeLists.txt index 990d5fdd07..1ae11a7d56 100644 --- a/examples/system/efuse/CMakeLists.txt +++ b/examples/system/efuse/CMakeLists.txt @@ -3,6 +3,8 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(efuse) idf_component_get_property(esptool_py_dir esptool_py COMPONENT_DIR) diff --git a/examples/system/efuse/main/CMakeLists.txt b/examples/system/efuse/main/CMakeLists.txt index e42d27176e..d0aeb62b0b 100644 --- a/examples/system/efuse/main/CMakeLists.txt +++ b/examples/system/efuse/main/CMakeLists.txt @@ -1,4 +1,9 @@ idf_component_register(SRCS "efuse_main.c" "esp_efuse_custom_table.c" + PRIV_REQUIRES efuse INCLUDE_DIRS "." "include") + +if(CONFIG_SECURE_BOOT OR CONFIG_SECURE_FLASH_ENC_ENABLED OR CONFIG_IDF_TARGET_ESP32C2) + idf_component_optional_requires(PRIVATE bootloader_support) +endif() diff --git a/examples/system/esp_event/default_event_loop/CMakeLists.txt b/examples/system/esp_event/default_event_loop/CMakeLists.txt index 0e6992dba6..4999db722b 100644 --- a/examples/system/esp_event/default_event_loop/CMakeLists.txt +++ b/examples/system/esp_event/default_event_loop/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(default_event_loop) diff --git a/examples/system/esp_event/default_event_loop/main/CMakeLists.txt b/examples/system/esp_event/default_event_loop/main/CMakeLists.txt index cf2c455cb5..b42174e9a5 100644 --- a/examples/system/esp_event/default_event_loop/main/CMakeLists.txt +++ b/examples/system/esp_event/default_event_loop/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES esp_event esp_timer + INCLUDE_DIRS ".") diff --git a/examples/system/esp_event/user_event_loops/CMakeLists.txt b/examples/system/esp_event/user_event_loops/CMakeLists.txt index 70198ad072..c0a96ac7de 100644 --- a/examples/system/esp_event/user_event_loops/CMakeLists.txt +++ b/examples/system/esp_event/user_event_loops/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(user_event_loops) diff --git a/examples/system/esp_event/user_event_loops/main/CMakeLists.txt b/examples/system/esp_event/user_event_loops/main/CMakeLists.txt index cf2c455cb5..b42174e9a5 100644 --- a/examples/system/esp_event/user_event_loops/main/CMakeLists.txt +++ b/examples/system/esp_event/user_event_loops/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES esp_event esp_timer + INCLUDE_DIRS ".") diff --git a/examples/system/esp_timer/CMakeLists.txt b/examples/system/esp_timer/CMakeLists.txt index b4cf7f16f9..368dd6be83 100644 --- a/examples/system/esp_timer/CMakeLists.txt +++ b/examples/system/esp_timer/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(esp_timer_example) diff --git a/examples/system/eventfd/CMakeLists.txt b/examples/system/eventfd/CMakeLists.txt index e144dab4c2..e181143c1b 100644 --- a/examples/system/eventfd/CMakeLists.txt +++ b/examples/system/eventfd/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(eventfd) diff --git a/examples/system/eventfd/main/CMakeLists.txt b/examples/system/eventfd/main/CMakeLists.txt index 52e676a338..cd1b2d1eec 100644 --- a/examples/system/eventfd/main/CMakeLists.txt +++ b/examples/system/eventfd/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "eventfd_example.c" + PRIV_REQUIRES vfs esp_timer esp_driver_gptimer INCLUDE_DIRS ".") diff --git a/examples/system/flash_suspend/CMakeLists.txt b/examples/system/flash_suspend/CMakeLists.txt index 5fccb2707d..bd73fcc1be 100644 --- a/examples/system/flash_suspend/CMakeLists.txt +++ b/examples/system/flash_suspend/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(flash_suspend) diff --git a/examples/system/flash_suspend/main/CMakeLists.txt b/examples/system/flash_suspend/main/CMakeLists.txt index 5d6d0f9979..9b1d9c26c7 100644 --- a/examples/system/flash_suspend/main/CMakeLists.txt +++ b/examples/system/flash_suspend/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "app_main.c" - INCLUDE_DIRS "") + PRIV_REQUIRES esp_driver_gptimer esp_partition nvs_flash spi_flash + INCLUDE_DIRS "") diff --git a/examples/system/freertos/basic_freertos_smp_usage/CMakeLists.txt b/examples/system/freertos/basic_freertos_smp_usage/CMakeLists.txt index 6d220730a2..8bb69dcc52 100644 --- a/examples/system/freertos/basic_freertos_smp_usage/CMakeLists.txt +++ b/examples/system/freertos/basic_freertos_smp_usage/CMakeLists.txt @@ -5,4 +5,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(basic_freertos_smp_usage) diff --git a/examples/system/freertos/real_time_stats/CMakeLists.txt b/examples/system/freertos/real_time_stats/CMakeLists.txt index b5af2f9589..6a5d678d9e 100644 --- a/examples/system/freertos/real_time_stats/CMakeLists.txt +++ b/examples/system/freertos/real_time_stats/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(real_time_stats) diff --git a/examples/system/gdbstub/CMakeLists.txt b/examples/system/gdbstub/CMakeLists.txt index 95fb83d00a..65d364a541 100644 --- a/examples/system/gdbstub/CMakeLists.txt +++ b/examples/system/gdbstub/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(gdbstub) diff --git a/examples/system/gdbstub/main/CMakeLists.txt b/examples/system/gdbstub/main/CMakeLists.txt index b834e836a4..ce45591daf 100644 --- a/examples/system/gdbstub/main/CMakeLists.txt +++ b/examples/system/gdbstub/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "gdbstub_main.c" + PRIV_REQUIRES esp_gdbstub INCLUDE_DIRS "") diff --git a/examples/system/heap_task_tracking/CMakeLists.txt b/examples/system/heap_task_tracking/CMakeLists.txt index 6f1b9a602a..c68b33b49f 100644 --- a/examples/system/heap_task_tracking/CMakeLists.txt +++ b/examples/system/heap_task_tracking/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(heap_task_tracking) diff --git a/examples/system/himem/CMakeLists.txt b/examples/system/himem/CMakeLists.txt index 719272badb..07d68eced7 100644 --- a/examples/system/himem/CMakeLists.txt +++ b/examples/system/himem/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(himem_test) diff --git a/examples/system/himem/main/CMakeLists.txt b/examples/system/himem/main/CMakeLists.txt index 56b7332142..bd89fe638a 100644 --- a/examples/system/himem/main/CMakeLists.txt +++ b/examples/system/himem/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "himem_example_main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES nvs_flash esp_psram + INCLUDE_DIRS ".") diff --git a/examples/system/ipc/ipc_isr/riscv/CMakeLists.txt b/examples/system/ipc/ipc_isr/riscv/CMakeLists.txt index 0bb2e885b9..226c0bd094 100644 --- a/examples/system/ipc/ipc_isr/riscv/CMakeLists.txt +++ b/examples/system/ipc/ipc_isr/riscv/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ipc_isr) diff --git a/examples/system/ipc/ipc_isr/xtensa/CMakeLists.txt b/examples/system/ipc/ipc_isr/xtensa/CMakeLists.txt index 0bb2e885b9..226c0bd094 100644 --- a/examples/system/ipc/ipc_isr/xtensa/CMakeLists.txt +++ b/examples/system/ipc/ipc_isr/xtensa/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ipc_isr) diff --git a/examples/system/light_sleep/CMakeLists.txt b/examples/system/light_sleep/CMakeLists.txt index 500c2162b6..43bb505cff 100644 --- a/examples/system/light_sleep/CMakeLists.txt +++ b/examples/system/light_sleep/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(light_sleep_example) diff --git a/examples/system/light_sleep/main/CMakeLists.txt b/examples/system/light_sleep/main/CMakeLists.txt index f36ab83fd8..13e3828953 100644 --- a/examples/system/light_sleep/main/CMakeLists.txt +++ b/examples/system/light_sleep/main/CMakeLists.txt @@ -1,17 +1,24 @@ +idf_build_get_property(target IDF_TARGET) + set(srcs "light_sleep_example_main.c" "gpio_wakeup.c" "timer_wakeup.c" "uart_wakeup.c") +set(priv_reqs esp_driver_uart esp_driver_gpio esp_timer) + set(TOUCH_ELEMENT_COMPATIBLE_TARGETS "esp32s2" "esp32s3") -if(IDF_TARGET IN_LIST TOUCH_ELEMENT_COMPATIBLE_TARGETS) +if(${target} IN_LIST TOUCH_ELEMENT_COMPATIBLE_TARGETS) list(APPEND srcs "touch_wakeup.c") + list(APPEND priv_reqs touch_element) endif() -if(IDF_TARGET STREQUAL "esp32p4") +if("${target}" STREQUAL "esp32p4") list(APPEND srcs "touch_sens_wakeup.c") + list(APPEND priv_reqs esp_driver_touch_sens) endif() idf_component_register(SRCS ${srcs} + PRIV_REQUIRES ${priv_reqs} INCLUDE_DIRS ".") diff --git a/examples/system/nmi_isr/CMakeLists.txt b/examples/system/nmi_isr/CMakeLists.txt index 32ead19395..066eb1c70b 100644 --- a/examples/system/nmi_isr/CMakeLists.txt +++ b/examples/system/nmi_isr/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(nmi_isr) diff --git a/examples/system/ota/advanced_https_ota/CMakeLists.txt b/examples/system/ota/advanced_https_ota/CMakeLists.txt index f89de5e6b1..0ce2c92350 100644 --- a/examples/system/ota/advanced_https_ota/CMakeLists.txt +++ b/examples/system/ota/advanced_https_ota/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(advanced_https_ota) diff --git a/examples/system/ota/advanced_https_ota/main/CMakeLists.txt b/examples/system/ota/advanced_https_ota/main/CMakeLists.txt index 0e102c7ca2..3cbd2b2ac5 100644 --- a/examples/system/ota/advanced_https_ota/main/CMakeLists.txt +++ b/examples/system/ota/advanced_https_ota/main/CMakeLists.txt @@ -1,5 +1,8 @@ idf_component_register(SRCS "advanced_https_ota_example.c" "ble_helper/bluedroid_gatts.c" "ble_helper/nimble_gatts.c" "ble_helper/ble_api.c" INCLUDE_DIRS "." "./ble_helper/include/" + PRIV_REQUIRES esp_http_client app_update esp_https_ota + nvs_flash esp_netif esp_wifi efuse bt + protocomm # Embed the server root certificate into the final binary EMBED_TXTFILES ${project_dir}/server_certs/ca_cert.pem) diff --git a/examples/system/ota/native_ota_example/CMakeLists.txt b/examples/system/ota/native_ota_example/CMakeLists.txt index 0fcc1e5b00..ae54e33231 100644 --- a/examples/system/ota/native_ota_example/CMakeLists.txt +++ b/examples/system/ota/native_ota_example/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(native_ota) diff --git a/examples/system/ota/native_ota_example/main/CMakeLists.txt b/examples/system/ota/native_ota_example/main/CMakeLists.txt index dea9a5a5ad..f40b686d03 100644 --- a/examples/system/ota/native_ota_example/main/CMakeLists.txt +++ b/examples/system/ota/native_ota_example/main/CMakeLists.txt @@ -2,4 +2,5 @@ idf_build_get_property(project_dir PROJECT_DIR) idf_component_register(SRCS "native_ota_example.c" INCLUDE_DIRS "." + PRIV_REQUIRES esp_http_client app_update nvs_flash esp_driver_gpio esp_netif esp_wifi EMBED_TXTFILES ${project_dir}/server_certs/ca_cert.pem) diff --git a/examples/system/ota/otatool/CMakeLists.txt b/examples/system/ota/otatool/CMakeLists.txt index b9ba446c5b..1923e13cd7 100644 --- a/examples/system/ota/otatool/CMakeLists.txt +++ b/examples/system/ota/otatool/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(otatool) diff --git a/examples/system/ota/pre_encrypted_ota/CMakeLists.txt b/examples/system/ota/pre_encrypted_ota/CMakeLists.txt index df49470c0d..6493215773 100644 --- a/examples/system/ota/pre_encrypted_ota/CMakeLists.txt +++ b/examples/system/ota/pre_encrypted_ota/CMakeLists.txt @@ -5,4 +5,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(pre_encrypted_ota) diff --git a/examples/system/ota/pre_encrypted_ota/main/CMakeLists.txt b/examples/system/ota/pre_encrypted_ota/main/CMakeLists.txt index 600f0c5b1a..8e23bcabd3 100644 --- a/examples/system/ota/pre_encrypted_ota/main/CMakeLists.txt +++ b/examples/system/ota/pre_encrypted_ota/main/CMakeLists.txt @@ -1,6 +1,7 @@ idf_build_get_property(project_dir PROJECT_DIR) idf_component_register(SRCS "pre_encrypted_ota.c" INCLUDE_DIRS "." + PRIV_REQUIRES esp_http_client app_update esp_https_ota nvs_flash esp_netif esp_wifi EMBED_TXTFILES ${project_dir}/server_certs/ca_cert.pem ${project_dir}/rsa_key/private.pem) diff --git a/examples/system/ota/simple_ota_example/CMakeLists.txt b/examples/system/ota/simple_ota_example/CMakeLists.txt index 37106afe8a..8bc4354f21 100644 --- a/examples/system/ota/simple_ota_example/CMakeLists.txt +++ b/examples/system/ota/simple_ota_example/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(simple_ota) diff --git a/examples/system/ota/simple_ota_example/main/CMakeLists.txt b/examples/system/ota/simple_ota_example/main/CMakeLists.txt index f8c5c183cf..8af1e8c069 100644 --- a/examples/system/ota/simple_ota_example/main/CMakeLists.txt +++ b/examples/system/ota/simple_ota_example/main/CMakeLists.txt @@ -2,4 +2,6 @@ idf_build_get_property(project_dir PROJECT_DIR) idf_component_register(SRCS "simple_ota_example.c" INCLUDE_DIRS "." + PRIV_REQUIRES esp_http_client app_update esp_https_ota + esp_netif mbedtls nvs_flash esp_wifi esp_psram EMBED_TXTFILES ${project_dir}/server_certs/ca_cert.pem) diff --git a/examples/system/perfmon/CMakeLists.txt b/examples/system/perfmon/CMakeLists.txt index 436ccaed34..77afff7bd7 100644 --- a/examples/system/perfmon/CMakeLists.txt +++ b/examples/system/perfmon/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(perfmon_example) diff --git a/examples/system/perfmon/main/CMakeLists.txt b/examples/system/perfmon/main/CMakeLists.txt index 50b7732953..69791334d1 100644 --- a/examples/system/perfmon/main/CMakeLists.txt +++ b/examples/system/perfmon/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "perfmon_example_main.c" + PRIV_REQUIRES perfmon esp_timer INCLUDE_DIRS ".") diff --git a/examples/system/pthread/CMakeLists.txt b/examples/system/pthread/CMakeLists.txt index 8604e00f87..dd70ed59cc 100644 --- a/examples/system/pthread/CMakeLists.txt +++ b/examples/system/pthread/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(pthread) diff --git a/examples/system/rt_mqueue/CMakeLists.txt b/examples/system/rt_mqueue/CMakeLists.txt index f02d51120a..e75583d82d 100644 --- a/examples/system/rt_mqueue/CMakeLists.txt +++ b/examples/system/rt_mqueue/CMakeLists.txt @@ -5,4 +5,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(posix_mqueue) diff --git a/examples/system/select/CMakeLists.txt b/examples/system/select/CMakeLists.txt index a73f6f7488..b121051c39 100644 --- a/examples/system/select/CMakeLists.txt +++ b/examples/system/select/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(select) diff --git a/examples/system/select/main/CMakeLists.txt b/examples/system/select/main/CMakeLists.txt index ba7bf5d044..88f5027dc0 100644 --- a/examples/system/select/main/CMakeLists.txt +++ b/examples/system/select/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "select_example.c" + PRIV_REQUIRES esp_driver_uart vfs esp_netif INCLUDE_DIRS ".") diff --git a/examples/system/startup_time/CMakeLists.txt b/examples/system/startup_time/CMakeLists.txt index 18ff72c0ec..19820c2e9d 100644 --- a/examples/system/startup_time/CMakeLists.txt +++ b/examples/system/startup_time/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(startup_time) diff --git a/examples/system/sysview_tracing/CMakeLists.txt b/examples/system/sysview_tracing/CMakeLists.txt index f21a637c30..9a42eed2dc 100644 --- a/examples/system/sysview_tracing/CMakeLists.txt +++ b/examples/system/sysview_tracing/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(sysview_tracing) diff --git a/examples/system/sysview_tracing/main/CMakeLists.txt b/examples/system/sysview_tracing/main/CMakeLists.txt index 0f466b71d6..55b846e1da 100644 --- a/examples/system/sysview_tracing/main/CMakeLists.txt +++ b/examples/system/sysview_tracing/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "sysview_tracing.c" + PRIV_REQUIRES esp_driver_gptimer app_trace INCLUDE_DIRS ".") diff --git a/examples/system/sysview_tracing_heap_log/CMakeLists.txt b/examples/system/sysview_tracing_heap_log/CMakeLists.txt index 42dfb1b0d8..e559fe6739 100644 --- a/examples/system/sysview_tracing_heap_log/CMakeLists.txt +++ b/examples/system/sysview_tracing_heap_log/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(sysview_tracing_heap_log) diff --git a/examples/system/sysview_tracing_heap_log/main/CMakeLists.txt b/examples/system/sysview_tracing_heap_log/main/CMakeLists.txt index 0383353f0a..2573075098 100644 --- a/examples/system/sysview_tracing_heap_log/main/CMakeLists.txt +++ b/examples/system/sysview_tracing_heap_log/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "sysview_heap_log.c" + PRIV_REQUIRES app_trace INCLUDE_DIRS ".") diff --git a/examples/system/task_watchdog/CMakeLists.txt b/examples/system/task_watchdog/CMakeLists.txt index 377833ce65..ed41622719 100644 --- a/examples/system/task_watchdog/CMakeLists.txt +++ b/examples/system/task_watchdog/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(task_watchdog) diff --git a/examples/system/ulp/lp_core/build_system/CMakeLists.txt b/examples/system/ulp/lp_core/build_system/CMakeLists.txt index 7bb7b68de6..0315b618bb 100644 --- a/examples/system/ulp/lp_core/build_system/CMakeLists.txt +++ b/examples/system/ulp/lp_core/build_system/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(lp_core_build_system_example) diff --git a/examples/system/ulp/lp_core/debugging/CMakeLists.txt b/examples/system/ulp/lp_core/debugging/CMakeLists.txt index 126c89064f..277ec06d41 100644 --- a/examples/system/ulp/lp_core/debugging/CMakeLists.txt +++ b/examples/system/ulp/lp_core/debugging/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) list(APPEND SDKCONFIG_DEFAULTS "sdkconfig.defaults") include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(lp_debugging_example) diff --git a/examples/system/ulp/lp_core/gpio/CMakeLists.txt b/examples/system/ulp/lp_core/gpio/CMakeLists.txt index 3c70aeaa8c..9ef203de35 100644 --- a/examples/system/ulp/lp_core/gpio/CMakeLists.txt +++ b/examples/system/ulp/lp_core/gpio/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(lp_core_gpio_example) diff --git a/examples/system/ulp/lp_core/gpio_intr_pulse_counter/CMakeLists.txt b/examples/system/ulp/lp_core/gpio_intr_pulse_counter/CMakeLists.txt index 0d18f968a1..2441cbc358 100644 --- a/examples/system/ulp/lp_core/gpio_intr_pulse_counter/CMakeLists.txt +++ b/examples/system/ulp/lp_core/gpio_intr_pulse_counter/CMakeLists.txt @@ -5,4 +5,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(lp_core_pulse_counter) diff --git a/examples/system/ulp/lp_core/gpio_intr_pulse_counter/main/CMakeLists.txt b/examples/system/ulp/lp_core/gpio_intr_pulse_counter/main/CMakeLists.txt index 79a7104a1f..97188fea92 100644 --- a/examples/system/ulp/lp_core/gpio_intr_pulse_counter/main/CMakeLists.txt +++ b/examples/system/ulp/lp_core/gpio_intr_pulse_counter/main/CMakeLists.txt @@ -1,4 +1,5 @@ idf_component_register(SRCS "lp_core_pulse_counter_example_main.c" + REQUIRES ulp INCLUDE_DIRS ".") # # ULP support additions to component CMakeLists.txt. diff --git a/examples/system/ulp/lp_core/inter_cpu_critical_section/CMakeLists.txt b/examples/system/ulp/lp_core/inter_cpu_critical_section/CMakeLists.txt index 2ef6326bee..f2b368a63e 100644 --- a/examples/system/ulp/lp_core/inter_cpu_critical_section/CMakeLists.txt +++ b/examples/system/ulp/lp_core/inter_cpu_critical_section/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) list(APPEND SDKCONFIG_DEFAULTS "sdkconfig.defaults") include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(lp_inter_cpu_critical_section_example) diff --git a/examples/system/ulp/lp_core/interrupt/CMakeLists.txt b/examples/system/ulp/lp_core/interrupt/CMakeLists.txt index de93ae527f..e03d134ec8 100644 --- a/examples/system/ulp/lp_core/interrupt/CMakeLists.txt +++ b/examples/system/ulp/lp_core/interrupt/CMakeLists.txt @@ -5,4 +5,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(interrupts) diff --git a/examples/system/ulp/lp_core/lp_adc/CMakeLists.txt b/examples/system/ulp/lp_core/lp_adc/CMakeLists.txt index 6701b75d56..c2e1a52dac 100644 --- a/examples/system/ulp/lp_core/lp_adc/CMakeLists.txt +++ b/examples/system/ulp/lp_core/lp_adc/CMakeLists.txt @@ -5,4 +5,6 @@ cmake_minimum_required(VERSION 3.16) list(APPEND SDKCONFIG_DEFAULTS "sdkconfig.defaults") include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(lp_core_adc) diff --git a/examples/system/ulp/lp_core/lp_i2c/CMakeLists.txt b/examples/system/ulp/lp_core/lp_i2c/CMakeLists.txt index 75d0454714..ab8baad70e 100644 --- a/examples/system/ulp/lp_core/lp_i2c/CMakeLists.txt +++ b/examples/system/ulp/lp_core/lp_i2c/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) list(APPEND SDKCONFIG_DEFAULTS "sdkconfig.defaults") include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(lp_i2c_example) diff --git a/examples/system/ulp/lp_core/lp_uart/lp_uart_echo/CMakeLists.txt b/examples/system/ulp/lp_core/lp_uart/lp_uart_echo/CMakeLists.txt index 0249365348..8bbaba87a8 100644 --- a/examples/system/ulp/lp_core/lp_uart/lp_uart_echo/CMakeLists.txt +++ b/examples/system/ulp/lp_core/lp_uart/lp_uart_echo/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) list(APPEND SDKCONFIG_DEFAULTS "sdkconfig.defaults") include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(lp_uart_echo_example) diff --git a/examples/system/ulp/lp_core/lp_uart/lp_uart_print/CMakeLists.txt b/examples/system/ulp/lp_core/lp_uart/lp_uart_print/CMakeLists.txt index bcda9fb96a..b034426307 100644 --- a/examples/system/ulp/lp_core/lp_uart/lp_uart_print/CMakeLists.txt +++ b/examples/system/ulp/lp_core/lp_uart/lp_uart_print/CMakeLists.txt @@ -4,4 +4,6 @@ cmake_minimum_required(VERSION 3.16) list(APPEND SDKCONFIG_DEFAULTS "sdkconfig.defaults") include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(lp_uart_print_example) diff --git a/examples/system/ulp/ulp_fsm/ulp/CMakeLists.txt b/examples/system/ulp/ulp_fsm/ulp/CMakeLists.txt index 05e73f3ef7..dfec000675 100644 --- a/examples/system/ulp/ulp_fsm/ulp/CMakeLists.txt +++ b/examples/system/ulp/ulp_fsm/ulp/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ulp_example) diff --git a/examples/system/ulp/ulp_fsm/ulp_adc/CMakeLists.txt b/examples/system/ulp/ulp_fsm/ulp_adc/CMakeLists.txt index ca8a1cd89e..f840a7fea8 100644 --- a/examples/system/ulp/ulp_fsm/ulp_adc/CMakeLists.txt +++ b/examples/system/ulp/ulp_fsm/ulp_adc/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ulp_adc_example) diff --git a/examples/system/ulp/ulp_riscv/adc/CMakeLists.txt b/examples/system/ulp/ulp_riscv/adc/CMakeLists.txt index 65ed3a2971..a43918cf30 100644 --- a/examples/system/ulp/ulp_riscv/adc/CMakeLists.txt +++ b/examples/system/ulp/ulp_riscv/adc/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ulp-riscv-adc-example) diff --git a/examples/system/ulp/ulp_riscv/ds18b20_onewire/CMakeLists.txt b/examples/system/ulp/ulp_riscv/ds18b20_onewire/CMakeLists.txt index 64f23a6847..794e104cd6 100644 --- a/examples/system/ulp/ulp_riscv/ds18b20_onewire/CMakeLists.txt +++ b/examples/system/ulp/ulp_riscv/ds18b20_onewire/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ulp_riscv_ds18b20_example) diff --git a/examples/system/ulp/ulp_riscv/gpio/CMakeLists.txt b/examples/system/ulp/ulp_riscv/gpio/CMakeLists.txt index e36a9e69fc..9d4d6cf3a2 100644 --- a/examples/system/ulp/ulp_riscv/gpio/CMakeLists.txt +++ b/examples/system/ulp/ulp_riscv/gpio/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ulp_riscv_example) diff --git a/examples/system/ulp/ulp_riscv/gpio_interrupt/CMakeLists.txt b/examples/system/ulp/ulp_riscv/gpio_interrupt/CMakeLists.txt index e36a9e69fc..9d4d6cf3a2 100644 --- a/examples/system/ulp/ulp_riscv/gpio_interrupt/CMakeLists.txt +++ b/examples/system/ulp/ulp_riscv/gpio_interrupt/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ulp_riscv_example) diff --git a/examples/system/ulp/ulp_riscv/i2c/CMakeLists.txt b/examples/system/ulp/ulp_riscv/i2c/CMakeLists.txt index d186d07abc..95360ceba5 100644 --- a/examples/system/ulp/ulp_riscv/i2c/CMakeLists.txt +++ b/examples/system/ulp/ulp_riscv/i2c/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ulp-riscv-rtc-i2c-example) diff --git a/examples/system/ulp/ulp_riscv/interrupts/CMakeLists.txt b/examples/system/ulp/ulp_riscv/interrupts/CMakeLists.txt index 8a6cce23ac..6ab71bed3c 100644 --- a/examples/system/ulp/ulp_riscv/interrupts/CMakeLists.txt +++ b/examples/system/ulp/ulp_riscv/interrupts/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ulp_riscv_interrupts) diff --git a/examples/system/ulp/ulp_riscv/touch/CMakeLists.txt b/examples/system/ulp/ulp_riscv/touch/CMakeLists.txt index e36a9e69fc..9d4d6cf3a2 100644 --- a/examples/system/ulp/ulp_riscv/touch/CMakeLists.txt +++ b/examples/system/ulp/ulp_riscv/touch/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ulp_riscv_example) diff --git a/examples/system/ulp/ulp_riscv/uart_print/CMakeLists.txt b/examples/system/ulp/ulp_riscv/uart_print/CMakeLists.txt index e36a9e69fc..9d4d6cf3a2 100644 --- a/examples/system/ulp/ulp_riscv/uart_print/CMakeLists.txt +++ b/examples/system/ulp/ulp_riscv/uart_print/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ulp_riscv_example) diff --git a/examples/system/unit_test/CMakeLists.txt b/examples/system/unit_test/CMakeLists.txt index 69dd6ea26a..14c7d424b2 100644 --- a/examples/system/unit_test/CMakeLists.txt +++ b/examples/system/unit_test/CMakeLists.txt @@ -2,4 +2,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(unit_test) diff --git a/examples/system/unit_test/main/CMakeLists.txt b/examples/system/unit_test/main/CMakeLists.txt index f96d4f5747..8c40d23c0b 100644 --- a/examples/system/unit_test/main/CMakeLists.txt +++ b/examples/system/unit_test/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "example_unit_test_main.c" + PRIV_REQUIRES testable INCLUDE_DIRS ".") diff --git a/examples/system/unit_test/test/CMakeLists.txt b/examples/system/unit_test/test/CMakeLists.txt index 77c280b2e7..151ab0a51f 100644 --- a/examples/system/unit_test/test/CMakeLists.txt +++ b/examples/system/unit_test/test/CMakeLists.txt @@ -6,11 +6,13 @@ cmake_minimum_required(VERSION 3.16) set(EXTRA_COMPONENT_DIRS "../components") # Set the components to include the tests for. -# This can be overriden from CMake cache: +# This can be overridden from CMake cache: # - when invoking CMake directly: cmake -D TEST_COMPONENTS="xxxxx" .. # - when using idf.py: idf.py -T xxxxx build # set(TEST_COMPONENTS "testable" CACHE STRING "List of components to test") include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(unit_test_test) diff --git a/examples/system/unit_test/test/main/CMakeLists.txt b/examples/system/unit_test/test/main/CMakeLists.txt index 29cdfb0f03..0ef6d242b2 100644 --- a/examples/system/unit_test/test/main/CMakeLists.txt +++ b/examples/system/unit_test/test/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "example_unit_test_test.c" + PRIV_REQUIRES unity INCLUDE_DIRS ".") diff --git a/examples/system/xip_from_psram/CMakeLists.txt b/examples/system/xip_from_psram/CMakeLists.txt index 0251663be4..1a3cd94aa2 100644 --- a/examples/system/xip_from_psram/CMakeLists.txt +++ b/examples/system/xip_from_psram/CMakeLists.txt @@ -5,8 +5,7 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) - # "Trim" the build. Include the minimal set of components, main, and anything it depends on. -set(COMPONENTS main) +idf_build_set_property(MINIMAL_BUILD ON) project(xip_from_psram) diff --git a/examples/wifi/espnow/CMakeLists.txt b/examples/wifi/espnow/CMakeLists.txt index a8178d2061..23f6516f17 100644 --- a/examples/wifi/espnow/CMakeLists.txt +++ b/examples/wifi/espnow/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(espnow_example) diff --git a/examples/wifi/espnow/main/CMakeLists.txt b/examples/wifi/espnow/main/CMakeLists.txt index 3aef7036c6..57f379820c 100644 --- a/examples/wifi/espnow/main/CMakeLists.txt +++ b/examples/wifi/espnow/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "espnow_example_main.c" + PRIV_REQUIRES nvs_flash esp_event esp_netif esp_wifi INCLUDE_DIRS ".") diff --git a/examples/wifi/fast_scan/CMakeLists.txt b/examples/wifi/fast_scan/CMakeLists.txt index ab702991e4..108b1316cf 100644 --- a/examples/wifi/fast_scan/CMakeLists.txt +++ b/examples/wifi/fast_scan/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(fast_scan) diff --git a/examples/wifi/fast_scan/main/CMakeLists.txt b/examples/wifi/fast_scan/main/CMakeLists.txt index f6fc61fe13..7659598429 100644 --- a/examples/wifi/fast_scan/main/CMakeLists.txt +++ b/examples/wifi/fast_scan/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "fast_scan.c" + PRIV_REQUIRES esp_wifi nvs_flash INCLUDE_DIRS ".") diff --git a/examples/wifi/ftm/CMakeLists.txt b/examples/wifi/ftm/CMakeLists.txt index 3ab48fa49b..e615b4a315 100644 --- a/examples/wifi/ftm/CMakeLists.txt +++ b/examples/wifi/ftm/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(ftm) diff --git a/examples/wifi/getting_started/softAP/CMakeLists.txt b/examples/wifi/getting_started/softAP/CMakeLists.txt index c94dfadd46..9a08f2d598 100644 --- a/examples/wifi/getting_started/softAP/CMakeLists.txt +++ b/examples/wifi/getting_started/softAP/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(wifi_softAP) diff --git a/examples/wifi/getting_started/softAP/main/CMakeLists.txt b/examples/wifi/getting_started/softAP/main/CMakeLists.txt index ddc8ca7fa4..7887a9a902 100644 --- a/examples/wifi/getting_started/softAP/main/CMakeLists.txt +++ b/examples/wifi/getting_started/softAP/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "softap_example_main.c" + PRIV_REQUIRES esp_wifi nvs_flash INCLUDE_DIRS ".") diff --git a/examples/wifi/getting_started/station/CMakeLists.txt b/examples/wifi/getting_started/station/CMakeLists.txt index 8e3b360aad..8a54292c66 100644 --- a/examples/wifi/getting_started/station/CMakeLists.txt +++ b/examples/wifi/getting_started/station/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(wifi_station) diff --git a/examples/wifi/getting_started/station/main/CMakeLists.txt b/examples/wifi/getting_started/station/main/CMakeLists.txt index 2ba044442a..2fe97581a2 100644 --- a/examples/wifi/getting_started/station/main/CMakeLists.txt +++ b/examples/wifi/getting_started/station/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "station_example_main.c" + PRIV_REQUIRES esp_wifi nvs_flash INCLUDE_DIRS ".") diff --git a/examples/wifi/iperf/CMakeLists.txt b/examples/wifi/iperf/CMakeLists.txt index 1913ec8a9d..ee2035eb68 100644 --- a/examples/wifi/iperf/CMakeLists.txt +++ b/examples/wifi/iperf/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(iperf) diff --git a/examples/wifi/itwt/CMakeLists.txt b/examples/wifi/itwt/CMakeLists.txt index 3b0a05216b..935ad6ba79 100644 --- a/examples/wifi/itwt/CMakeLists.txt +++ b/examples/wifi/itwt/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(itwt) diff --git a/examples/wifi/itwt/main/CMakeLists.txt b/examples/wifi/itwt/main/CMakeLists.txt index 18b5561b02..18cf0c4915 100644 --- a/examples/wifi/itwt/main/CMakeLists.txt +++ b/examples/wifi/itwt/main/CMakeLists.txt @@ -1,4 +1,5 @@ idf_component_register(SRCS "itwt_main.c" "wifi_stats_cmd.c" "wifi_itwt_cmd.c" + PRIV_REQUIRES lwip esp_wifi esp_timer esp_pm INCLUDE_DIRS ".") diff --git a/examples/wifi/power_save/CMakeLists.txt b/examples/wifi/power_save/CMakeLists.txt index 4331e1da33..0bdb9269fe 100644 --- a/examples/wifi/power_save/CMakeLists.txt +++ b/examples/wifi/power_save/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(power_save) diff --git a/examples/wifi/power_save/main/CMakeLists.txt b/examples/wifi/power_save/main/CMakeLists.txt index 8a184368d3..70a283428d 100644 --- a/examples/wifi/power_save/main/CMakeLists.txt +++ b/examples/wifi/power_save/main/CMakeLists.txt @@ -1,3 +1,4 @@ idf_component_register(SRCS "power_save.c" "get_ap_info.c" + PRIV_REQUIRES esp_driver_uart vfs esp_wifi esp_pm nvs_flash INCLUDE_DIRS ".") diff --git a/examples/wifi/roaming/roaming_11kvr/CMakeLists.txt b/examples/wifi/roaming/roaming_11kvr/CMakeLists.txt index b8d795936d..f5a97a564a 100644 --- a/examples/wifi/roaming/roaming_11kvr/CMakeLists.txt +++ b/examples/wifi/roaming/roaming_11kvr/CMakeLists.txt @@ -6,4 +6,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(roaming) diff --git a/examples/wifi/roaming/roaming_11kvr/main/CMakeLists.txt b/examples/wifi/roaming/roaming_11kvr/main/CMakeLists.txt index c3c5d418da..12259de6ea 100644 --- a/examples/wifi/roaming/roaming_11kvr/main/CMakeLists.txt +++ b/examples/wifi/roaming/roaming_11kvr/main/CMakeLists.txt @@ -1,3 +1,4 @@ # Embed CA, certificate & key directly into binary idf_component_register(SRCS "roaming_example.c" + PRIV_REQUIRES esp_wifi wpa_supplicant nvs_flash INCLUDE_DIRS ".") diff --git a/examples/wifi/roaming/roaming_app/CMakeLists.txt b/examples/wifi/roaming/roaming_app/CMakeLists.txt index 33e8cd4d68..63ac3b2e1c 100644 --- a/examples/wifi/roaming/roaming_app/CMakeLists.txt +++ b/examples/wifi/roaming/roaming_app/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(wifi_roaming_app) diff --git a/examples/wifi/roaming/roaming_app/main/CMakeLists.txt b/examples/wifi/roaming/roaming_app/main/CMakeLists.txt index 22b82c0587..d3f5f2ea70 100644 --- a/examples/wifi/roaming/roaming_app/main/CMakeLists.txt +++ b/examples/wifi/roaming/roaming_app/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "roaming_app_example.c" + PRIV_REQUIRES esp_wifi nvs_flash INCLUDE_DIRS ".") diff --git a/examples/wifi/scan/CMakeLists.txt b/examples/wifi/scan/CMakeLists.txt index f35b26af6e..dfb351fbb3 100644 --- a/examples/wifi/scan/CMakeLists.txt +++ b/examples/wifi/scan/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(scan) diff --git a/examples/wifi/scan/main/CMakeLists.txt b/examples/wifi/scan/main/CMakeLists.txt index a4c5d04fd7..09b23df1a3 100644 --- a/examples/wifi/scan/main/CMakeLists.txt +++ b/examples/wifi/scan/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "scan.c" + PRIV_REQUIRES esp_wifi nvs_flash INCLUDE_DIRS ".") diff --git a/examples/wifi/smart_config/CMakeLists.txt b/examples/wifi/smart_config/CMakeLists.txt index 573a4479a7..cfcfe8410b 100644 --- a/examples/wifi/smart_config/CMakeLists.txt +++ b/examples/wifi/smart_config/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(smart_config) diff --git a/examples/wifi/smart_config/main/CMakeLists.txt b/examples/wifi/smart_config/main/CMakeLists.txt index 559b60cadb..ec5a3a5748 100644 --- a/examples/wifi/smart_config/main/CMakeLists.txt +++ b/examples/wifi/smart_config/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "smartconfig_main.c" + PRIV_REQUIRES esp_wifi wpa_supplicant nvs_flash INCLUDE_DIRS ".") diff --git a/examples/wifi/softap_sta/CMakeLists.txt b/examples/wifi/softap_sta/CMakeLists.txt index 4d6f8c1245..9ec35f0940 100644 --- a/examples/wifi/softap_sta/CMakeLists.txt +++ b/examples/wifi/softap_sta/CMakeLists.txt @@ -5,4 +5,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(softap_sta) diff --git a/examples/wifi/softap_sta/main/CMakeLists.txt b/examples/wifi/softap_sta/main/CMakeLists.txt index 68e80d28cb..6cfb80de3d 100644 --- a/examples/wifi/softap_sta/main/CMakeLists.txt +++ b/examples/wifi/softap_sta/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "softap_sta.c" + PRIV_REQUIRES esp_wifi nvs_flash INCLUDE_DIRS ".") diff --git a/examples/wifi/wifi_aware/nan_console/CMakeLists.txt b/examples/wifi/wifi_aware/nan_console/CMakeLists.txt index b08fb7cd93..7cdfe4b780 100644 --- a/examples/wifi/wifi_aware/nan_console/CMakeLists.txt +++ b/examples/wifi/wifi_aware/nan_console/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(nan_console) diff --git a/examples/wifi/wifi_aware/nan_publisher/CMakeLists.txt b/examples/wifi/wifi_aware/nan_publisher/CMakeLists.txt index 1b0072c926..4ef79b9d8b 100644 --- a/examples/wifi/wifi_aware/nan_publisher/CMakeLists.txt +++ b/examples/wifi/wifi_aware/nan_publisher/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(nan_publisher) diff --git a/examples/wifi/wifi_aware/nan_publisher/main/CMakeLists.txt b/examples/wifi/wifi_aware/nan_publisher/main/CMakeLists.txt index 297c8de71e..2a89c6fc65 100644 --- a/examples/wifi/wifi_aware/nan_publisher/main/CMakeLists.txt +++ b/examples/wifi/wifi_aware/nan_publisher/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "publisher_main.c" + PRIV_REQUIRES esp_wifi nvs_flash INCLUDE_DIRS ".") diff --git a/examples/wifi/wifi_aware/nan_subscriber/CMakeLists.txt b/examples/wifi/wifi_aware/nan_subscriber/CMakeLists.txt index d682097459..dd1f3c7092 100644 --- a/examples/wifi/wifi_aware/nan_subscriber/CMakeLists.txt +++ b/examples/wifi/wifi_aware/nan_subscriber/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(nan_subscriber) diff --git a/examples/wifi/wifi_aware/nan_subscriber/main/CMakeLists.txt b/examples/wifi/wifi_aware/nan_subscriber/main/CMakeLists.txt index 7d6b6a2e07..0fcc159887 100644 --- a/examples/wifi/wifi_aware/nan_subscriber/main/CMakeLists.txt +++ b/examples/wifi/wifi_aware/nan_subscriber/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "subscriber_main.c" + PRIV_REQUIRES esp_wifi nvs_flash INCLUDE_DIRS ".") diff --git a/examples/wifi/wifi_eap_fast/CMakeLists.txt b/examples/wifi/wifi_eap_fast/CMakeLists.txt index 6846b8e909..39847c8d3d 100644 --- a/examples/wifi/wifi_eap_fast/CMakeLists.txt +++ b/examples/wifi/wifi_eap_fast/CMakeLists.txt @@ -6,4 +6,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(wifi_eap_fast) diff --git a/examples/wifi/wifi_eap_fast/main/CMakeLists.txt b/examples/wifi/wifi_eap_fast/main/CMakeLists.txt index 52efdcebe8..cd8e2a8b3c 100644 --- a/examples/wifi/wifi_eap_fast/main/CMakeLists.txt +++ b/examples/wifi/wifi_eap_fast/main/CMakeLists.txt @@ -1,4 +1,5 @@ # Embed CA, certificate & key directly into binary idf_component_register(SRCS "wifi_eap_fast_main.c" INCLUDE_DIRS "." + PRIV_REQUIRES esp_wifi wpa_supplicant nvs_flash EMBED_TXTFILES ca.pem pac_file.pac) diff --git a/examples/wifi/wifi_easy_connect/dpp-enrollee/CMakeLists.txt b/examples/wifi/wifi_easy_connect/dpp-enrollee/CMakeLists.txt index f8ada18091..ad31585810 100644 --- a/examples/wifi/wifi_easy_connect/dpp-enrollee/CMakeLists.txt +++ b/examples/wifi/wifi_easy_connect/dpp-enrollee/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(dpp-enrollee) diff --git a/examples/wifi/wifi_easy_connect/dpp-enrollee/main/CMakeLists.txt b/examples/wifi/wifi_easy_connect/dpp-enrollee/main/CMakeLists.txt index 97a762af08..9d85fed0d5 100644 --- a/examples/wifi/wifi_easy_connect/dpp-enrollee/main/CMakeLists.txt +++ b/examples/wifi/wifi_easy_connect/dpp-enrollee/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "dpp_enrollee_main.c" + PRIV_REQUIRES esp_wifi wpa_supplicant nvs_flash INCLUDE_DIRS ".") diff --git a/examples/wifi/wifi_enterprise/CMakeLists.txt b/examples/wifi/wifi_enterprise/CMakeLists.txt index 6343108af9..c2b81630a0 100644 --- a/examples/wifi/wifi_enterprise/CMakeLists.txt +++ b/examples/wifi/wifi_enterprise/CMakeLists.txt @@ -6,4 +6,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(wifi_enterprise) diff --git a/examples/wifi/wifi_enterprise/main/CMakeLists.txt b/examples/wifi/wifi_enterprise/main/CMakeLists.txt index 75a028a0dc..b7685d84cc 100644 --- a/examples/wifi/wifi_enterprise/main/CMakeLists.txt +++ b/examples/wifi/wifi_enterprise/main/CMakeLists.txt @@ -1,4 +1,5 @@ # Embed CA, certificate & key directly into binary idf_component_register(SRCS "wifi_enterprise_main.c" INCLUDE_DIRS "." + PRIV_REQUIRES esp_wifi wpa_supplicant nvs_flash EMBED_TXTFILES ca.pem client.crt client.key) diff --git a/examples/wifi/wps/CMakeLists.txt b/examples/wifi/wps/CMakeLists.txt index 9b0670e64c..5552cbb3d6 100644 --- a/examples/wifi/wps/CMakeLists.txt +++ b/examples/wifi/wps/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(wps_example) diff --git a/examples/wifi/wps/main/CMakeLists.txt b/examples/wifi/wps/main/CMakeLists.txt index 8801e8f8ca..0bb0e2ba6d 100644 --- a/examples/wifi/wps/main/CMakeLists.txt +++ b/examples/wifi/wps/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "wps.c" + PRIV_REQUIRES esp_wifi wpa_supplicant nvs_flash INCLUDE_DIRS ".") diff --git a/examples/wifi/wps_softap_registrar/CMakeLists.txt b/examples/wifi/wps_softap_registrar/CMakeLists.txt index 37f4bc76b4..8373768a63 100644 --- a/examples/wifi/wps_softap_registrar/CMakeLists.txt +++ b/examples/wifi/wps_softap_registrar/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(wps_softap_registrar) diff --git a/examples/wifi/wps_softap_registrar/main/CMakeLists.txt b/examples/wifi/wps_softap_registrar/main/CMakeLists.txt index 8801e8f8ca..0bb0e2ba6d 100644 --- a/examples/wifi/wps_softap_registrar/main/CMakeLists.txt +++ b/examples/wifi/wps_softap_registrar/main/CMakeLists.txt @@ -1,2 +1,3 @@ idf_component_register(SRCS "wps.c" + PRIV_REQUIRES esp_wifi wpa_supplicant nvs_flash INCLUDE_DIRS ".") diff --git a/examples/zigbee/esp_zigbee_gateway/CMakeLists.txt b/examples/zigbee/esp_zigbee_gateway/CMakeLists.txt index 4d57970926..6021d05872 100644 --- a/examples/zigbee/esp_zigbee_gateway/CMakeLists.txt +++ b/examples/zigbee/esp_zigbee_gateway/CMakeLists.txt @@ -4,4 +4,6 @@ # CMakeLists in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(esp_zigbee_gateway) diff --git a/examples/zigbee/esp_zigbee_gateway/main/CMakeLists.txt b/examples/zigbee/esp_zigbee_gateway/main/CMakeLists.txt index 5d38bf74f0..907fd70904 100644 --- a/examples/zigbee/esp_zigbee_gateway/main/CMakeLists.txt +++ b/examples/zigbee/esp_zigbee_gateway/main/CMakeLists.txt @@ -1,2 +1,4 @@ idf_component_register(SRCS "esp_zigbee_gateway.c" + PRIV_REQUIRES ieee802154 esp_driver_usb_serial_jtag esp_coex esp_netif + vfs esp_wifi nvs_flash esp_driver_uart INCLUDE_DIRS ".") diff --git a/examples/zigbee/light_sample/HA_on_off_light/CMakeLists.txt b/examples/zigbee/light_sample/HA_on_off_light/CMakeLists.txt index 3c60c93069..38cb8e5c51 100644 --- a/examples/zigbee/light_sample/HA_on_off_light/CMakeLists.txt +++ b/examples/zigbee/light_sample/HA_on_off_light/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(light_bulb) diff --git a/examples/zigbee/light_sample/HA_on_off_light/main/CMakeLists.txt b/examples/zigbee/light_sample/HA_on_off_light/main/CMakeLists.txt index 15343efb83..77a23b0991 100644 --- a/examples/zigbee/light_sample/HA_on_off_light/main/CMakeLists.txt +++ b/examples/zigbee/light_sample/HA_on_off_light/main/CMakeLists.txt @@ -1,4 +1,5 @@ idf_component_register( SRC_DIRS "." "../../../common/zcl_utility/src" INCLUDE_DIRS "." "../../../common/zcl_utility/include" + PRIV_REQUIRES nvs_flash esp_driver_uart ieee802154 ) diff --git a/examples/zigbee/light_sample/HA_on_off_switch/CMakeLists.txt b/examples/zigbee/light_sample/HA_on_off_switch/CMakeLists.txt index e6f04118dc..605ea189c2 100644 --- a/examples/zigbee/light_sample/HA_on_off_switch/CMakeLists.txt +++ b/examples/zigbee/light_sample/HA_on_off_switch/CMakeLists.txt @@ -2,4 +2,6 @@ # in this exact order for cmake to work correctly cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(light_switch) diff --git a/examples/zigbee/light_sample/HA_on_off_switch/main/CMakeLists.txt b/examples/zigbee/light_sample/HA_on_off_switch/main/CMakeLists.txt index 15343efb83..0f5e4fffb3 100644 --- a/examples/zigbee/light_sample/HA_on_off_switch/main/CMakeLists.txt +++ b/examples/zigbee/light_sample/HA_on_off_switch/main/CMakeLists.txt @@ -1,4 +1,5 @@ idf_component_register( SRC_DIRS "." "../../../common/zcl_utility/src" INCLUDE_DIRS "." "../../../common/zcl_utility/include" + PRIV_REQUIRES nvs_flash esp_driver_gpio esp_driver_uart ieee802154 ) diff --git a/tools/ci/check_public_headers.py b/tools/ci/check_public_headers.py index 12cd61488b..2b21bae1e1 100644 --- a/tools/ci/check_public_headers.py +++ b/tools/ci/check_public_headers.py @@ -270,7 +270,8 @@ class PublicHeaderChecker: os.unlink(os.path.join(project_dir, 'sdkconfig')) except FileNotFoundError: pass - subprocess.check_call(['idf.py', '-B', build_dir, f'-DSDKCONFIG={sdkconfig}', 'reconfigure'], cwd=project_dir) + subprocess.check_call(['idf.py', '-B', build_dir, f'-DSDKCONFIG={sdkconfig}', '-DCOMPONENTS=', 'reconfigure'], + cwd=project_dir) def get_std(json: List, extension: str) -> str: # compile commands for the files with specified extension, containing C(XX) standard flag diff --git a/tools/cmake/kconfig.cmake b/tools/cmake/kconfig.cmake index f1f0ab20fb..db29e9cef4 100644 --- a/tools/cmake/kconfig.cmake +++ b/tools/cmake/kconfig.cmake @@ -129,6 +129,13 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults) idf_build_get_property(idf_toolchain IDF_TOOLCHAIN) idf_build_get_property(idf_path IDF_PATH) idf_build_get_property(idf_env_fpga __IDF_ENV_FPGA) + idf_build_get_property(idf_minimal_build MINIMAL_BUILD) + + if(idf_minimal_build) + set(idf_minimal_build "y") + else() + set(idf_minimal_build "n") + endif() # These are the paths for files which will contain the generated "source" lines for COMPONENT_KCONFIGS and # COMPONENT_KCONFIGS_PROJBUILD @@ -167,6 +174,7 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults) --sdkconfig-rename ${root_sdkconfig_rename} --config ${sdkconfig} ${defaults_arg} + --env "IDF_MINIMAL_BUILD=${idf_minimal_build}" --env-file ${config_env_path}) idf_build_get_property(build_dir BUILD_DIR) @@ -256,6 +264,7 @@ function(__kconfig_generate_config sdkconfig sdkconfig_defaults) "IDF_TOOLCHAIN=${idf_toolchain}" "IDF_ENV_FPGA=${idf_env_fpga}" "IDF_INIT_VERSION=${idf_init_version}" + "IDF_MINIMAL_BUILD=${idf_minimal_build}" ${MENUCONFIG_CMD} ${root_kconfig} USES_TERMINAL # additional run of kconfgen esures that the deprecated options will be inserted into sdkconfig (for backward diff --git a/tools/cmake/project.cmake b/tools/cmake/project.cmake index fe126c8bdd..be9229c65d 100644 --- a/tools/cmake/project.cmake +++ b/tools/cmake/project.cmake @@ -495,6 +495,24 @@ function(__project_init components_var test_components_var) endif() endforeach() + # If a minimal build is requested, set COMPONENTS to "main" only if the COMPONENTS + # variable is not already defined. The COMPONENTS variable takes precedence over + # the MINIMAL_BUILD property. + idf_build_get_property(minimal_build MINIMAL_BUILD) + if(minimal_build) + if(DEFINED COMPONENTS) + message(WARNING "The MINIMAL_BUILD property is disregarded because the COMPONENTS variable is defined.") + set(minimal_build OFF) + else() + set(COMPONENTS main) + set(minimal_build ON) + endif() + else() + set(minimal_build OFF) + endif() + + message(STATUS "Minimal build - ${minimal_build}") + spaces2list(COMPONENTS) spaces2list(EXCLUDE_COMPONENTS) idf_build_get_property(component_targets __COMPONENT_TARGETS) diff --git a/tools/idf_py_actions/hint_modules/component_requirements.py b/tools/idf_py_actions/hint_modules/component_requirements.py index 92e3a66825..fc9eff39f6 100644 --- a/tools/idf_py_actions/hint_modules/component_requirements.py +++ b/tools/idf_py_actions/hint_modules/component_requirements.py @@ -8,7 +8,7 @@ from idf_py_actions.tools import get_build_context ''' glossary: -orignal_component: component which compilation failed +original_component: component which compilation failed source_component: component containing file which is including the missing header file candidate_component: component which contain the missing header file original_filename: abs path of file(compilation unit) in original_component @@ -21,7 +21,7 @@ ENOENT_RE = re.compile(r'^(.+):\d+:\d+: fatal error: (.+): No such file or direc flags=re.MULTILINE) # Regex to find full preprocessor's error message to identify the original_filename # in case the missing_header is reported in indirect include. -ENOENT_FULL_RE = re.compile(r'^(In file included.*No such file or directory)$', +ENOENT_FULL_RE = re.compile(r'^(In file included.*?No such file or directory)$', flags=re.MULTILINE | re.DOTALL) # Regex to find original_filename in preprocessor's error message ORIGINAL_FILE_RE = re.compile(r'.*from (.*):[\d]+:') diff --git a/tools/test_apps/storage/fatfsgen/CMakeLists.txt b/tools/test_apps/storage/fatfsgen/CMakeLists.txt index 1c0c2b8a1a..7e3ea7e055 100644 --- a/tools/test_apps/storage/fatfsgen/CMakeLists.txt +++ b/tools/test_apps/storage/fatfsgen/CMakeLists.txt @@ -3,4 +3,6 @@ cmake_minimum_required(VERSION 3.16) include($ENV{IDF_PATH}/tools/cmake/project.cmake) +# "Trim" the build. Include the minimal set of components, main, and anything it depends on. +idf_build_set_property(MINIMAL_BUILD ON) project(fatfsgen) diff --git a/tools/test_apps/storage/fatfsgen/main/CMakeLists.txt b/tools/test_apps/storage/fatfsgen/main/CMakeLists.txt index 306e4a14d8..522fe12d05 100644 --- a/tools/test_apps/storage/fatfsgen/main/CMakeLists.txt +++ b/tools/test_apps/storage/fatfsgen/main/CMakeLists.txt @@ -1,5 +1,6 @@ idf_component_register(SRCS "fatfsgen_example_main.c" - INCLUDE_DIRS ".") + PRIV_REQUIRES fatfs vfs + INCLUDE_DIRS ".") # Create a FATFS image from the contents of the 'fatfs_image' directory # that fits the partition named 'storage'. FLASH_IN_PROJECT indicates that diff --git a/tools/test_build_system/test_cmake.py b/tools/test_build_system/test_cmake.py index 2b138afb3d..51be08ecb2 100644 --- a/tools/test_build_system/test_cmake.py +++ b/tools/test_build_system/test_cmake.py @@ -30,7 +30,8 @@ def test_build_cmake_library_psram_workaround(test_app_copy: Path) -> None: idf_path = Path(os.environ['IDF_PATH']) (test_app_copy / 'sdkconfig.defaults').write_text('\n'.join(['CONFIG_SPIRAM=y', 'CONFIG_SPIRAM_CACHE_WORKAROUND=y'])) - run_cmake('-G', 'Ninja', '-DSDKCONFIG_DEFAULTS={}'.format(test_app_copy / 'sdkconfig.defaults'), + run_cmake('-G', 'Ninja', '-DCOMPONENTS=main;esp_psram', + '-DSDKCONFIG_DEFAULTS={}'.format(test_app_copy / 'sdkconfig.defaults'), str(idf_path / 'examples' / 'build_system' / 'cmake' / 'import_lib')) with open((test_app_copy / 'build' / 'compile_commands.json'), 'r', encoding='utf-8') as f: data = f.read()