xtensa/esp32: 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-06 19:05:30 -03:00 committed by Xiang Xiao
parent 1c7a9d282c
commit 236ee5c80d
14 changed files with 88 additions and 95 deletions

View File

@ -121,7 +121,7 @@ void up_allocate_heap(void **heap_start, size_t *heap_size)
void up_allocate_kheap(void **heap_start, size_t *heap_size)
{
/* These values come from the linker scripts (kernel-space.ld and
* protected.template.ld).
* protected_memory.ld).
* Check boards/xtensa/esp32.
*/

View File

@ -1,5 +1,5 @@
/****************************************************************************
* boards/xtensa/esp32/common/scripts/flat.template.ld
* boards/xtensa/esp32/common/scripts/flat_memory.ld
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -24,16 +24,13 @@
* This file describes the memory layout (memory blocks) as virtual
* memory addresses.
*
* esp32.ld contains output sections to link compiler output into these
* memory blocks.
*
* NOTE: That this is not the actual linker script but rather a "template"
* for the esp32_out.ld script. This template script is passed through
* the C preprocessor to include selected configuration options.
* <legacy/mcuboot>_sections.ld contains output sections to link compiler
* output into these memory blocks.
*
****************************************************************************/
#include <nuttx/config.h>
#include "esp32_aliases.ld"
#ifdef CONFIG_ESP32_FLASH_2M
@ -59,8 +56,8 @@ MEMORY
*/
metadata (RX) : org = CONFIG_ESP32_APP_MCUBOOT_HEADER_SIZE, len = 0x20
ROM (RX) : org = CONFIG_ESP32_APP_MCUBOOT_HEADER_SIZE + 0x20,
len = FLASH_SIZE - (CONFIG_ESP32_APP_MCUBOOT_HEADER_SIZE + 0x20)
ROM (RX) : org = ORIGIN(metadata) + LENGTH(metadata),
len = FLASH_SIZE - ORIGIN(ROM)
#endif
/* Below values assume the flash cache is on, and have the blocks this
@ -117,8 +114,8 @@ MEMORY
* be equal.
*/
drom0_0_seg (R) : org = 0x3f400000 + (CONFIG_ESP32_APP_MCUBOOT_HEADER_SIZE + 0x20),
len = FLASH_SIZE - (CONFIG_ESP32_APP_MCUBOOT_HEADER_SIZE + 0x20)
drom0_0_seg (R) : org = 0x3f400000 + ORIGIN(ROM),
len = FLASH_SIZE - ORIGIN(ROM)
#else
/* The 0x20 offset is a convenience for the app binary image generation.
* Flash cache has 64KB pages. The .bin file which is flashed to the chip

View File

@ -1,5 +1,5 @@
/****************************************************************************
* boards/xtensa/esp32/common/scripts/esp32.ld
* boards/xtensa/esp32/common/scripts/legacy_sections.ld
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/****************************************************************************
* boards/xtensa/esp32/common/scripts/esp32_mcuboot.ld
* boards/xtensa/esp32/common/scripts/mcuboot_sections.ld
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with

View File

@ -1,5 +1,5 @@
/****************************************************************************
* boards/xtensa/esp32/common/scripts/protected.template.ld
* boards/xtensa/esp32/common/scripts/protected_memory.ld
*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
@ -19,7 +19,7 @@
****************************************************************************/
/****************************************************************************
* ESP32 Linker Script Memory Layout
* ESP32 Linker Script Memory Layout for Protected Mode
*
* This file describes the memory layout (memory blocks) as virtual
* memory addresses.
@ -28,10 +28,6 @@
* output into these memory blocks for the Kernel and User images,
* respectively.
*
* NOTE: That this is not the actual linker script but rather a "template"
* for the esp32_out.ld script. This template script is passed through
* the C preprocessor to include selected configuration options.
*
****************************************************************************/
#include <nuttx/config.h>
@ -40,9 +36,9 @@
MEMORY
{
metadata (RX) : org = 0x0, len = 0x18
ROM (RX) : org = 0x18, len = 0x100000
ROM (RX) : org = ORIGIN(metadata) + LENGTH(metadata),
len = 0x100000 - ORIGIN(ROM)
/* Below values assume the flash cache is on, and have the blocks this
* uses subtracted from the length of the various regions. The 'data access
@ -105,5 +101,5 @@ MEMORY
*/
KDROM (R) : org = 0x3f400020, len = 0x80000 - 0x20
UDROM (R) : org = 0x3f480018, len = 0x80000 - 0x18
UDROM (R) : org = 0x3f480018, len = 0x80000 - ORIGIN(ROM)
}

View File

@ -31,16 +31,16 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_out.ld
# Pick the linker scripts from the board level if they exist, if not
# pick the common linker scripts.
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.ld),)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.ld
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_sections.ld),)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_sections.ld
else
ifeq ($(CONFIG_BUILD_PROTECTED),y)
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld
else
ifeq ($(CONFIG_ESP32_APP_FORMAT_MCUBOOT),y)
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32_mcuboot.ld
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)mcuboot_sections.ld
else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32.ld
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)legacy_sections.ld
endif
endif
endif
@ -51,13 +51,13 @@ else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32_rom.ld
endif
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.template.ld),)
LDSCRIPT_TEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.template.ld
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_memory.ld),)
LDSCRIPT_TEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_memory.ld
else
ifeq ($(CONFIG_BUILD_PROTECTED),y)
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)protected.template.ld
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)protected_memory.ld
else
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)flat.template.ld
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)flat_memory.ld
endif
endif

