Page 1 of 1

[SOLVED] Overflow issue when linking external libary on ESP32

Posted: Fri May 26, 2017 8:54 pm
by psiphi75
I am getting the following error when compiling on the ESP32:

Code: Select all

/opt/Espressif/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: /home/simon/Projects/esp32/build/nibbl.elf section `.dram0.bss' will not fit in region `dram0_0_seg'
/opt/Espressif/xtensa-esp32-elf/bin/../lib/gcc/xtensa-esp32-elf/5.2.0/../../../../xtensa-esp32-elf/bin/ld: region `dram0_0_seg' overflowed by 231096 bytes
collect2: error: ld returned 1 exit status
/opt/Espressif/esp-idf/make/project.mk:322: recipe for target '/home/simon/Projects/esp32/build/nibbl.elf' failed
It seems the external library (JerryScript) is too large to be linked, however, it shouldn't be since it works on the ESP8266. I have used the same build settings for JerryScript as the ESP8266. I have also built the "release" target to ensure debug code isn't included. I have raised this question/issue (https://github.com/jerryscript-project/ ... ssues/1854) with the JerryScript.

Re: Overflow issue when linking external libary on ESP32

Posted: Fri May 26, 2017 10:11 pm
by kolban
Howdy,
I hit the very same issue and found the solution here:

https://esp32.com/viewtopic.php?f=13&t=424

Re: Overflow issue when linking external libary on ESP32

Posted: Fri May 26, 2017 11:46 pm
by psiphi75
@kolban, that worked thanks. The funny thing is that I have read your previous post on this and tried that solution, but I received other error messages. So I gave up on that route.

In a nutshell I changed the CONFIG_MEM_HEAP_AREA_SIZE value to (100 * 1024), probably way too much, but for now it's okay.

The CONFIG_MEM_HEAP_AREA_SIZE value can be found here:
https://github.com/jerryscript-project/ ... nfig.h#L33