ESP32 Using SPI RAM

Hi,

Trying to create a static array on PSRAM on a TTGO T8 board (TTGO T8 is not supported, compiling for a WROVER instead):

EXT_RAM_ATTR uint8_t arr[2500000];

Added the required build flags:

[env:esp32dev]
platform = espressif32
board = esp-wrover-kit
framework = arduino
upload_port = COM4
monitor_speed = 115200
build_flags =
    -DBOARD_HAS_PSRAM
    -DCONFIG_SPIRAM_CACHE_WORKAROUND   (<<- with or without, doesn't matter)
    -mfix-esp32-psram-cache-issue

But am still getting these errors:

c:/users/igor/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: .pio\build\esp32dev\firmware.elf section `.dram0.bss' will not fit in region `dram0_0_seg'
c:/users/igor/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: DRAM segment data does not fit.
c:/users/igor/.platformio/packages/toolchain-xtensa32/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: region `dram0_0_seg' overflowed by 7890920 bytes

esp_attr.h includes sdkconfig.h

What am I missing? This is just compilation, not trying to upload the thing.

You are creating 2 Million uint32_t pointers, each of which is 4 bytes long. So that’s ~7.629 Megabytes of data. How big is the PSRAM? Okay that’s irrelevant because it’s overflow by the entire amount, not partially, as if it wasn’t marked to be allocated in external RAM after all.

Yeah, you’re right, sorry. But even with this array it still fails:
EXT_RAM_ATTR uint8_t arr[2500000];

I will update the original post