diff --git a/configs/Board.mk b/configs/Board.mk index af932faa47..11f0ed4dc2 100644 --- a/configs/Board.mk +++ b/configs/Board.mk @@ -124,8 +124,9 @@ endif depend: .depend -context: $(EXTRA_CONTEXT_DEPENDENCY) - $(EXTRA_CONTEXT) +ifneq ($(BOARD_CONTEXT),y) +context: +endif clean: $(call DELFILE, libboard$(LIBEXT)) diff --git a/configs/esp32-core/scripts/esp32.ld b/configs/esp32-core/scripts/esp32.template similarity index 98% rename from configs/esp32-core/scripts/esp32.ld rename to configs/esp32-core/scripts/esp32.template index 68c0c73cf8..9fbe0f1ccc 100644 --- a/configs/esp32-core/scripts/esp32.ld +++ b/configs/esp32-core/scripts/esp32.template @@ -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 diff --git a/configs/esp32-core/src/Makefile b/configs/esp32-core/src/Makefile index 48b013f367..8abf354d6f 100644 --- a/configs/esp32-core/src/Makefile +++ b/configs/esp32-core/src/Makefile @@ -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)