Memory Region `dram0_0_seg' Overflowed

allacmc
Posts: 6
Joined: Fri Nov 24, 2023 4:32 pm

Memory Region `dram0_0_seg' Overflowed

Postby allacmc » Fri Nov 24, 2023 4:42 pm

Please help me, I use the ESP32-WROM-32 MCU and I am having difficulty with the following error:



Code: Select all

/home/allacmc/.arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: /tmp/arduino/sketches/A97C4C0294AB246878AAD8D4C7BC08FB/SNMP_Webserver.ino.elf section `.dram0.bss' will not fit in region `dram0_0_seg'
/home/allacmc/.arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: DRAM segment data does not fit.
/home/allacmc/.arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: DRAM segment data does not fit.
/home/allacmc/.arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/esp-2021r2-patch5-8.4.0/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: region `dram0_0_seg' overflowed by 128 bytes
collect2: error: ld returned 1 exit status

exit status 1

Compilation error: exit status 1

The fact is that I'm low on memory so I need to keep looking for things in my program to reduce the size of this specific memory region:

For example:

randomSeed(analogRead(0);

This instruction generates this error, if I remove this instruction I can compile.

Another example:

IPAddress targetIP[4] = { IPAddress(0,0,0,0), IPAddress(0,0,0,0), IPAddress(0,0,0,0), IPAddress(0,0,0,0) };

If I remove an item from this list, I can compile it.

My question is:

What are the instructions that consume this type of memory?

What command do I use to find out the occupation of this specific memory?

The use of memory in general is useless. That doesn't solve it.
Allan Caldas - Enervision Telemetria

MicroController
Posts: 1639
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Memory Region `dram0_0_seg' Overflowed

Postby MicroController » Sat Nov 25, 2023 12:36 pm

https://en.wikipedia.org/wiki/.bss
Your static/global variables take up too much space.

Who is online

Users browsing this forum: ESP_Roland and 59 guests