docs(esp_system): add detailed RTC memory layout documentation

This commit is contained in:
wuzhenghui
2026-01-09 11:15:15 +08:00
parent 9a20ef85f5
commit c17787722c
9 changed files with 369 additions and 1 deletions
@@ -87,6 +87,61 @@ MEMORY
/* (See iram0_2_seg for meaning of 0x20 offset in the above.) */
#endif // CONFIG_APP_BUILD_USE_FLASH_SECTIONS
/**
* RTC Memory Layout for ESP32-S3
*
* ESP32-S3 has two separate RTC memory regions:
* 1. RTC FAST Memory: 8KB, used for RTC code and data
* 2. RTC SLOW Memory: 8KB, used for ULP coprocessor
*
* ==================== RTC FAST Memory ====================
* Size: 8KB (0x2000)
* Address: 0x600FE000 - 0x60100000 (data and instruction access on same bus)
*
* +-----------------------------+ 0x60100000 (RTC FAST memory end)
* | rtc_reserved_seg |
* | (RESERVE_RTC_MEM) |
* |- - - - - - - - - - - - - - -|
* | bootloader_data_rtc_mem | s_bootloader_retain_mem
* | (ESP_BOOTLOADER_RESERVE_RTC)|
* |- - - - - - - - - - - - - - -|
* | rtc_timer_data_in_rtc_mem | s_rtc_timer_retain_mem (24 bytes)
* | (RTC_TIMER_RESERVE_RTC) |
* +-----------------------------+ 0x60100000 - RESERVE_RTC_MEM
* | rtc_iram_seg |
* | (= rtc_data_seg) |
* |- - - - - - - - - - - - - - -|
* | .rtc.text | RTC wake stub code
* |- - - - - - - - - - - - - - -|
* | .rtc.data / .rtc.rodata | (when CONFIG_ESP32S3_RTCDATA_IN_FAST_MEM)
* |- - - - - - - - - - - - - - -|
* | .rtc.bss |
* +-----------------------------+ 0x600FE000 (RTC FAST memory start)
*
* ==================== RTC SLOW Memory ====================
* Size: 8KB (0x2000)
* Address: 0x50000000 - 0x50002000
*
* +-----------------------------+ 0x50002000 (RTC FAST memory end)
* | rtc_slow_seg |
* |- - - - - - - - - - - - - - -|
* | .rtc.data / .rtc.rodata | (when !CONFIG_ESP32S3_RTCDATA_IN_FAST_MEM)
* |- - - - - - - - - - - - - - -|
* | .rtc.bss |
* +-----------------------------+ 0x50000000 + CONFIG_ULP_COPROC_RESERVE_MEM (if ULP enabled)
* | ULP Coprocessor Reserve | (Optional, CONFIG_ULP_COPROC_RESERVE_MEM)
* | (code + data) |
* +-----------------------------+ 0x50000000 (RTC FAST memory start)
*
* RESERVE_RTC_MEM calculation:
* - RTC_TIMER_RESERVE_RTC = 24 bytes
* - ESP_BOOTLOADER_RESERVE_RTC = ALIGN_UP(CONFIG_BOOTLOADER_RESERVE_RTC_SIZE, 8)
*
* Note: RTC FAST memory shares the same address range for both data and
* instruction access. RTC data can be placed in either FAST or SLOW
* memory based on CONFIG_ESP32S3_RTCDATA_IN_FAST_MEM configuration.
*/
/**
* RTC fast memory (executable). Persists over deep sleep.
*/