diff --git a/arch/xtensa/src/esp32/esp32_allocateheap.c b/arch/xtensa/src/esp32/esp32_allocateheap.c index a2f28d45daf..757ef8e2fde 100644 --- a/arch/xtensa/src/esp32/esp32_allocateheap.c +++ b/arch/xtensa/src/esp32/esp32_allocateheap.c @@ -53,6 +53,35 @@ * Pre-processor Definitions ****************************************************************************/ +/* The heap overview: + * + * CONFIG_HEAP2_BASE eg. 3f80 0000 + * : + * : g_mmheap region3 (CONFIG_ESP32_SPIRAM) + * : + * CONFIG_HEAP2_BASE + CONFIG_HEAP2_SIZE eg. 3fc0 0000 + * + * _sheap eg. 3ffc 8c6c + * : + * : g_iheap (CONFIG_XTENSA_USE_SEPARATE_IMEM) + * : + * _sheap + CONFIG_XTENSA_IMEM_REGION_SIZE eg. 3ffd ebfc + * : + * : g_mmheap region1 + * : + * HEAP_REGION1_END 3ffd fff0 + * : + * : ROM data + * : + * HEAP_REGION2_START 3ffe 1330 or 3ffe 7e40 + * : + * : g_mmheap region2 + * : + * : about 123KB + * : + * _eheap 4000 0000 + */ + /* Region 1 of the heap is the area from the end of the .data section to the * begining of the ROM data. The start address is defined from the linker * script as "_sheap". Then end is defined here, as follows: