فهرست منبع

esp_system: make dependencies on vfs and esp_wifi optional

Ivan Grokhotkov 3 سال پیش
والد
کامیت
81f2a94f9a
2فایلهای تغییر یافته به همراه15 افزوده شده و 2 حذف شده
  1. 8 0
      components/esp_system/CMakeLists.txt
  2. 7 2
      components/esp_system/startup.c

+ 8 - 0
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()

+ 7 - 2
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"