Why is there only 320 KBytes of SRAM set in most default board files that target an ESP-WROOM32 device when ESP-WROOM32 device’s have 520 KBytes of internal SRAM?
A few references:
I can increase the RAM size by tweaking the *.json file associated with the target board (or create my own and use a custom board file). However, I notice that there is no check to see if the amount of RAM space allocated by the linker actually fits in the target device when loading the code into the target ESP32.
I apologize if this is available somewhere on the interwebs and possible even within these forums. The answer to this question has presented itself after a fair amount of digging through posts, guides, and running through files in the PlatformIO installation directory on my PC.
Also, the reason I’m digging into this at all is because I am looking at doing one or a few of the following:
- Free up RAM by disabling unused pieces of libraries/core code that may be getting built into the image even though they have no use.
- Free up RAM by optimizing buffers used throughout the program (non-app code, libraries and core code).
- Gain access to 520 MBytes, or at least more, RAM instead of the default 320 MBytes.
Something worth mentioning: the board cannot be altered which means external RAM cannot be added to the ESP32.