Discuss here different C compiler set ups, and compiling executables for the ESP8266

User avatar
By Markus Gritsch
#13874 Hi,

compiling the Lua (NodeMCU) firmware with this precompiled toolchain on Windows gives the Linker error:
c:/espressif/xtensa-lx106-elf/bin/../lib/gcc/xtensa-lx106-elf/4.8.2/../../../../xtensa-lx106-elf/bin/ld.exe: .output/eagle/debug/image/eagle.app.v6.out section `.text' will not fit in region `iram1_0_seg'

It works fine with the toolchain on Linux [1]. Any idea why this toolchain on Windows produces larger binaries?

[1] viewtopic.php?f=23&t=2030&p=12181#p13227
User avatar
By jcmvbkbc
#13877
Markus Gritsch wrote:Any idea why this toolchain on Windows produces larger binaries?

Can you add -Wl,-M to the list of linker options and compare maps produced by linux and windows toolchains or post them somewhere?
At least the newlib built by this script https://gist.github.com/fpoussin/7ae55b5a5bd9a28ce21d may be bigger than the one built by the crosstool-NG, because that script lacks the following options we have on linux:
'--disable-newlib-io-c99-formats' '--disable-newlib-io-long-long' '--disable-newlib-io-float' '--disable-newlib-io-long-double' '--disable-newlib-supplied-syscalls' '--enable-target-optspace'
User avatar
By Markus Gritsch
#13890 Thanks jcmvbkbc.

Please find the mapfile of my NodeMCU build on Windows attached. (I had to ZIP it, otherwise the forum software would complain of not accepting the extension.) Waiting for someone else to upload the mapfile from a build on Linux...
You do not have the required permissions to view the files attached to this post.