From 81f2a94f9a76da695fc7e8948eaf509b514fffec Mon Sep 17 00:00:00 2001 From: Ivan Grokhotkov Date: Fri, 15 Apr 2022 10:51:07 +0200 Subject: [PATCH] esp_system: make dependencies on vfs and esp_wifi optional --- components/esp_system/CMakeLists.txt | 8 ++++++++ components/esp_system/startup.c | 9 +++++++-- 2 files changed, 15 insertions(+), 2 deletions(-) diff --git a/components/esp_system/CMakeLists.txt b/components/esp_system/CMakeLists.txt index d92be939e6..5bd2af9ab6 100644 --- a/components/esp_system/CMakeLists.txt +++ b/components/esp_system/CMakeLists.txt @@ -95,3 +95,11 @@ idf_component_optional_requires(PRIVATE app_update) if(CONFIG_PM_ENABLE) idf_component_optional_requires(PRIVATE pm) endif() + +if(CONFIG_VFS_SUPPORT_IO) + idf_component_optional_requires(PRIVATE vfs) +endif() + +if(CONFIG_SW_COEXIST_ENABLE OR CONFIG_EXTERNAL_COEX_ENABLE) + idf_component_optional_requires(PRIVATE esp_wifi) +endif() diff --git a/components/esp_system/startup.c b/components/esp_system/startup.c index 0bc753c368..786466b652 100644 --- a/components/esp_system/startup.c +++ b/components/esp_system/startup.c @@ -26,7 +26,6 @@ #include "esp_spi_flash.h" #include "esp_flash_internal.h" #include "esp_newlib.h" -#include "esp_vfs_dev.h" #include "esp_timer.h" #include "esp_efuse.h" #include "esp_flash_encrypt.h" @@ -41,7 +40,9 @@ /***********************************************/ // Headers for other components init functions +#if CONFIG_SW_COEXIST_ENABLE || CONFIG_EXTERNAL_COEX_ENABLE #include "esp_coexist_internal.h" +#endif #if CONFIG_ESP_COREDUMP_ENABLE #include "esp_core_dump.h" @@ -58,8 +59,12 @@ #include "esp_private/pm_impl.h" #endif -#include "esp_pthread.h" +#if CONFIG_VFS_SUPPORT_IO +#include "esp_vfs_dev.h" #include "esp_vfs_console.h" +#endif + +#include "esp_pthread.h" #include "esp_private/esp_clk.h" #include "esp_private/brownout.h"