diff --git a/arch/xtensa/src/esp32/esp32_allocateheap.c b/arch/xtensa/src/esp32/esp32_allocateheap.c index 484340affa..b37ed374d6 100644 --- a/arch/xtensa/src/esp32/esp32_allocateheap.c +++ b/arch/xtensa/src/esp32/esp32_allocateheap.c @@ -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. */ diff --git a/boards/xtensa/esp32/common/scripts/flat.template.ld b/boards/xtensa/esp32/common/scripts/flat_memory.ld similarity index 89% rename from boards/xtensa/esp32/common/scripts/flat.template.ld rename to boards/xtensa/esp32/common/scripts/flat_memory.ld index e5f53d7b9a..942d1794e8 100644 --- a/boards/xtensa/esp32/common/scripts/flat.template.ld +++ b/boards/xtensa/esp32/common/scripts/flat_memory.ld @@ -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. + * _sections.ld contains output sections to link compiler + * output into these memory blocks. * ****************************************************************************/ #include + #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 diff --git a/boards/xtensa/esp32/common/scripts/esp32.ld b/boards/xtensa/esp32/common/scripts/legacy_sections.ld similarity index 99% rename from boards/xtensa/esp32/common/scripts/esp32.ld rename to boards/xtensa/esp32/common/scripts/legacy_sections.ld index 0996b0955f..e0335d4eb5 100644 --- a/boards/xtensa/esp32/common/scripts/esp32.ld +++ b/boards/xtensa/esp32/common/scripts/legacy_sections.ld @@ -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 diff --git a/boards/xtensa/esp32/common/scripts/esp32_mcuboot.ld b/boards/xtensa/esp32/common/scripts/mcuboot_sections.ld similarity index 99% rename from boards/xtensa/esp32/common/scripts/esp32_mcuboot.ld rename to boards/xtensa/esp32/common/scripts/mcuboot_sections.ld index 8443b5ce01..21eefff381 100644 --- a/boards/xtensa/esp32/common/scripts/esp32_mcuboot.ld +++ b/boards/xtensa/esp32/common/scripts/mcuboot_sections.ld @@ -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 diff --git a/boards/xtensa/esp32/common/scripts/protected.template.ld b/boards/xtensa/esp32/common/scripts/protected_memory.ld similarity index 90% rename from boards/xtensa/esp32/common/scripts/protected.template.ld rename to boards/xtensa/esp32/common/scripts/protected_memory.ld index 5862de63b7..f22f8eb426 100644 --- a/boards/xtensa/esp32/common/scripts/protected.template.ld +++ b/boards/xtensa/esp32/common/scripts/protected_memory.ld @@ -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 @@ -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) } diff --git a/boards/xtensa/esp32/esp32-devkitc/scripts/Make.defs b/boards/xtensa/esp32/esp32-devkitc/scripts/Make.defs index 9425f18ac6..7b5f696dd1 100644 --- a/boards/xtensa/esp32/esp32-devkitc/scripts/Make.defs +++ b/boards/xtensa/esp32/esp32-devkitc/scripts/Make.defs @@ -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 diff --git a/boards/xtensa/esp32/esp32-ethernet-kit/scripts/Make.defs b/boards/xtensa/esp32/esp32-ethernet-kit/scripts/Make.defs index 1e3a48629c..11ab74a362 100644 --- a/boards/xtensa/esp32/esp32-ethernet-kit/scripts/Make.defs +++ b/boards/xtensa/esp32/esp32-ethernet-kit/scripts/Make.defs @@ -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 diff --git a/boards/xtensa/esp32/esp32-lyrat/scripts/Make.defs b/boards/xtensa/esp32/esp32-lyrat/scripts/Make.defs index e33d6ff2a3..cafd322df8 100644 --- a/boards/xtensa/esp32/esp32-lyrat/scripts/Make.defs +++ b/boards/xtensa/esp32/esp32-lyrat/scripts/Make.defs @@ -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 diff --git a/boards/xtensa/esp32/esp32-sparrow-kit/scripts/Make.defs b/boards/xtensa/esp32/esp32-sparrow-kit/scripts/Make.defs index 0658e7e273..caa093612a 100644 --- a/boards/xtensa/esp32/esp32-sparrow-kit/scripts/Make.defs +++ b/boards/xtensa/esp32/esp32-sparrow-kit/scripts/Make.defs @@ -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 diff --git a/boards/xtensa/esp32/esp32-wrover-kit/scripts/Make.defs b/boards/xtensa/esp32/esp32-wrover-kit/scripts/Make.defs index 026f791c23..da681591bf 100644 --- a/boards/xtensa/esp32/esp32-wrover-kit/scripts/Make.defs +++ b/boards/xtensa/esp32/esp32-wrover-kit/scripts/Make.defs @@ -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 diff --git a/boards/xtensa/esp32/lilygo_tbeam_lora_gps/scripts/Make.defs b/boards/xtensa/esp32/lilygo_tbeam_lora_gps/scripts/Make.defs index 89fe0afde0..772a2d5e47 100644 --- a/boards/xtensa/esp32/lilygo_tbeam_lora_gps/scripts/Make.defs +++ b/boards/xtensa/esp32/lilygo_tbeam_lora_gps/scripts/Make.defs @@ -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 diff --git a/boards/xtensa/esp32/ttgo_eink5_v2/scripts/Make.defs b/boards/xtensa/esp32/ttgo_eink5_v2/scripts/Make.defs index c83fdebbc8..ec0bac8e34 100644 --- a/boards/xtensa/esp32/ttgo_eink5_v2/scripts/Make.defs +++ b/boards/xtensa/esp32/ttgo_eink5_v2/scripts/Make.defs @@ -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 diff --git a/boards/xtensa/esp32/ttgo_lora_esp32/scripts/Make.defs b/boards/xtensa/esp32/ttgo_lora_esp32/scripts/Make.defs index 89fe0afde0..772a2d5e47 100644 --- a/boards/xtensa/esp32/ttgo_lora_esp32/scripts/Make.defs +++ b/boards/xtensa/esp32/ttgo_lora_esp32/scripts/Make.defs @@ -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 diff --git a/boards/xtensa/esp32/ttgo_t_display_esp32/scripts/Make.defs b/boards/xtensa/esp32/ttgo_t_display_esp32/scripts/Make.defs index f4528ed85c..f800c81dab 100644 --- a/boards/xtensa/esp32/ttgo_t_display_esp32/scripts/Make.defs +++ b/boards/xtensa/esp32/ttgo_t_display_esp32/scripts/Make.defs @@ -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