From 27542b3b09665a07460f0beb613593bbc2a9c803 Mon Sep 17 00:00:00 2001 From: Laczen JMS Date: Tue, 27 Jan 2026 10:04:13 +0100 Subject: [PATCH] boards/xtensa/esp32: remove alignments for simpleboot The simpleboot format does not require alignment sections to be inserted as they are added by esptool.py Signed-off-by: Laczen JMS --- .../esp32/common/scripts/esp32_sections.ld | 25 ++++++++----------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/boards/xtensa/esp32/common/scripts/esp32_sections.ld b/boards/xtensa/esp32/common/scripts/esp32_sections.ld index 45aa551873c..03ca37c6976 100644 --- a/boards/xtensa/esp32/common/scripts/esp32_sections.ld +++ b/boards/xtensa/esp32/common/scripts/esp32_sections.ld @@ -533,16 +533,14 @@ SECTIONS * i.e. the lower 16 bits of both the virtual address (address seen by the * CPU) and the load address (physical address of the external flash) must * be equal. + * For the simpleboot format this is done by esptool. */ -#ifndef CONFIG_ESP32_APP_FORMAT_MCUBOOT - .flash.rodata_dummy (NOLOAD) : - { - . = ALIGN(0x10000); - } > ROM -#endif - +#ifdef CONFIG_ESP32_APP_FORMAT_MCUBOOT .flash.rodata : ALIGN(0x10000) +#else + .flash.rodata : +#endif { _rodata_reserved_start = ABSOLUTE(.); @@ -666,17 +664,14 @@ SECTIONS * i.e. the lower 16 bits of both the virtual address (address seen by the * CPU) and the load address (physical address of the external flash) must * be equal. + * For the simpleboot format this is done by esptool. */ -#ifndef CONFIG_ESP32_APP_FORMAT_MCUBOOT - .flash.text_dummy (NOLOAD) : - { - . += SIZEOF(.flash.rodata); - . = ALIGN(0x10000); - } >default_code_seg AT> ROM -#endif - +#ifdef CONFIG_ESP32_APP_FORMAT_MCUBOOT .flash.text : ALIGN(0x00010000) +#else + .flash.text : +#endif { _stext = .; _text_start = ABSOLUTE(.);