From 9c03f047690f332b0ce625a0d4aba4f70bf573b2 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Mon, 8 Mar 2021 19:46:37 +1100 Subject: [PATCH] esptool_py: Add esptool_py as a dependency for any component that uses it Many components uses esptool_py_flash_target function, they all should explicitly requier the esptool_py component. Related to https://github.com/espressif/esp-idf/issues/6670 --- components/app_update/CMakeLists.txt | 3 ++- components/bootloader/CMakeLists.txt | 2 +- components/esp_wifi/CMakeLists.txt | 4 ++-- components/spiffs/CMakeLists.txt | 2 +- 4 files changed, 6 insertions(+), 5 deletions(-) diff --git a/components/app_update/CMakeLists.txt b/components/app_update/CMakeLists.txt index 74c0d88fed..2fcd57b434 100644 --- a/components/app_update/CMakeLists.txt +++ b/components/app_update/CMakeLists.txt @@ -1,7 +1,8 @@ idf_component_register(SRCS "esp_ota_ops.c" "esp_app_desc.c" INCLUDE_DIRS "include" - REQUIRES spi_flash partition_table bootloader_support) + REQUIRES spi_flash partition_table bootloader_support + PRIV_REQUIRES esptool_py) # esp_app_desc structure is added as an undefined symbol because otherwise the # linker will ignore this structure as it has no other files depending on it. diff --git a/components/bootloader/CMakeLists.txt b/components/bootloader/CMakeLists.txt index d8ea49c954..b17b6e7ef1 100644 --- a/components/bootloader/CMakeLists.txt +++ b/components/bootloader/CMakeLists.txt @@ -1,4 +1,4 @@ -idf_component_register(PRIV_REQUIRES partition_table) +idf_component_register(PRIV_REQUIRES partition_table esptool_py) # Do not generate flash file when building bootloader or is in early expansion of the build if(BOOTLOADER_BUILD OR NOT CONFIG_APP_BUILD_BOOTLOADER) diff --git a/components/esp_wifi/CMakeLists.txt b/components/esp_wifi/CMakeLists.txt index e8730e0ee8..4b8cb40376 100644 --- a/components/esp_wifi/CMakeLists.txt +++ b/components/esp_wifi/CMakeLists.txt @@ -26,9 +26,9 @@ idf_component_register(SRCS "src/coexist.c" "src/wifi_netif.c" "${idf_target}/esp_adapter.c" INCLUDE_DIRS "include" "${idf_target}/include" - PRIV_REQUIRES wpa_supplicant nvs_flash esp_netif driver ${extra_priv_requires} REQUIRES esp_event - PRIV_REQUIRES esp_timer esp_pm wpa_supplicant nvs_flash esp_netif ${extra_priv_requires} + PRIV_REQUIRES driver esptool_py esp_netif esp_pm esp_timer nvs_flash + wpa_supplicant ${extra_priv_requires} LDFRAGMENTS "${ldfragments}") idf_build_get_property(build_dir BUILD_DIR) diff --git a/components/spiffs/CMakeLists.txt b/components/spiffs/CMakeLists.txt index 53a693f564..9a9d35f5b0 100644 --- a/components/spiffs/CMakeLists.txt +++ b/components/spiffs/CMakeLists.txt @@ -8,6 +8,6 @@ idf_component_register(SRCS "esp_spiffs.c" INCLUDE_DIRS "include" PRIV_INCLUDE_DIRS "." "spiffs/src" REQUIRES spi_flash - PRIV_REQUIRES bootloader_support) + PRIV_REQUIRES bootloader_support esptool_py) set_source_files_properties(spiffs/src/spiffs_nucleus.c PROPERTIES COMPILE_FLAGS -Wno-stringop-truncation)