Open
Description
I'm building a piece of source code, and it is giving me the following build error:
/avr/bin/ld: C:\Users\clb\AppData\Local\Temp\build4551615865478074668.tmp/MyTest.cpp.elf section `.text' will not fit in region `text'
/avr/bin/ld: region `text' overflowed by 1910 bytes
collect2: error: ld returned 1 exit status
Error compiling.
but there is no indication of what caused the overflow. Instead of giving an unhelpful error message, it would be better to give a dump of used memory in the 'text' region, along with file and line information of where the symbols come from, sorted in descending order of size taken, so that it is possible to analyze what takes up memory and to get ideas where to optimize.
Metadata
Metadata
Assignees
Labels
Type
Projects
Milestone
Relationships
Development
No branches or pull requests
Activity
matthijskooijman commentedon Jul 6, 2015
Hm, the error message is usually more helpful than this. What IDE version are you using? Could you share the full code?
cmaglie commentedon Jul 6, 2015
Dumping all the symbols seems a bit awful to me, I've never seen any IDE with such a feature.
juj commentedon Jul 6, 2015
Dumping the symbols sounds much better than expecting the user to play the random guessing game. If dumping the symbols automatically sounds bad because nobody did it before, then I am sure there would be a way to add some other method, e.g. a "Sketch -> Memory Usage Statistics..." to profile it, plus when the error message occurs, point the user to open that menu item.
The issue occurs when trying to use the u8glib library with a LD7032 60x32 OLED display. I installed the library, and uncommented the line
from their hello world library example, and built it. I haven't done other changes there. The code is here: https://code.google.com/p/u8glib/source/browse/sys/arduino/HelloWorld/HelloWorld.pde . My Arduino version is 1.6.3.