B4R Question ESP32 storing image in RAM

RJB

Active Member
Licensed User
Longtime User
Hi,
I'm trying to store an image in the ESP32 RAM in 565 RGB format.
Using:
B4X:
Dim ImageStore(32400) As Int
for a 240 x 135 pixel image works fine but if I increase the the size I get to a point where I get an error like:
B4X:
.........\B4RALA~4\Objects\bin/src.ino.elf section `.dram0.bss' will not fit in region `dram0_0_seg'
........./xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: DRAM segment data does not fit.
........./xtensa-esp32-elf-gcc/1.22.0-80-g6c4433a-5.2.0/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld.exe: region `dram0_0_seg' overflowed by 5704 bytes
does anyone know if there is a way around this or possibly a better way to store the image?
Thanks
 

RJB

Active Member
Licensed User
Longtime User
Thanks, I'll try that. Presumably there's a limit to the number of times you can do it? I seem to remember 100k times so probably not a problem.
Is there any way to use the full RAM? Multiple large arrays seem to bust it the same as one very large one. There's still around 200K of 'dynamic memory' available when you hit the problem.
From the error message it looks like the memory is segmented, Is it possible to use different segments?
Thanks.
 
Upvote 0

RJB

Active Member
Licensed User
Longtime User
I just checked TFT_eSPI.h
I'm using pushImage from RAM and PROGMEM but I don't know how that would work from the filesystem. Would I be able to 'push' the image straight from the filesystem or will I have to copy it to RAM a block at a time then push the blocks to adjacent blocks on screen?
Thanks
 
Upvote 0
Top