]> granicus.if.org Git - esp-idf/commitdiff
bootloader_support: exclude bootloader_init.c when building app
authorIvan Grokhotkov <ivan@espressif.com>
Sun, 30 Sep 2018 04:27:06 +0000 (12:27 +0800)
committerbot <bot@espressif.com>
Tue, 2 Oct 2018 01:20:04 +0000 (01:20 +0000)
Depending on link order of libraries, bootloader implementation of
__assert_func could be linked instead of the one provided by newlib.

components/bootloader_support/CMakeLists.txt
components/bootloader_support/component.mk

index 50aca978ce709f1f4e31a85390e7e2a02c93af5a..cdb086abfa4266d5f81f3173e482f857af4ff84c 100644 (file)
@@ -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_bootloader")
     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_bootloader")
index 0b464bdb1168049692ea7f93ebbf64e5aac6c6d1..ecf26bd89aabe824e5fd7f91db14d034ffd7b749 100644 (file)
@@ -9,6 +9,10 @@ endif
 
 COMPONENT_SRCDIRS := src
 
+ifndef IS_BOOTLOADER_BUILD
+COMPONENT_OBJEXCLUDE := src/bootloader_init.o
+endif
+
 #
 # Secure boot signing key support
 #