[SOLVED] Overflow issue when linking external libary on ESP32

psiphi75
Posts: 13
Joined: Thu May 04, 2017 4:45 am

[SOLVED] Overflow issue when linking external libary on ESP32

Postby psiphi75 » Fri May 26, 2017 8:54 pm

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.
Last edited by psiphi75 on Fri May 26, 2017 11:47 pm, edited 1 time in total.

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Overflow issue when linking external libary on ESP32

Postby kolban » Fri May 26, 2017 10:11 pm

Howdy,
I hit the very same issue and found the solution here:

https://esp32.com/viewtopic.php?f=13&t=424
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

psiphi75
Posts: 13
Joined: Thu May 04, 2017 4:45 am

Re: Overflow issue when linking external libary on ESP32

Postby psiphi75 » Fri May 26, 2017 11:46 pm

@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

Who is online

Users browsing this forum: Baidu [Spider] and 85 guests