|
|
@@ -66,10 +66,10 @@ const soc_memory_type_desc_t soc_memory_types[] = {
|
|
|
{ "PID5DRAM", { MALLOC_CAP_PID5|MALLOC_CAP_INTERNAL, MALLOC_CAP_8BIT, MALLOC_CAP_32BIT|MALLOC_CAP_DEFAULT }, false, false},
|
|
|
{ "PID6DRAM", { MALLOC_CAP_PID6|MALLOC_CAP_INTERNAL, MALLOC_CAP_8BIT, MALLOC_CAP_32BIT|MALLOC_CAP_DEFAULT }, false, false},
|
|
|
{ "PID7DRAM", { MALLOC_CAP_PID7|MALLOC_CAP_INTERNAL, MALLOC_CAP_8BIT, MALLOC_CAP_32BIT|MALLOC_CAP_DEFAULT }, false, false},
|
|
|
-#ifdef CONFIG_SPIRAM
|
|
|
//Type 15: SPI SRAM data
|
|
|
{ "SPIRAM", { MALLOC_CAP_SPIRAM|MALLOC_CAP_DEFAULT, 0, MALLOC_CAP_8BIT|MALLOC_CAP_32BIT}, false, false},
|
|
|
-#endif
|
|
|
+ //Type 16: RTC Fast RAM
|
|
|
+ { "RTCRAM", { MALLOC_CAP_8BIT|MALLOC_CAP_DEFAULT, MALLOC_CAP_INTERNAL|MALLOC_CAP_32BIT, 0 }, false, false},
|
|
|
};
|
|
|
|
|
|
const size_t soc_memory_type_count = sizeof(soc_memory_types)/sizeof(soc_memory_type_desc_t);
|
|
|
@@ -88,6 +88,9 @@ Because of requirements in the coalescing code which merges adjacent regions, th
|
|
|
from low to high start address.
|
|
|
*/
|
|
|
const soc_memory_region_t soc_memory_regions[] = {
|
|
|
+#ifdef CONFIG_ESP32_ALLOW_RTC_FAST_MEM_AS_HEAP
|
|
|
+ { SOC_RTC_DRAM_LOW, 0x2000, 16, 0}, //RTC Fast Memory
|
|
|
+#endif
|
|
|
#ifdef CONFIG_SPIRAM
|
|
|
{ SOC_EXTRAM_DATA_LOW, RESERVE_SPIRAM_SIZE, 15, 0}, //SPI SRAM, if available
|
|
|
#endif
|
|
|
@@ -183,7 +186,7 @@ SOC_RESERVE_MEMORY_REGION(0x3fffc000, 0x40000000, trace_mem); //Reserve trace me
|
|
|
SOC_RESERVE_MEMORY_REGION(SOC_EXTRAM_DATA_LOW, SOC_EXTRAM_DATA_LOW + RESERVE_SPIRAM_SIZE, spi_ram); //SPI RAM gets added later if needed, in spiram.c; reserve it for now
|
|
|
#endif
|
|
|
|
|
|
-extern int _data_start, _heap_start, _iram_start, _iram_end;
|
|
|
+extern int _data_start, _heap_start, _iram_start, _iram_end, _rtc_force_fast_end, _rtc_noinit_end;
|
|
|
// Static data region. DRAM used by data+bss and possibly rodata
|
|
|
SOC_RESERVE_MEMORY_REGION((intptr_t)&_data_start, (intptr_t)&_heap_start, dram_data);
|
|
|
|
|
|
@@ -191,5 +194,13 @@ SOC_RESERVE_MEMORY_REGION((intptr_t)&_data_start, (intptr_t)&_heap_start, dram_d
|
|
|
// ESP32 has an IRAM-only region 0x4008_0000 - 0x4009_FFFF, reserve the used part
|
|
|
SOC_RESERVE_MEMORY_REGION((intptr_t)&_iram_start, (intptr_t)&_iram_end, iram_code);
|
|
|
|
|
|
+// RTC Fast RAM region
|
|
|
+#ifdef CONFIG_ESP32_ALLOW_RTC_FAST_MEM_AS_HEAP
|
|
|
+#ifdef CONFIG_ESP32_RTCDATA_IN_FAST_MEM
|
|
|
+SOC_RESERVE_MEMORY_REGION(SOC_RTC_DRAM_LOW, (intptr_t)&_rtc_noinit_end, rtcram_data);
|
|
|
+#else
|
|
|
+SOC_RESERVE_MEMORY_REGION(SOC_RTC_DRAM_LOW, (intptr_t)&_rtc_force_fast_end, rtcram_data);
|
|
|
+#endif
|
|
|
+#endif
|
|
|
|
|
|
#endif /* BOOTLOADER_BUILD */
|