ESP32: Correct logic to auto-generate esp_out.ld linker script

This commit is contained in:
Gregory Nutt 2016-10-18 11:30:30 -06:00
parent e72fab6f26
commit 6d974a8c69
3 changed files with 13 additions and 6 deletions

View File

@ -124,8 +124,9 @@ endif
depend: .depend
context: $(EXTRA_CONTEXT_DEPENDENCY)
$(EXTRA_CONTEXT)
ifneq ($(BOARD_CONTEXT),y)
context:
endif
clean:
$(call DELFILE, libboard$(LIBEXT))

View File

@ -1,5 +1,5 @@
/****************************************************************************
* configs/elf32-core/scripts/esp32.ld
* configs/elf32-core/scripts/esp32.template
* ESP32 Linker Script Memory Layout
*
* This file describes the memory layout (memory blocks) as virtual

View File

@ -41,13 +41,19 @@ CONFIGFILE = $(TOPDIR)$(DELIM)include$(DELIM)nuttx$(DELIM)config.h
ASRCS =
CSRCS =
SCRIPTIN = esp32.ld
SCRIPTOUT = esp32_out.ld
SCRIPTIN = $(SCRIPTDIR)$(DELIM)esp32.template
SCRIPTOUT = $(SCRIPTDIR)$(DELIM)esp32_out.ld
BOARD_CONTEXT = y
EXTRA_CLEAN =
EXTRA_DISTCLEAN = $(call DELFILE, $(SCRIPTOUT))
.PHONY = context
include $(TOPDIR)/configs/Board.mk
$(SCRIPTOUT): $(SCRIPTIN) $(CONFIGFILE)
$(call PREPROCESS, $<, $(SCRIPTIN))
# $(call PREPROCESS, $(SCRIPTIN), $@)
$(Q) $(CC) -isystem $(TOPDIR)/include -C -P -x c -E $(SCRIPTIN) -o $@
context: $(SCRIPTOUT)