From d5f5fadbeef3ca01d3775a25e890efb9b88c54d4 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Thu, 8 Aug 2019 15:33:45 +1000 Subject: [PATCH] bootloader: Include FreeRTOS component for the FREERTOS_UNICORE header, only --- components/bootloader_support/CMakeLists.txt | 3 ++- components/freertos/CMakeLists.txt | 8 +++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/components/bootloader_support/CMakeLists.txt b/components/bootloader_support/CMakeLists.txt index 92b04097e6..f9ed448ab5 100644 --- a/components/bootloader_support/CMakeLists.txt +++ b/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" diff --git a/components/freertos/CMakeLists.txt b/components/freertos/CMakeLists.txt index ee6b560392..9826fd8c91 100644 --- a/components/freertos/CMakeLists.txt +++ b/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"