Skip to content

Commit a763ed1

Browse files
tmediccixiaoxiang781216
authored andcommitted
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.
1 parent c8e56ff commit a763ed1

File tree

12 files changed

+32
-0
lines changed

12 files changed

+32
-0
lines changed

boards/risc-v/esp32c3-legacy/common/scripts/legacy_sections.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -245,7 +245,9 @@ SECTIONS
245245
.rtc.data :
246246
{
247247
*(.rtc.data)
248+
*(.rtc.data.*)
248249
*(.rtc.rodata)
250+
*(.rtc.rodata.*)
249251

250252
/* Whatever is left from the RTC memory is used as a special heap. */
251253

boards/risc-v/esp32c3-legacy/common/scripts/mcuboot_sections.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,7 +294,9 @@ SECTIONS
294294
.rtc.data :
295295
{
296296
*(.rtc.data)
297+
*(.rtc.data.*)
297298
*(.rtc.rodata)
299+
*(.rtc.rodata.*)
298300

299301
/* Whatever is left from the RTC memory is used as a special heap. */
300302

boards/risc-v/esp32c3/common/scripts/esp32c3_legacy_sections.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -265,7 +265,9 @@ SECTIONS
265265
.rtc.data :
266266
{
267267
*(.rtc.data)
268+
*(.rtc.data.*)
268269
*(.rtc.rodata)
270+
*(.rtc.rodata.*)
269271
} >rtc_iram_seg
270272

271273
/* This section holds RTC data that should have fixed addresses.

boards/risc-v/esp32c6/common/scripts/esp32c6_legacy_sections.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ SECTIONS
261261
.rtc.data :
262262
{
263263
*(.rtc.data)
264+
*(.rtc.data.*)
264265
*(.rtc.rodata)
266+
*(.rtc.rodata.*)
265267
} >lp_ram_seg
266268

267269
/* This section holds RTC data that should have fixed addresses.

boards/risc-v/esp32h2/common/scripts/esp32h2_legacy_sections.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -261,7 +261,9 @@ SECTIONS
261261
.rtc.data :
262262
{
263263
*(.rtc.data)
264+
*(.rtc.data.*)
264265
*(.rtc.rodata)
266+
*(.rtc.rodata.*)
265267
} >lp_ram_seg
266268

267269
/* This section holds RTC data that should have fixed addresses.

boards/xtensa/esp32/common/scripts/legacy_sections.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -359,7 +359,9 @@ SECTIONS
359359
.rtc.data :
360360
{
361361
*(.rtc.data)
362+
*(.rtc.data.*)
362363
*(.rtc.rodata)
364+
*(.rtc.rodata.*)
363365

364366
/* Whatever is left from the RTC memory is used as a special heap. */
365367

boards/xtensa/esp32/common/scripts/mcuboot_sections.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -313,7 +313,9 @@ SECTIONS
313313
.rtc.data :
314314
{
315315
*(.rtc.data)
316+
*(.rtc.data.*)
316317
*(.rtc.rodata)
318+
*(.rtc.rodata.*)
317319

318320
/* Whatever is left from the RTC memory is used as a special heap. */
319321

boards/xtensa/esp32/common/scripts/simple_boot_sections.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -537,7 +537,9 @@ SECTIONS
537537
.rtc.data :
538538
{
539539
*(.rtc.data)
540+
*(.rtc.data.*)
540541
*(.rtc.rodata)
542+
*(.rtc.rodata.*)
541543

542544
/* Whatever is left from the RTC memory is used as a special heap. */
543545

boards/xtensa/esp32s2/common/scripts/mcuboot_sections.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -337,7 +337,9 @@ SECTIONS
337337
.rtc.data :
338338
{
339339
*(.rtc.data)
340+
*(.rtc.data.*)
340341
*(.rtc.rodata)
342+
*(.rtc.rodata.*)
341343

342344
/* Whatever is left from the RTC memory is used as a special heap. */
343345

boards/xtensa/esp32s2/common/scripts/simple_boot_sections.ld

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -418,7 +418,9 @@ SECTIONS
418418
.rtc.data :
419419
{
420420
*(.rtc.data)
421+
*(.rtc.data.*)
421422
*(.rtc.rodata)
423+
*(.rtc.rodata.*)
422424

423425
/* Whatever is left from the RTC memory is used as a special heap. */
424426

0 commit comments

Comments
 (0)