xtensa/esp32s2: Rename linker scripts into more meaningful names

Signed-off-by: Gustavo Henrique Nihei <gustavo.nihei@espressif.com>
This commit is contained in:
Gustavo Henrique Nihei
2022-12-07 12:16:44 -03:00
committed by Xiang Xiao
parent f78c6432d8
commit afd95058c0
5 changed files with 17 additions and 41 deletions
@@ -1,12 +1,12 @@
/**************************************************************************** /****************************************************************************
* boards/xtensa/esp32s2/common/scripts/esp32s2_memory.ld * boards/xtensa/esp32s2/common/scripts/flat_memory.ld
* ESP32-S2 Linker Script Memory Layout * ESP32-S2 Linker Script Memory Layout
* *
* This file describes the memory layout (memory blocks) as virtual * This file describes the memory layout (memory blocks) as virtual
* memory addresses. * memory addresses.
* *
* esp32s2_sections.ld contains output sections to link compiler output * <legacy/mcuboot>_sections.ld contains output sections to link compiler
* into these memory blocks. * output into these memory blocks.
* *
****************************************************************************/ ****************************************************************************/
@@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* boards/xtensa/esp32s2/common/scripts/esp32s2_sections.ld * boards/xtensa/esp32s2/common/scripts/legacy_sections.ld
****************************************************************************/ ****************************************************************************/
/* Default entry point: */ /* Default entry point: */
@@ -1,5 +1,5 @@
/**************************************************************************** /****************************************************************************
* boards/xtensa/esp32s2/common/scripts/esp32s2_mcuboot.ld * boards/xtensa/esp32s2/common/scripts/mcuboot_sections.ld
* *
* Licensed to the Apache Software Foundation (ASF) under one or more * Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with * contributor license agreements. See the NOTICE file distributed with
@@ -23,30 +23,18 @@ include $(TOPDIR)/tools/Config.mk
include $(TOPDIR)/tools/esp32s2/Config.mk include $(TOPDIR)/tools/esp32s2/Config.mk
include $(TOPDIR)/arch/xtensa/src/lx7/Toolchain.defs include $(TOPDIR)/arch/xtensa/src/lx7/Toolchain.defs
# Pick the linker scripts from the board level if they exist, if not
# pick the common linker scripts.
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32s2_rom.ld ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32s2_rom.ld
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32s2_peripherals.ld ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32s2_peripherals.ld
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s2_memory.ld),) # Pick the linker scripts from the board level if they exist, if not
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s2_memory.ld # pick the common linker scripts.
else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32s2_memory.ld ARCHSCRIPT += $(call FINDSCRIPT,flat_memory.ld)
endif
ifeq ($(CONFIG_ESP32S2_APP_FORMAT_MCUBOOT),y) ifeq ($(CONFIG_ESP32S2_APP_FORMAT_MCUBOOT),y)
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s2_mcuboot.ld),) ARCHSCRIPT += $(call FINDSCRIPT,mcuboot_sections.ld)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s2_mcuboot.ld
else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32s2_mcuboot.ld
endif
else else
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s2_sections.ld),) ARCHSCRIPT += $(call FINDSCRIPT,legacy_sections.ld)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s2_sections.ld
else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32s2_sections.ld
endif
endif endif
ARCHPICFLAGS = -fpic ARCHPICFLAGS = -fpic
@@ -23,30 +23,18 @@ include $(TOPDIR)/tools/Config.mk
include $(TOPDIR)/tools/esp32s2/Config.mk include $(TOPDIR)/tools/esp32s2/Config.mk
include $(TOPDIR)/arch/xtensa/src/lx7/Toolchain.defs include $(TOPDIR)/arch/xtensa/src/lx7/Toolchain.defs
# Pick the linker scripts from the board level if they exist, if not
# pick the common linker scripts.
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32s2_rom.ld ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32s2_rom.ld
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32s2_peripherals.ld ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32s2_peripherals.ld
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s2_memory.ld),) # Pick the linker scripts from the board level if they exist, if not
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s2_memory.ld # pick the common linker scripts.
else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32s2_memory.ld ARCHSCRIPT += $(call FINDSCRIPT,flat_memory.ld)
endif
ifeq ($(CONFIG_ESP32S2_APP_FORMAT_MCUBOOT),y) ifeq ($(CONFIG_ESP32S2_APP_FORMAT_MCUBOOT),y)
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s2_mcuboot.ld),) ARCHSCRIPT += $(call FINDSCRIPT,mcuboot_sections.ld)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s2_mcuboot.ld
else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32s2_mcuboot.ld
endif
else else
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s2_sections.ld),) ARCHSCRIPT += $(call FINDSCRIPT,legacy_sections.ld)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32s2_sections.ld
else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32s2_sections.ld
endif
endif endif
ARCHPICFLAGS = -fpic ARCHPICFLAGS = -fpic