ESP32 memory error

Hello, everyone,
I proposed this question some time ago and was answered (I don't remember who kindly replied)) that the ESP32-WROOM-32 processor did not have sufficient DRAM memory.
The problem was to change from a 128X160 TFT display to a 480x320 pixel display.
The compiler's response was as follows:

c:/users/lenovo/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: C:\Users\lenovo\AppData\Local\Temp\arduino-sketch-AF6E7E316C0C3592EA18B3DC0F0D7A7A/Dial VFO_Jan_2023.ino.elf section `.dram0.bss' will not fit in region `dram0_0_seg'
c:/users/lenovo/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: DRAM segment data does not fit.
c:/users/lenovo/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: DRAM segment data does not fit.
c:/users/lenovo/appdata/local/arduino15/packages/esp32/tools/xtensa-esp32-elf-gcc/gcc8_4_0-esp-2021r2-patch3/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld.exe: region `dram0_0_seg' overflowed by 667504 bytes

I would not like to abandon my idea and so my question is:

How can I increase the DRAM externally?

From the Internet I have read things above my comprehension and so I ask you for some suggestions.
Thank you in advance, wishing you a happy 2023
Roberto

Simple - you CAN'T.

If you can't make the code fit, then you need a different platform. You MAY be able to find another board using the ESP that has a larger DRAM, but you cannot modify the ESP32 you have to add more.

You can also try an ESP32-based board that has PSRAM.

Thank you Gfvalvo and Ray for your responses.

Unfortunately, I currently have no idea where to find ESP32 boards with PSRAM.

Maybe it is time for me to "bury" this idea :worried:.

I renew to both of you a happy New Year.
Roberto

ESP32-CAM has 4 MB PSRAM and is very cheap.

Following your suggestion I find an ESP-WROVER-KIT V3....

You haven't explained in detail what your project is.
As soon as you describe in detail what you want to do new suggestions can be made how it might be possible to realise the wanted functionality

Thank you Whandhall,
great suggestion, although I don't trust Aliexpress a lot because of the many, many lost items.
However, the price justifies the risk.
Happy New Year also to you.
Roberto

I got reimbursed for anything that did not make it,
which was a very low percentage of all my buys.

The ESP-WROVER-B modules with up to 8Mbyte PSRAM are available from Mouser, Digikey, Adafruit, and others for just a few $...

Many thanks Ray...

Using the extra RAM will require some advanced coding skills.

The ESP32 API has all the docs needed to use PSRAM. Also under the Arduino IDE only 4MB of PSRAM may be accessed. If more ram is needed using the ESP-IDF.

https://docs.espressif.com/projects/esp-idf/en/latest/esp32/search.html?q=psram&check_keywords=yes&area=default

Please provide a reference for that limitation. I'll bookmark it as it might be useful to me.

Under the ESP32's Arduino Core, himem page switching is broken.

https://docs.espressif.com/projects/esp-idf/en/latest/esp32/api-reference/index.html

That's a link to the entire API Reference. Can you provide something more specific, or at least search terms that will lead to "himem page switching is broken"?

words used "esp32 arduino ide psram limitation" in a internet search thingy. The info is in the ESP32 API. All you need to do is look. I found it many years ago.

It's been an issue for the last 4 or 5 years and is well documented. More recent versions of the IDF have fixed the issue with the IDF. The Arduino core has not been fixed.

In the API Guide (v4.4.3 as that's whats Arduino 2.0.6 is based on), under "Support for External RAM", one finds the following max psram sizes ESP32 (4MB), ESP32-S2 (10.5MB), ESP32-s3 (16MB). Nowhere in there does it say anything about a 4MB limit for Arduino. Nor does it even say anything about that limit being fixed for IDF.

Links to the very top of the API Guide are generally useless. A deeper, more specific link is always more helpful. Also, the guide's search capabilities aren't very good. It returns too many hits for individual words and doesn't consider phrases.

I'm sorry you are having so many issues on finding the info. I did the research about 4 years ago.

Don't worry Idahowalker,
when I don't have problems, I'm an artist at making my own.... :slight_smile:
Bye, Roberto

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.