Ver Fonte

bootloader: Include FreeRTOS component for the FREERTOS_UNICORE header, only

Angus Gratton há 6 anos atrás
pai
commit
d5f5fadbee

+ 2 - 1
components/bootloader_support/CMakeLists.txt

@@ -17,7 +17,8 @@ endif()
 
 if(BOOTLOADER_BUILD)
     set(include_dirs "include" "include_bootloader")
-    set(priv_requires micro-ecc spi_flash efuse)
+    # freertos is included just for the CONFIG_FREERTOS_UNICORE macro
+    set(priv_requires micro-ecc spi_flash efuse freertos)
     list(APPEND srcs
         "src/bootloader_init.c"
         "src/${IDF_TARGET}/bootloader_sha.c"

+ 7 - 1
components/freertos/CMakeLists.txt

@@ -1,4 +1,10 @@
-set(srcs 
+if(BOOTLOADER_BUILD)
+    # bootloader only needs FreeRTOS for config, not for anything else
+    idf_component_register()
+    return()
+endif()
+
+set(srcs
     "croutine.c"
     "event_groups.c"
     "FreeRTOS-openocd.c"