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

User avatar
By h_narasimhan
#22121 I got the following error during compilation

(.sram.text+0x1283): dangerous relocation: windowed longcall crosses 1GB boundary; return may fail: (UND+0xdeadcafe)
in one of the functions.

The architecture is Xtensa and the toolchain used is a GNU toolchain built for Xtensa. This error is inside the function elf_xtensa_do_reloc() in the file elf32-xtensa.c in binutils source code.

Please let me know the cause of this error and any possible solution.

Thanks and Regards, Hari
User avatar
By projectgus
#22193 Hi Harry,

I'm guessing you're not compiling for an esp8266? The esp8266 should use the call0 ABI not the windowed ABI, so if you're compiling for esp8266 then your compiler is probably not configured properly (wrong overlay, perhaps?)

However you make it sound like you're building on xtensa, for xtensa, so maybe this is some other target? I'm not sure what the answer is in that case, sorry, it sounds like you're compiling with -mlongcalls already but you could possibly try adding it to the compiler flags. Maybe try on one of the xtensa Linux mailing lists?


Angus