ESP32 WROVER Platform RAM size


Any news here? Is it possible to access external PSRAM on Arduino Framework with platform Espressif 1.0.2?


What should be done from our side? How does it work Arduino IDE?


It’s done already. After last upgrade of arduino-espressif32 core v1.0.3 -> v1.1.0 PSRAM is automatically detected and the ESP32 core.


Is this valid for the esp8266 chip as well?


Thanks @cyberman54 for pointing out that it’s done!

I just tried it and it works! But we do need to add a build flag to get it enabled.

build_flags = -DBOARD_HAS_PSRAM
platform =
framework = arduino
board = esp32dev

This worked, the ESP.getFreeHeap() function reports over 4 MB of free ram which is expected (internal RAM + external RAM).

@ivankravets you might want to define a new board for esp32wrover. In this other thread you told people to use esp32dev but they will not get the RAM automatically.

For your reference, this is the commit that added support for that extra RAM in the esp32 arduino framework:

You can see that they edit the boards.txt file to pass the define flag:


@mrred128 this is only for esp32. I do not think the esp8266 supports external RAM.


It works on TTGO T-Beam without the build option “BOARD_HAS_PSRAM”.


But we have it?


Right - I had not seen this. So without the build_flag the extra 4MB are not visible. With the build flags they are. I guess you just need to add -DBOARD_HAS_PSRAM in this file.

I just made a PR and confirmed that it works on the WROVER-KIT:

@cyberman54: Which board are you using in your platformio.ini flag?

For anyone else watching, if you want to use the memory, you need to call ps_malloc(). The default malloc() does not allocate from PSRAM.


I did not use the build flag, but i get the 4MB with ESP.getFreeHeap()).
I am using a std:set container in RAM, and can see with ESP.getFreeHeap()) that the 4MB is shrinking when i fill up the std::set. Did not use any malloc() or ps_malloc(). Seems to work without. Board = esp32dev