This is an automated email from the ASF dual-hosted git repository.
xiaoxiang pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/nuttx.git
The following commit(s) were added to refs/heads/master by this push:
new 88f62fd3222 boards/xtensa/esp32: add rtc_reserved_seg to
legacy_sections
88f62fd3222 is described below
commit 88f62fd3222ea733b956e2d1e8bdb84530d6df38
Author: Laczen JMS <[email protected]>
AuthorDate: Mon Jan 19 17:16:33 2026 +0100
boards/xtensa/esp32: add rtc_reserved_seg to legacy_sections
Enable building the legacy idf format of nuttx when rtc is enabled.
Without this addition the build fails because the rtc data is placed in
rom.
Signed-off-by: Laczen JMS <[email protected]>
---
boards/xtensa/esp32/common/scripts/legacy_sections.ld | 17 +++++++++++++++++
1 file changed, 17 insertions(+)
diff --git a/boards/xtensa/esp32/common/scripts/legacy_sections.ld
b/boards/xtensa/esp32/common/scripts/legacy_sections.ld
index 4c960f3be64..1442432f664 100644
--- a/boards/xtensa/esp32/common/scripts/legacy_sections.ld
+++ b/boards/xtensa/esp32/common/scripts/legacy_sections.ld
@@ -384,4 +384,21 @@ SECTIONS
. = ALIGN (4);
_srtcheap = ABSOLUTE(.);
} > rtc_slow_seg
+
+ /*
+ * This section holds RTC data that should have fixed addresses.
+ * The data are not initialized at power-up and are retained during deep
sleep.
+ */
+ .rtc_reserved (NOLOAD):
+ {
+ . = ALIGN(4);
+ _rtc_reserved_start = ABSOLUTE(.);
+ /* New data can only be added here to ensure existing data are not moved.
+ Because data have adhered to the end of the segment and code is relied
on it.
+ >> put new data here << */
+
+ *(.rtc_timer_data_in_rtc_mem .rtc_timer_data_in_rtc_mem.*)
+ KEEP(*(.bootloader_data_rtc_mem .bootloader_data_rtc_mem.*))
+ _rtc_reserved_end = ABSOLUTE(.);
+ } > rtc_reserved_seg
}