I'd like to set up a 480KB buffer to use as a graphics framebuffer. (Actually a dual buffer of 240KB each.) Splitting it to several smaller buffers that add up to 480KB would also be OK. Writing this, I now realize that the ESP32 doesn't actually have 480KB of data memory available, so I may try to compress some of it, or do without the dual buffering, or simply use external memory - but still I'd like to see how much memory I can use without resorting to external memory.
Of course, simply compiling code that has a global
Code: Select all
char buf[480000];
Code: Select all
xtensa-esp32-elf/bin/ld: esp-hello-world/build/hello-world.elf section `.dram0.bss' will not fit in region `dram0_0_seg'
xtensa-esp32-elf/bin/ld: DRAM segment data does not fit.
xtensa-esp32-elf/bin/ld: region `dram0_0_seg' overflowed by 311288 bytes
Also, the reference says that Internal SRAM 2 starts 8KB before the mapped address, at 0x3ffae000. Can those 8KB at 0x3ffae000-0x3ffb0000 be used?
And would mapping Internal SRAM 1 as an extra segment work? That might get me to around 300KB.
Finally, Internal SRAM 0 is described as instruction memory. Would it be possible to store some data there anyway?
Thanks!