View File

@ -31,16 +31,16 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_out.ld
# Pick the linker scripts from the board level if they exist, if not
# pick the common linker scripts.
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.ld),)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.ld
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_sections.ld),)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_sections.ld
else
ifeq ($(CONFIG_BUILD_PROTECTED),y)
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld
else
ifeq ($(CONFIG_ESP32_APP_FORMAT_MCUBOOT),y)
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32_mcuboot.ld
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)mcuboot_sections.ld
else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32.ld
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)legacy_sections.ld
endif
endif
endif
@ -51,13 +51,13 @@ else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32_rom.ld
endif
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.template.ld),)
LDSCRIPT_TEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.template.ld
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_memory.ld),)
LDSCRIPT_TEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_memory.ld
else
ifeq ($(CONFIG_BUILD_PROTECTED),y)
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)protected.template.ld
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)protected_memory.ld
else
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)flat.template.ld
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)flat_memory.ld
endif
endif

View File

@ -31,16 +31,16 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_out.ld
# Pick the linker scripts from the board level if they exist, if not
# pick the common linker scripts.
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.ld),)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.ld
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_sections.ld),)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_sections.ld
else
ifeq ($(CONFIG_BUILD_PROTECTED),y)
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld
else
ifeq ($(CONFIG_ESP32_APP_FORMAT_MCUBOOT),y)
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32_mcuboot.ld
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)mcuboot_sections.ld
else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32.ld
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)legacy_sections.ld
endif
endif
endif
@ -51,13 +51,13 @@ else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32_rom.ld
endif
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.template.ld),)
LDSCRIPT_TEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.template.ld
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_memory.ld),)
LDSCRIPT_TEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_memory.ld
else
ifeq ($(CONFIG_BUILD_PROTECTED),y)
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)protected.template.ld
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)protected_memory.ld
else
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)flat.template.ld
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)flat_memory.ld
endif
endif

View File

@ -31,16 +31,16 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_out.ld
# Pick the linker scripts from the board level if they exist, if not
# pick the common linker scripts.
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.ld),)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.ld
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_sections.ld),)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_sections.ld
else
ifeq ($(CONFIG_BUILD_PROTECTED),y)
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld
else
ifeq ($(CONFIG_ESP32_APP_FORMAT_MCUBOOT),y)
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32_mcuboot.ld
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)mcuboot_sections.ld
else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32.ld
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)legacy_sections.ld
endif
endif
endif
@ -51,13 +51,13 @@ else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32_rom.ld
endif
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.template.ld),)
LDSCRIPT_TEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.template.ld
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_memory.ld),)
LDSCRIPT_TEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_memory.ld
else
ifeq ($(CONFIG_BUILD_PROTECTED),y)
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)protected.template.ld
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)protected_memory.ld
else
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)flat.template.ld
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)flat_memory.ld
endif
endif

View File

@ -31,16 +31,16 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_out.ld
# Pick the linker scripts from the board level if they exist, if not
# pick the common linker scripts.
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.ld),)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.ld
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_sections.ld),)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_sections.ld
else
ifeq ($(CONFIG_BUILD_PROTECTED),y)
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld
else
ifeq ($(CONFIG_ESP32_APP_FORMAT_MCUBOOT),y)
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32_mcuboot.ld
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)mcuboot_sections.ld
else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32.ld
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)legacy_sections.ld
endif
endif
endif
@ -51,13 +51,13 @@ else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32_rom.ld
endif
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.template.ld),)
LDSCRIPT_TEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.template.ld
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_memory.ld),)
LDSCRIPT_TEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_memory.ld
else
ifeq ($(CONFIG_BUILD_PROTECTED),y)
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)protected.template.ld
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)protected_memory.ld
else
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)flat.template.ld
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)flat_memory.ld
endif
endif

