espressif / arduino-esp32

Arduino core for the ESP32
GNU Lesser General Public License v2.1
13.61k stars 7.41k forks source link

Arduino ESP32 core consumes more and more RAM with every version... #9544

Closed dl9sec closed 6 months ago

dl9sec commented 6 months ago

Board

ESP32 Dev Module, Partition Scheme: "Huge APP ..."

Device Description

ESP32 AudioKit V2.2

Hardware Configuration

Like ESP32-A1S on AudioKit 2.2 A402

Version

2.0.15 (via Arduino board manager)

IDE Name

Arduino IDE 1.8.19

Operating System

Windows 10

Flash frequency

80MHz

PSRAM enabled

yes

Upload speed

921600

Description

I tried to build he sketch below with the latest 2.0.15 core (not manually installed, but via the board manager of the Arduino IDE). It will not build because with the latest core it runs out of DRAM. With core version 2.0.14 it builds fine without any problems.

It seems that with every new version of the ESP32 core more and more memory is used. I ask myself what for? I did not change anything in my sketch, but the core etas more and more DRAM.

Would it be possible to give the ability to enable/disable some core functions in the board parameters to get rid of those RAM hogs?

Sketch

https://github.com/pschatzmann/arduino-audio-tools/blob/main/examples/examples-audiokit/streams-audiokit-webserver_mp3/streams-audiokit-webserver_mp3.ino

Debug Message

c:/users/thors/appdata/local/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.exe: C:\Users\thors\AppData\Local\Temp\arduino_build_452742/streams-audiokit-webserver_mp3.ino.elf section `.dram0.bss' will not fit in region `dram0_0_seg'
c:/users/thors/appdata/local/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.exe: DRAM segment data does not fit.
c:/users/thors/appdata/local/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.exe: DRAM segment data does not fit.
c:/users/thors/appdata/local/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.exe: region `dram0_0_seg' overflowed by 600 bytes
collect2.exe: error: ld returned 1 exit status

Other Steps to Reproduce

No response

I have checked existing issues, online documentation and the Troubleshooting Guide

dl9sec commented 6 months ago

Example builds again by optimizing the used audio libs. Nevertheless, increasing memory consumption of the ESP32 core is really annoying....