I have a very simple LVGL app that compiles just fine under Arduino IDE (pic 1) for the ESP32-WROOM-32D. The same code under VSCode/PlatformIO fails with the below. I’m stumped.
/home/themagicm/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: DRAM segment data does not fit.
/home/themagicm/.platformio/packages/toolchain-xtensa-esp32@8.4.0+2021r2-patch5/bin/../lib/gcc/xtensa-esp32-elf/8.4.0/../../../../xtensa-esp32-elf/bin/ld: region `dram0_0_seg' overflowed by 29088 bytes
collect2: error: ld returned 1 exit status
*** [.pio/build/esp32dev/firmware.elf] Error 1
platform.ini contains:
[env:esp32dev]
platform = espressif32
board = esp32dev
framework = arduino
lib_deps = lvgl/lvgl@^8.3.4
monitor_speed = 115200
Do you use the same LVGL version in Arduino IDE?
cc: @valeros
just checked. yes… 8.3.4 on the Arduino IDE side.
What lv_conf.h do you have? (Paste in text please).
With the platformio.ini
and shown code alone I just get a
.pio/libdeps/esp32dev/lvgl/src/core/…/lv_conf_internal.h:41:18: fatal error: …/…/lv_conf.h: No such file or directory
Error.
use the default lv_conf_template, make a copy as lv_conf.h, change the 0 to a 1 inside the file. Nothing else was updated.
That was the missing piece (for me)
Now the sketch compiles fine for me (except a few compiler warnings caused by the library itself):
Retrieving maximum program size .pio\build\esp32doit-devkit-v1\firmware.elf
Checking size .pio\build\esp32doit-devkit-v1\firmware.elf
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [== ] 21.9% (used 71740 bytes from 327680 bytes)
Flash: [== ] 22.0% (used 287981 bytes from 1310720 bytes)
Building .pio\build\esp32doit-devkit-v1\firmware.bin
esptool.py v4.4
Creating esp32 image...
Merged 2 ELF sections
Successfully created esp32 image.
Used platformio.ini:
[env:esp32doit-devkit-v1]
framework = arduino
monitor_speed = 115200
platform = espressif32
board = esp32doit-devkit-v1
lib_deps = lvgl/lvgl@^8.3.4
Maybe you have some leftovers from a previous build? Did you try a clean?
pio run --target clean
I updated my platformio.ini
[env:esp32dev]
platform = espressif32
board = esp32doit-devkit-v1
framework = arduino
lib_deps = lvgl/lvgl@^8.3.4
monitor_speed = 115200
the clean part, I’ve done before. Same errors, no change.
Your .ini is different because you chose a diff board. So I did the same, but left the env: label as the previous…internally only “board” was updated. Same errors though
Also with board = esp32dev
i got the same results without any issues:
Advanced Memory Usage is available via "PlatformIO Home > Project Inspect"
RAM: [== ] 21.9% (used 71740 bytes from 327680 bytes)
Flash: [== ] 22.0% (used 287981 bytes from 1310720 bytes)
Building .pio\build\esp32doit-devkit-v1\firmware.bin
esptool.py v4.4
Creating esp32 image...
Merged 2 ELF sections
Successfully created esp32 image.
Have you tried to setup a brand new and fresh project?
2 Likes
SIGH. I could have sworn I deleted and recreated the project. Apparently I didnt.
THANK YOU!