From 90ec0b03279969968c2a2ba9e3764ab9503efb70 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Thu, 18 Feb 2021 10:05:42 +1100 Subject: [PATCH] bootloader: Allow 'silent assert' config to work in bootloader Requires adding the 'newlib' component to the bootloader project, for platform_include header. --- components/bootloader/subproject/CMakeLists.txt | 5 +++-- components/newlib/CMakeLists.txt | 6 ++++++ 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/components/bootloader/subproject/CMakeLists.txt b/components/bootloader/subproject/CMakeLists.txt index 222aad9f2d..b647587f6c 100644 --- a/components/bootloader/subproject/CMakeLists.txt +++ b/components/bootloader/subproject/CMakeLists.txt @@ -29,10 +29,11 @@ set(COMPONENTS micro-ecc main efuse - esp_system) + esp_system + newlib) set(BOOTLOADER_BUILD 1) include("${IDF_PATH}/tools/cmake/project.cmake") -set(common_req log esp_rom esp_common esp_hw_support hal) +set(common_req log esp_rom esp_common esp_hw_support hal newlib) if(LEGACY_INCLUDE_COMMON_HEADERS) list(APPEND common_req soc hal) endif() diff --git a/components/newlib/CMakeLists.txt b/components/newlib/CMakeLists.txt index 0f869ed475..924a27212b 100644 --- a/components/newlib/CMakeLists.txt +++ b/components/newlib/CMakeLists.txt @@ -1,3 +1,9 @@ +if(BOOTLOADER_BUILD) + # Bootloader builds need the platform_include directory (for assert.h), but nothing else + idf_component_register(INCLUDE_DIRS platform_include) + return() +endif() + set(srcs "abort.c" "heap.c"