From a173ffa81d15319fe733475e88dfb521e33407a6 Mon Sep 17 00:00:00 2001 From: Angus Gratton Date: Wed, 3 Jun 2015 14:29:56 +1000 Subject: [PATCH] Remove custom entry point, pending merge of esptool.py patch adding --entry-symbol option --- common.mk | 5 +++-- ld/eagle.app.v6.ld | 2 +- lib/symbols_norename.txt | 2 ++ 3 files changed, 6 insertions(+), 3 deletions(-) diff --git a/common.mk b/common.mk index 4c10f73..f972916 100644 --- a/common.mk +++ b/common.mk @@ -67,7 +67,8 @@ SDK_LIBS ?= main net80211 phy pp wpa # open source libraries linked in LIBS ?= gcc hal -ENTRY_SYMBOL ?= sdk_call_user_start +# Note: this isn't overridable without a not-yet-merged patch to esptool +ENTRY_SYMBOL = call_user_start CFLAGS = -Wall -Werror -Wl,-EL -nostdlib -mlongcalls -mtext-section-literals -std=gnu99 LDFLAGS = -nostdlib -Wl,--no-check-sections -Wl,-L$(BUILD_DIR)sdklib -Wl,-L$(ROOT)lib -u $(ENTRY_SYMBOL) -Wl,-static -Wl,-Map=build/${TARGET}.map @@ -220,7 +221,7 @@ $(BUILD_DIR) $(FW_BASE) $(BUILD_DIR)sdklib: $(FW_FILE_1) $(FW_FILE_2): $(TARGET_OUT) $(FW_BASE) $(vecho) "FW $@" - $(ESPTOOL) elf2image --entry-symbol $(ENTRY_SYMBOL) $< -o $(FW_BASE) + $(ESPTOOL) elf2image $< -o $(FW_BASE) flash: $(FW_FILE_1) $(FW_FILE_2) $(ESPTOOL) -p $(ESPPORT) --baud $(ESPBAUD) write_flash $(FW_1) $(FW_FILE_1) $(FW_2) $(FW_FILE_2) diff --git a/ld/eagle.app.v6.ld b/ld/eagle.app.v6.ld index 538a6c5..7cafba3 100644 --- a/ld/eagle.app.v6.ld +++ b/ld/eagle.app.v6.ld @@ -23,7 +23,7 @@ PHDRS /* Default entry point: */ -ENTRY(sdk_call_user_start) +ENTRY(call_user_start) EXTERN(sdk__DebugExceptionVector) EXTERN(sdk__DoubleExceptionVector) EXTERN(sdk__KernelExceptionVector) diff --git a/lib/symbols_norename.txt b/lib/symbols_norename.txt index 766c191..2a4b315 100644 --- a/lib/symbols_norename.txt +++ b/lib/symbols_norename.txt @@ -1,3 +1,5 @@ +# stop-gap until esptool.py patch for configurable entry point is merged +call_user_start # this is a stop-gap to avoid renaming some useful libc # symbols to sdk_xxx puts