Discuss here different C compiler set ups, and compiling executables for the ESP8266
User avatar
#58968 If i try to build my project, i get this output:
xtensa-lx106-elf-gcc -Teagle.app.v6.ld segmentled.o -nostdlib -Wl,--start-group -lmain -lnet80211 -lwpa -llwip -lpp -lphy -lc -Wl,--end-group -lgcc -o segmentled
/home/test/Desktop/opt/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/../../../../xtensa-lx106-elf/bin/ld: segmentled section `.text' will not fit in region `iram1_0_seg'
/home/test/Desktop/opt/esp-open-sdk/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/../../../../xtensa-lx106-elf/bin/ld: region `iram1_0_seg' overflowed by 1000 bytes
collect2: error: ld returned 1 exit status
<builtin>: recipe for target 'segmentled' failed
make: *** [segmentled] Error 1

does anyone know what i do wrong or what causes this error? Any help would be very much appreciated! :)
User avatar
By davydnorris
#58981 Have a look at my thread on building the ESP toolchain - it could be that you are using the libgcc that is built with the tools rather than the one in the SDK, and this contains functions that are in the ESP ROM. I have created a script to remove them from the library, or you can use the supplied SDK libgcc
User avatar
#59022 Okay, the solution was to copy the libgcc.a file from:




Now everything is working fine! I can't believe it... :D
Last edited by CARPP on Sun Dec 04, 2016 9:37 am, edited 1 time in total.