]> granicus.if.org Git - esp-idf/commitdiff
Build system: Fix error if librtc submodule not available to bootloader
authorAngus Gratton <angus@espressif.com>
Mon, 6 Feb 2017 06:12:16 +0000 (17:12 +1100)
committerAngus Gratton <angus@espressif.com>
Wed, 22 Feb 2017 00:59:37 +0000 (11:59 +1100)
Closes #220 https://github.com/espressif/esp-idf/issues/220

components/bootloader/src/main/Makefile.projbuild [new file with mode: 0644]
components/bootloader/src/main/component.mk

diff --git a/components/bootloader/src/main/Makefile.projbuild b/components/bootloader/src/main/Makefile.projbuild
new file mode 100644 (file)
index 0000000..c368c68
--- /dev/null
@@ -0,0 +1,4 @@
+# Submodules normally added in component.mk, but fully qualified
+# paths can be added at this level (we need binary librtc to be
+# available to link bootloader).
+COMPONENT_SUBMODULES += $(IDF_PATH)/components/esp32/lib
index 2069665d1a80242ec82d725fca9f35477dcbb1fe..12fdf8efa0a4f1966b0bf188253b902a9b9597cd 100644 (file)
@@ -14,10 +14,10 @@ COMPONENT_ADD_LDFLAGS := -L $(COMPONENT_PATH) -lmain $(addprefix -T ,$(LINKER_SC
 
 COMPONENT_ADD_LINKER_DEPS := $(LINKER_SCRIPTS)
 
-ifdef IS_BOOTLOADER_BUILD
 # following lines are a workaround to link librtc into the
 # bootloader, until clock setting code is in a source-based esp-idf
 # component. See also rtc_printf() in bootloader_start.c
+#
+# See also matching COMPONENT_SUBMODULES line in Makefile.projbuild
 COMPONENT_ADD_LDFLAGS += -L $(IDF_PATH)/components/esp32/lib/ -lrtc_clk -lrtc
 COMPONENT_EXTRA_INCLUDES += $(IDF_PATH)/components/esp32/
-endif