DRAM segment data does not fit. on esp32 dev module compiler

so i was trying to do a ui for a screen with squareline but when i verified the code it said

C:/Users/legam/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: C:\Users\legam\AppData\Local\arduino\sketches\9170689E268851C5DF6D60BD1BA94B08/ui.ino.elf section .dram0.bss' will not fit in region dram0_0_seg'
C:/Users/legam/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: DRAM segment data does not fit.
C:/Users/legam/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: DRAM segment data does not fit.
C:/Users/legam/AppData/Local/Arduino15/packages/esp32/tools/esp-x32/2411/bin/../lib/gcc/xtensa-esp-elf/14.2.0/../../../../xtensa-esp-elf/bin/ld.exe: region `dram0_0_seg' overflowed by 8376 bytes
collect2.exe: error: ld returned 1 exit status
idk why it does that

You need to reduce the size of static and global variables, at least:

Or large variables need to be allocated in heap space.

Next time read the pinned post 'How to get the most from the forum' paying attention to using verbose errors and posting them in code tags.

1 Like