Page 1 of 1

How much SRAM is actually usable?

Posted: Tue Jun 20, 2023 6:35 am
by error404
I'm developing a relatively large application on an ESP32-­WROVER­-E.
Currently I'm running into an issue, where i need more RAM. My goal is to store a JPEG (640x480), but i have only 35kB left, which isn't enough in some cases.

I don't wanna go into discussions about using dynamically allocated memory. I just have a few questions about the memory itself.

I'm wondering where all the SRAM goes...
According to the datasheet of the ESP32-WROVER-E, the used processor is a ESP32-D0WD-V3 with 520kB of PSRAM.

I set up my project with IDF and VisualGDB, selecting the ESP32-WROVER-E. In the Embedded Memory Explorer(picture attached) two RAM "partitions" are shown. INSTR_RAM(128kB) and DATA_RAM (320kB). Thats 448kB combined so I'm missing 72kB.

question 1: Where do these 72kB go?

The buffer i want to use goes into DATA_RAM. More specifically into the section .dram0.bss. Which is about 92kB. There's a second section in DATA_RAM called .dram0.data which is 28kB. Which leads to a total of ~121kB eventhough the DATA_RAM has 320kB. I'm missing 200kB.

question 2: Where do these 200kB go?
question 3: Is there an option to extend .dram0.bss since there are 200kB left in DATA_RAM?

I'm new to the ESP32 so I could be mistaken here.
But more than half of the SRAM seems unusable for me. That's not just a few kB missing here and there for other purposes.

Thanks in advance!

Re: How much SRAM is actually usable?

Posted: Tue Jun 20, 2023 9:34 pm
by MicroController
question 2: Where do these 200kB go?
Heap.
question 3: Is there an option to extend .dram0.bss since there are 200kB left in DATA_RAM?
Notice that .data and .bss is RAM that's statically allocated, not free.

Re: How much SRAM is actually usable?

Posted: Thu Jun 22, 2023 7:54 am
by error404
That's sad news unfortunately.

But thank you for your answer!