View File

@ -31,16 +31,16 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_out.ld
# Pick the linker scripts from the board level if they exist, if not
# pick the common linker scripts.
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.ld),)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.ld
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_sections.ld),)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_sections.ld
else
ifeq ($(CONFIG_BUILD_PROTECTED),y)
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld
else
ifeq ($(CONFIG_ESP32_APP_FORMAT_MCUBOOT),y)
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32_mcuboot.ld
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)mcuboot_sections.ld
else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32.ld
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)legacy_sections.ld
endif
endif
endif
@ -51,13 +51,13 @@ else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32_rom.ld
endif
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.template.ld),)
LDSCRIPT_TEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.template.ld
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_memory.ld),)
LDSCRIPT_TEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_memory.ld
else
ifeq ($(CONFIG_BUILD_PROTECTED),y)
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)protected.template.ld
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)protected_memory.ld
else
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)flat.template.ld
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)flat_memory.ld
endif
endif

View File

@ -31,16 +31,16 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_out.ld
# Pick the linker scripts from the board level if they exist, if not
# pick the common linker scripts.
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.ld),)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.ld
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_sections.ld),)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_sections.ld
else
ifeq ($(CONFIG_BUILD_PROTECTED),y)
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld
else
ifeq ($(CONFIG_ESP32_APP_FORMAT_MCUBOOT),y)
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32_mcuboot.ld
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)mcuboot_sections.ld
else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32.ld
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)legacy_sections.ld
endif
endif
endif
@ -51,13 +51,13 @@ else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32_rom.ld
endif
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.template.ld),)
LDSCRIPT_TEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.template.ld
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_memory.ld),)
LDSCRIPT_TEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_memory.ld
else
ifeq ($(CONFIG_BUILD_PROTECTED),y)
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)protected.template.ld
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)protected_memory.ld
else
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)flat.template.ld
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)flat_memory.ld
endif
endif

View File

@ -31,16 +31,16 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_out.ld
# Pick the linker scripts from the board level if they exist, if not
# pick the common linker scripts.
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.ld),)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.ld
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_sections.ld),)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_sections.ld
else
ifeq ($(CONFIG_BUILD_PROTECTED),y)
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld
else
ifeq ($(CONFIG_ESP32_APP_FORMAT_MCUBOOT),y)
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32_mcuboot.ld
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)mcuboot_sections.ld
else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32.ld
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)legacy_sections.ld
endif
endif
endif
@ -51,13 +51,13 @@ else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32_rom.ld
endif
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.template.ld),)
LDSCRIPT_TEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.template.ld
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_memory.ld),)
LDSCRIPT_TEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_memory.ld
else
ifeq ($(CONFIG_BUILD_PROTECTED),y)
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)protected.template.ld
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)protected_memory.ld
else
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)flat.template.ld
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)flat_memory.ld
endif
endif

View File

@ -31,16 +31,16 @@ ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_out.ld
# Pick the linker scripts from the board level if they exist, if not
# pick the common linker scripts.
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.ld),)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.ld
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_sections.ld),)
ARCHSCRIPT += $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_sections.ld
else
ifeq ($(CONFIG_BUILD_PROTECTED),y)
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)kernel-space.ld
else
ifeq ($(CONFIG_ESP32_APP_FORMAT_MCUBOOT),y)
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32_mcuboot.ld
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)mcuboot_sections.ld
else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32.ld
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)legacy_sections.ld
endif
endif
endif
@ -51,13 +51,13 @@ else
ARCHSCRIPT += $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)esp32_rom.ld
endif
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.template.ld),)
LDSCRIPT_TEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32.template.ld
ifneq ($(wildcard $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_memory.ld),)
LDSCRIPT_TEMPLATE = $(BOARD_DIR)$(DELIM)scripts$(DELIM)esp32_memory.ld
else
ifeq ($(CONFIG_BUILD_PROTECTED),y)
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)protected.template.ld
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)protected_memory.ld
else
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)flat.template.ld
LDSCRIPT_TEMPLATE = $(BOARD_COMMON_DIR)$(DELIM)scripts$(DELIM)flat_memory.ld
endif
endif