-->
Page 1 of 2

u8glib problems

PostPosted: Tue Mar 31, 2015 8:27 am
by unreality
Im trying to get u8glib working on the esp8266.

igrr's latest commit to create the F() macro makes it compile now, but on linking the toolchain gives the following:
Code: Select allArduino.app/Contents/Java/hardware/tools/esp8266/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: arduino.cpp.elf section `.rodata' will not fit in region `dram0_0_seg'
Arduino.app/Contents/Java/hardware/tools/esp8266/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: address 0x40138220 of arduino.cpp.elf section `.bss' is not within region `dram0_0_seg'
Arduino.app/Contents/Java/hardware/tools/esp8266/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: arduino.cpp.elf section `.text' will not fit in region `iram1_0_seg'
Arduino.app/Contents/Java/hardware/tools/esp8266/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld: address 0x40138220 of arduino.cpp.elf section `.bss' is not within region `dram0_0_seg'


It seems these errors indicate the lib is too large to fit in RAM? Has anyone had any success with u8glib on the ESP? Maybe i should look at the nodemcu lib and see if they've made large changes..

Re: u8glib problems

PostPosted: Tue Mar 31, 2015 3:09 pm
by igrr
this looks like only a part of the linker output, so I can't tell for sure, by I suppose it's this issue:
https://github.com/esp8266/Arduino/issues/11
maybe this library uses malloc and free instead of new and delete?

Re: u8glib problems

PostPosted: Tue Apr 28, 2015 1:27 pm
by michar71
Hi,

Did you ever manage to resolve the issue? I'm running into the same problem and it's a little bit baffling as there should be more RAM in an ESP8266 then in a standard 32K Arduino.....

It seems the compiler now puts libraries flagged accordingly into FLASH rom and all the other code into RAM.
Unless there is something fundamentally wrong (For example no compiler flag to strip away unused code...) it should fit.
The u8glib could potentially be very large if all the fonts are included for some reason....

I'll try to modify the IDE so the linker creates a mapping file, maybe that will get us some info....

Michael

Re: u8glib problems

PostPosted: Tue Apr 28, 2015 6:42 pm
by unreality
I tried a few things like removing fonts, drivers, etc, but it still failed. So i ended up using the Adafruit SSD1306 library instead.

It would still be great to get u8glib working since it supports so many displays. I had a look at the nodemcu firmware and it had a few small changes i didnt investigate fully, so maybe there is a hint or two in there?