ESP32 Gateway Rev. F enable PSRAM


I’m using ESP32 Gateway revision F with a custom board file (just to enable revision F) and I want to enable PSRAM. I added -DBOARD_HAS_PSRAM and -mfix-esp32-psram-cache-issue inside platformio but when I call ESP.getFreePsram() it returns 0.

What should I do?

platform = espressif32
board = esp32-gateway-rev-f
build_flags =
framework = arduino
monitor_speed = 256000
monitor_filters = time, log2file, esp32_exception_decoder, default
lib_deps =

“build”: {
“ldscript”: “esp32_out.ld”
“core”: “esp32”,
“extra_flags”: “-DARDUINO_ESP32_GATEWAY=70”,
“f_cpu”: “240000000L”,
“f_flash”: “40000000L”,
“flash_mode”: “dio”,
“mcu”: “esp32”,
“variant”: “esp32-gateway”
“connectivity”: [
“debug”: {
“openocd_board”: “esp-wroom-32.cfg”
“frameworks”: [
“upload”: {
“flash_size”: “4MB”,
“maximum_ram_size”: 327680,
“maximum_size”: 4194304,
“require_upload_port”: true,
“speed”: 460800
“url”: “ESP32-GATEWAY - Open Source Hardware Board”,
“vendor”: “OLIMEX”

Thank you.

How did you add PSRAM to the ESP32 module? When I read the schematics it uses a ESP32-WROOM-32 module. The ESP32-WROVER modules have integrated PSRAM, but not the WROOM-32. Check WROOM-32 overview chapter vs. ESP32-WROVER overview chapter. The schematics also don’t show an external PSRAM chip added to the design.