espressif: Fix build with RTC

This commit ensures that RTC data is properly allocated in the RTC
segment in the linker. This fixes the reported problem about using
the legacy bootloader and RTC.
This commit is contained in:
Tiago Medicci Serrano
2024-08-27 17:39:54 -03:00
committed by Xiang Xiao
parent c8e56ff63a
commit a763ed1e07
12 changed files with 32 additions and 0 deletions
@@ -245,7 +245,9 @@ SECTIONS
.rtc.data : .rtc.data :
{ {
*(.rtc.data) *(.rtc.data)
*(.rtc.data.*)
*(.rtc.rodata) *(.rtc.rodata)
*(.rtc.rodata.*)
/* Whatever is left from the RTC memory is used as a special heap. */ /* Whatever is left from the RTC memory is used as a special heap. */
@@ -294,7 +294,9 @@ SECTIONS
.rtc.data : .rtc.data :
{ {
*(.rtc.data) *(.rtc.data)
*(.rtc.data.*)
*(.rtc.rodata) *(.rtc.rodata)
*(.rtc.rodata.*)
/* Whatever is left from the RTC memory is used as a special heap. */ /* Whatever is left from the RTC memory is used as a special heap. */
@@ -265,7 +265,9 @@ SECTIONS
.rtc.data : .rtc.data :
{ {
*(.rtc.data) *(.rtc.data)
*(.rtc.data.*)
*(.rtc.rodata) *(.rtc.rodata)
*(.rtc.rodata.*)
} >rtc_iram_seg } >rtc_iram_seg
/* This section holds RTC data that should have fixed addresses. /* This section holds RTC data that should have fixed addresses.
@@ -261,7 +261,9 @@ SECTIONS
.rtc.data : .rtc.data :
{ {
*(.rtc.data) *(.rtc.data)
*(.rtc.data.*)
*(.rtc.rodata) *(.rtc.rodata)
*(.rtc.rodata.*)
} >lp_ram_seg } >lp_ram_seg
/* This section holds RTC data that should have fixed addresses. /* This section holds RTC data that should have fixed addresses.
@@ -261,7 +261,9 @@ SECTIONS
.rtc.data : .rtc.data :
{ {
*(.rtc.data) *(.rtc.data)
*(.rtc.data.*)
*(.rtc.rodata) *(.rtc.rodata)
*(.rtc.rodata.*)
} >lp_ram_seg } >lp_ram_seg
/* This section holds RTC data that should have fixed addresses. /* This section holds RTC data that should have fixed addresses.
@@ -359,7 +359,9 @@ SECTIONS
.rtc.data : .rtc.data :
{ {
*(.rtc.data) *(.rtc.data)
*(.rtc.data.*)
*(.rtc.rodata) *(.rtc.rodata)
*(.rtc.rodata.*)
/* Whatever is left from the RTC memory is used as a special heap. */ /* Whatever is left from the RTC memory is used as a special heap. */
@@ -313,7 +313,9 @@ SECTIONS
.rtc.data : .rtc.data :
{ {
*(.rtc.data) *(.rtc.data)
*(.rtc.data.*)
*(.rtc.rodata) *(.rtc.rodata)
*(.rtc.rodata.*)
/* Whatever is left from the RTC memory is used as a special heap. */ /* Whatever is left from the RTC memory is used as a special heap. */
@@ -537,7 +537,9 @@ SECTIONS
.rtc.data : .rtc.data :
{ {
*(.rtc.data) *(.rtc.data)
*(.rtc.data.*)
*(.rtc.rodata) *(.rtc.rodata)
*(.rtc.rodata.*)
/* Whatever is left from the RTC memory is used as a special heap. */ /* Whatever is left from the RTC memory is used as a special heap. */
@@ -337,7 +337,9 @@ SECTIONS
.rtc.data : .rtc.data :
{ {
*(.rtc.data) *(.rtc.data)
*(.rtc.data.*)
*(.rtc.rodata) *(.rtc.rodata)
*(.rtc.rodata.*)
/* Whatever is left from the RTC memory is used as a special heap. */ /* Whatever is left from the RTC memory is used as a special heap. */
@@ -418,7 +418,9 @@ SECTIONS
.rtc.data : .rtc.data :
{ {
*(.rtc.data) *(.rtc.data)
*(.rtc.data.*)
*(.rtc.rodata) *(.rtc.rodata)
*(.rtc.rodata.*)
/* Whatever is left from the RTC memory is used as a special heap. */ /* Whatever is left from the RTC memory is used as a special heap. */
@@ -386,10 +386,20 @@ SECTIONS
_iram_end = ABSOLUTE(.); _iram_end = ABSOLUTE(.);
} >iram0_0_seg } >iram0_0_seg
/* RTC BSS section. */
.rtc.bss (NOLOAD) :
{
*(.rtc.bss)
} >rtc_slow_seg
.rtc.data : .rtc.data :
{ {
. = ALIGN(4);
*(.rtc.data) *(.rtc.data)
*(.rtc.data.*)
*(.rtc.rodata) *(.rtc.rodata)
*(.rtc.rodata.*)
/* Whatever is left from the RTC memory is used as a special heap. */ /* Whatever is left from the RTC memory is used as a special heap. */
@@ -465,7 +465,9 @@ SECTIONS
.rtc.data : .rtc.data :
{ {
*(.rtc.data) *(.rtc.data)
*(.rtc.data.*)
*(.rtc.rodata) *(.rtc.rodata)
*(.rtc.rodata.*)
/* Whatever is left from the RTC memory is used as a special heap. */ /* Whatever is left from the RTC memory is used as a special heap. */