From 0e52b9d23055bae5905ee9a2099a6f24ab0308e1 Mon Sep 17 00:00:00 2001 From: Martin Vychodil Date: Tue, 22 Feb 2022 12:39:42 +0100 Subject: [PATCH] System: Memory section .rtc.dummy removed ESP32H2 doesn't support access to RTC memory through various buses, thus .rtc.dummy section makes no sense here. The section is used for blind padding in LD script - to provide proper section offsets) --- .../esp_system/ld/esp32h2/sections.ld.in | 25 ++++++++----------- 1 file changed, 11 insertions(+), 14 deletions(-) diff --git a/components/esp_system/ld/esp32h2/sections.ld.in b/components/esp_system/ld/esp32h2/sections.ld.in index eaf8a5a41b..f80493f1fd 100644 --- a/components/esp_system/ld/esp32h2/sections.ld.in +++ b/components/esp_system/ld/esp32h2/sections.ld.in @@ -16,25 +16,20 @@ SECTIONS .rtc.text : { . = ALIGN(4); + _rtc_fast_start = ABSOLUTE(.); mapping[rtc_text] *rtc_wake_stub*.*(.literal .text .literal.* .text.*) + *(.rtc_text_end_test) + + /* 16B padding for possible CPU prefetch and 4B alignment for PMS split lines */ + . += _esp_memprot_prefetch_pad_size; + . = ALIGN(4); + _rtc_text_end = ABSOLUTE(.); } > rtc_iram_seg - /** - * This section is required to skip rtc.text area because rtc_iram_seg and - * rtc_data_seg are reflect the same address space on different buses. - */ - .rtc.dummy : - { - _rtc_dummy_start = ABSOLUTE(.); - _rtc_fast_start = ABSOLUTE(.); - . = SIZEOF(.rtc.text); - _rtc_dummy_end = ABSOLUTE(.); - } > rtc_data_seg - /** * This section located in RTC FAST Memory area. * It holds data marked with RTC_FAST_ATTR attribute. @@ -371,11 +366,13 @@ SECTIONS /* Marks the end of IRAM code segment */ .iram0.text_end (NOLOAD) : { + /* iram_end_test section exists for use by memprot unit tests only */ + *(.iram_end_test) + /* ESP32-H2 memprot requires 16B padding for possible CPU prefetch and 512B alignment for PMS split lines */ . += _esp_memprot_prefetch_pad_size; . = ALIGN(_esp_memprot_align_size); - /* iram_end_test section exists for use by memprot unit tests only */ - *(.iram_end_test) + _iram_text_end = ABSOLUTE(.); } > iram0_0_seg