Skip to content

Commit fcace26

Browse files
committed
esp32/Makefile: Add some missing IDF source files to bootloader and app.
Functions in these files may be needed when certain features are enabled (eg dual core mode), even if the linker does not give a warning or error about unresolved symbols.
1 parent 41e7ad6 commit fcace26

File tree

1 file changed

+40
-9
lines changed

1 file changed

+40
-9
lines changed

ports/esp32/Makefile

Lines changed: 40 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -135,6 +135,7 @@ LDFLAGS += -L$(ESPCOMP)/esp32/ld
135135
LDFLAGS += -T $(BUILD)/esp32_out.ld
136136
LDFLAGS += -T $(BUILD)/esp32.common.ld
137137
LDFLAGS += -T esp32.rom.ld
138+
LDFLAGS += -T esp32.rom.libgcc.ld
138139
LDFLAGS += -T esp32.peripherals.ld
139140

140141
LIBGCC_FILE_NAME = $(shell $(CC) $(CFLAGS) -print-libgcc-file-name)
@@ -265,10 +266,16 @@ $(BUILD)/$(ESPCOMP)/esp32/dport_access.o: CFLAGS += -Wno-array-bounds
265266
ESPIDF_ESP32_O = $(addprefix $(ESPCOMP)/esp32/,\
266267
brownout.o \
267268
cache_sram_mmu.o \
269+
coexist.o \
268270
dbg_stubs.o \
271+
dport_panic_highint_hdl.o \
269272
esp_err_to_name.o \
273+
esp_himem.o \
270274
panic.o \
275+
pm_trace.o \
271276
reset_reason.o \
277+
restore.o \
278+
stack_check.o \
272279
esp_timer.o \
273280
esp_timer_esp32.o \
274281
ets_timer_legacy.o \
@@ -362,6 +369,7 @@ $(BUILD)/$(ESPCOMP)/freertos/portasm.o: CFLAGS = $(CFLAGS_ASM)
362369
$(BUILD)/$(ESPCOMP)/freertos/xtensa_context.o: CFLAGS = $(CFLAGS_ASM)
363370
$(BUILD)/$(ESPCOMP)/freertos/xtensa_intr_asm.o: CFLAGS = $(CFLAGS_ASM)
364371
$(BUILD)/$(ESPCOMP)/freertos/xtensa_vectors.o: CFLAGS = $(CFLAGS_ASM)
372+
$(BUILD)/$(ESPCOMP)/freertos/xtensa_vector_defaults.o: CFLAGS = $(CFLAGS_ASM)
365373
$(BUILD)/$(ESPCOMP)/freertos/%.o: CFLAGS = $(CFLAGS_BASE) -I. -I$(BUILD) $(INC_ESPCOMP) -I$(ESPCOMP)/freertos/include/freertos -D_ESP_FREERTOS_INTERNAL
366374
ESPIDF_FREERTOS_O = $(addprefix $(ESPCOMP)/freertos/,\
367375
croutine.o \
@@ -914,24 +922,47 @@ $(BOOTLOADER_LIB_DIR)/libmicro-ecc.a: $(BOOTLOADER_LIB_MICRO_ECC_OBJ)
914922
$(ECHO) "AR $@"
915923
$(Q)$(AR) cr $@ $^
916924

917-
# remaining object files
918-
BOOTLOADER_OBJ = $(addprefix $(BUILD)/bootloader/$(ESPCOMP)/,\
919-
soc/esp32/rtc_clk.o \
920-
soc/esp32/rtc_clk_init.o \
921-
soc/esp32/rtc_init.o \
922-
soc/esp32/rtc_time.o \
923-
soc/esp32/rtc_wdt.o \
924-
soc/esp32/cpu_util.o \
925+
# libsoc.a
926+
$(BUILD)/bootloader/$(ESPCOMP)/soc/esp32/rtc_clk.o: CFLAGS += -fno-jump-tables -fno-tree-switch-conversion
927+
BOOTLOADER_LIB_ALL += soc
928+
BOOTLOADER_LIB_SOC_OBJ = $(addprefix $(BUILD)/bootloader/$(ESPCOMP)/soc/,\
929+
esp32/cpu_util.o \
930+
esp32/gpio_periph.o \
931+
esp32/rtc_clk.o \
932+
esp32/rtc_clk_init.o \
933+
esp32/rtc_init.o \
934+
esp32/rtc_periph.o \
935+
esp32/rtc_pm.o \
936+
esp32/rtc_sleep.o \
937+
esp32/rtc_time.o \
938+
esp32/rtc_wdt.o \
939+
esp32/sdio_slave_periph.o \
940+
esp32/sdmmc_periph.o \
941+
esp32/soc_memory_layout.o \
942+
esp32/spi_periph.o \
943+
src/memory_layout_utils.o \
944+
)
945+
$(BOOTLOADER_LIB_DIR)/libsoc.a: $(BOOTLOADER_LIB_SOC_OBJ)
946+
$(ECHO) "AR $@"
947+
$(Q)$(AR) cr $@ $^
948+
949+
# libmain.a
950+
BOOTLOADER_LIB_ALL += main
951+
BOOTLOADER_LIB_MAIN_OBJ = $(addprefix $(BUILD)/bootloader/$(ESPCOMP)/,\
925952
bootloader/subproject/main/bootloader_start.o \
926953
)
954+
$(BOOTLOADER_LIB_DIR)/libmain.a: $(BOOTLOADER_LIB_MAIN_OBJ)
955+
$(ECHO) "AR $@"
956+
$(Q)$(AR) cr $@ $^
927957

928958
# all objects files
929959
BOOTLOADER_OBJ_ALL = \
930960
$(BOOTLOADER_LIB_BOOTLOADER_SUPPORT_OBJ) \
931961
$(BOOTLOADER_LIB_LOG_OBJ) \
932962
$(BOOTLOADER_LIB_SPI_FLASH_OBJ) \
933963
$(BOOTLOADER_LIB_MICRO_ECC_OBJ) \
934-
$(BOOTLOADER_OBJ)
964+
$(BOOTLOADER_LIB_SOC_OBJ) \
965+
$(BOOTLOADER_LIB_MAIN_OBJ)
935966

936967
$(BOOTLOADER_OBJ_ALL): $(SDKCONFIG_H)
937968

0 commit comments

Comments
 (0)
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy