Skip to content

Commit

Permalink
Removed symbol stripping from the binary. It was preventing the gener…
Browse files Browse the repository at this point in the history
…ation of correct memory information and did not affect the generated firmware. (#1650)
  • Loading branch information
slaff authored Mar 19, 2019
1 parent 77c1113 commit b52b380
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 14 deletions.
8 changes: 0 additions & 8 deletions Sming/Makefile-project.mk
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,6 @@ export COMPILE := gcc
export PATH := $(ESP_HOME)/xtensa-lx106-elf/bin:$(PATH)
XTENSA_TOOLS_ROOT := $(ESP_HOME)/xtensa-lx106-elf/bin

STRIP := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-strip

CURRENT_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST))))

SPIFF_FILES ?= files
Expand Down Expand Up @@ -277,10 +275,8 @@ else ifeq ($(ENABLE_GDB), 1)
CFLAGS += -Og -ggdb -DGDBSTUB_FREERTOS=0 -DENABLE_GDB=1 -DGDBSTUB_CTRLC_BREAK=0
MODULES += $(THIRD_PARTY_DIR)/esp-gdbstub
EXTRA_INCDIR += $(THIRD_PARTY_DIR)/esp-gdbstub
STRIP := @true
else
CFLAGS += -Os -g
STRIP := @true
endif
ifeq ($(ENABLE_WPS),1)
CFLAGS += -DENABLE_WPS=1
Expand Down Expand Up @@ -453,8 +449,6 @@ $(PROJECT_LD_PATH)/$(LD_SCRIPT):
$(FW_BASE)/$(IMAGE_MAIN): $(APP_AR)
# Pass 1: Generate rom0 to be able to check its size
$(Q) $(LD) -L$(USER_LIBDIR) -L$(SDK_LIBDIR) -L$(LD_PATH) -T$(LD_SCRIPT) $(LDFLAGS) -Wl,--start-group $(LIBS) $(APP_AR) -Wl,--end-group -o $(TARGET_OUT).tmp

$(Q) $(STRIP) $(TARGET_OUT).tmp

$(Q) $(ESPTOOL2) $(ESPTOOL2_MAIN_ARGS) $(TARGET_OUT).tmp $@ $(ESPTOOL2_SECTS)

Expand All @@ -469,8 +463,6 @@ $(TARGET_OUT): $(FW_BASE)/$(IMAGE_MAIN) $(PROJECT_LD_PATH)/$(LD_SCRIPT)
# Pass 2: Generate roms with correct offsets
$(Q) $(LD) -L$(USER_LIBDIR) -L$(SDK_LIBDIR) -L$(PROJECT_LD_PATH) -L$(LD_PATH) -T$(LD_SCRIPT) $(LDFLAGS) -Wl,--start-group $(LIBS) $(APP_AR) -Wl,--end-group -o $@

$(Q) $(STRIP) $@

$(vecho) ""
$(vecho) "#Memory / Section info:"
$(vecho) "------------------------------------------------------------------------------"
Expand Down
6 changes: 0 additions & 6 deletions Sming/Makefile-rboot.mk
Original file line number Diff line number Diff line change
Expand Up @@ -184,8 +184,6 @@ export COMPILE := gcc
export PATH := $(ESP_HOME)/xtensa-lx106-elf/bin:$(PATH)
XTENSA_TOOLS_ROOT := $(ESP_HOME)/xtensa-lx106-elf/bin

STRIP := $(XTENSA_TOOLS_ROOT)/xtensa-lx106-elf-strip

CURRENT_DIR := $(dir $(abspath $(firstword $(MAKEFILE_LIST))))

SPIFF_FILES ?= files
Expand Down Expand Up @@ -256,10 +254,8 @@ else ifeq ($(ENABLE_GDB), 1)
CFLAGS += -Og -ggdb -DGDBSTUB_FREERTOS=0 -DENABLE_GDB=1 -DGDBSTUB_CTRLC_BREAK=0
MODULES += $(THIRD_PARTY_DIR)/esp-gdbstub
EXTRA_INCDIR += $(THIRD_PARTY_DIR)/esp-gdbstub
STRIP := @true
else
CFLAGS += -Os -g
STRIP := @true
endif
ifeq ($(ENABLE_WPS),1)
CFLAGS += -DENABLE_WPS=1
Expand Down Expand Up @@ -545,7 +541,6 @@ $(RBOOT_ROM_1): $(TARGET_OUT_1)
$(TARGET_OUT_0): $(APP_AR)
$(vecho) "LD $@"
$(Q) $(LD) -L$(USER_LIBDIR) -L$(SDK_LIBDIR) -L$(BUILD_BASE) -L$(SMING_HOME)/compiler/ld $(RBOOT_LD_0) $(LDFLAGS) -Wl,--start-group $(APP_AR) $(LIBS) -Wl,--end-group -o $@
$(Q) $(STRIP) $@

$(Q) $(MEMANALYZER) $@ > $(FW_MEMINFO_NEW)

Expand All @@ -559,7 +554,6 @@ $(TARGET_OUT_0): $(APP_AR)
$(TARGET_OUT_1): $(APP_AR)
$(vecho) "LD $@"
$(Q) $(LD) -L$(USER_LIBDIR) -L$(SDK_LIBDIR) -L$(BUILD_BASE) -L$(SMING_HOME)/compiler/ld $(RBOOT_LD_1) $(LDFLAGS) -Wl,--start-group $(APP_AR) $(LIBS) -Wl,--end-group -o $@
$(Q) $(STRIP) $@

# recreate it from 0, since you get into problems with same filenames
$(APP_AR): $(OBJ)
Expand Down

0 comments on commit b52b380

Please sign in to comment.