From: Ivan Grokhotkov Date: Sun, 30 Sep 2018 04:27:06 +0000 (+0800) Subject: bootloader_support: exclude bootloader_init.c when building app X-Git-Tag: v3.1.3~12^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9845219a5f87d98b3681c2b926eeb690e496e27f;p=esp-idf bootloader_support: exclude bootloader_init.c when building app Depending on link order of libraries, bootloader implementation of __assert_func could be linked instead of the one provided by newlib. --- diff --git a/components/bootloader_support/CMakeLists.txt b/components/bootloader_support/CMakeLists.txt index 1f28854108..a6b5592856 100644 --- a/components/bootloader_support/CMakeLists.txt +++ b/components/bootloader_support/CMakeLists.txt @@ -1,7 +1,6 @@ set(COMPONENT_SRCS "src/bootloader_clock.c" "src/bootloader_common.c" "src/bootloader_flash.c" - "src/bootloader_init.c" "src/bootloader_random.c" "src/bootloader_sha.c" "src/bootloader_utility.c" @@ -17,6 +16,7 @@ if(${BOOTLOADER_BUILD}) set(COMPONENT_ADD_INCLUDEDIRS "include include_priv") set(COMPONENT_REQUIRES) set(COMPONENT_PRIV_REQUIRES spi_flash micro-ecc) + list(APPEND COMPONENT_SRCS "src/bootloader_init.c") else() set(COMPONENT_ADD_INCLUDEDIRS "include") set(COMPONENT_PRIV_INCLUDEDIRS "include_priv") diff --git a/components/bootloader_support/component.mk b/components/bootloader_support/component.mk index dc449a6017..dee3ecd7f8 100644 --- a/components/bootloader_support/component.mk +++ b/components/bootloader_support/component.mk @@ -9,6 +9,10 @@ endif COMPONENT_SRCDIRS := src +ifndef IS_BOOTLOADER_BUILD +COMPONENT_OBJEXCLUDE := src/bootloader_init.o +endif + # # Secure boot signing key support #