|
|
@@ -83,10 +83,19 @@ MEMORY
|
|
|
*/
|
|
|
#if CONFIG_ULP_COPROC_ENABLED
|
|
|
lp_ram_seg(RW) : org = 0x50108000 + CONFIG_ULP_COPROC_RESERVE_MEM,
|
|
|
- len = 0x8000 - CONFIG_ULP_COPROC_RESERVE_MEM
|
|
|
+ len = 0x8000 - CONFIG_ULP_COPROC_RESERVE_MEM - RESERVE_RTC_MEM
|
|
|
#else
|
|
|
- lp_ram_seg(RW) : org = 0x50108000 , len = 0x8000
|
|
|
+ lp_ram_seg(RW) : org = 0x50108000 , len = 0x8000 - RESERVE_RTC_MEM
|
|
|
#endif // CONFIG_ULP_COPROC_ENABLED
|
|
|
+
|
|
|
+ /* We reduced the size of lp_ram_seg by RESERVE_RTC_MEM value.
|
|
|
+ It reserves the amount of LP memory that we use for this memory segment.
|
|
|
+ This segment is intended for keeping:
|
|
|
+ - (lower addr) rtc timer data (s_rtc_timer_retain_mem, see esp_clk.c files).
|
|
|
+ - (higher addr) bootloader rtc data (s_bootloader_retain_mem, when a Kconfig option is on).
|
|
|
+ The aim of this is to keep data that will not be moved around and have a fixed address.
|
|
|
+ */
|
|
|
+ lp_reserved_seg(RW) : org = 0x50000000 + 0x8000 - RESERVE_RTC_MEM, len = RESERVE_RTC_MEM
|
|
|
}
|
|
|
|
|
|
/* Heap ends at top of dram0_0_seg */
|
|
|
@@ -103,6 +112,7 @@ REGION_ALIAS("rtc_iram_seg", lp_ram_seg );
|
|
|
REGION_ALIAS("rtc_data_seg", rtc_iram_seg );
|
|
|
REGION_ALIAS("rtc_slow_seg", rtc_iram_seg );
|
|
|
REGION_ALIAS("rtc_data_location", rtc_iram_seg );
|
|
|
+REGION_ALIAS("rtc_reserved_seg", lp_reserved_seg );
|
|
|
|
|
|
#if CONFIG_APP_BUILD_USE_FLASH_SECTIONS
|
|
|
REGION_ALIAS("default_code_seg", irom_seg);
|