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

User avatar
By cnlohr
#457 I can't seem to find people talking about which flags to pass vanilla GCC to get it to output something close to our xtensa core. I'm interested in seeing if I can get stuff working without call0, i.e. twiddiling a GPIO, just to get something started, but there's so many flags and options for xtensa, I don't know where I'd begin.

Perhaps, if someone already has a ./configure for GCC that will build a functional GCC, they could post it?

P.S. I remember reading some issue with the registers on this chip. Has that been resolved? Are we mostly waiting on the ABI for call0?
User avatar
By jcmvbkbc
#458
cnlohr wrote:I can't seem to find people talking about which flags to pass vanilla GCC to get it to output something close to our xtensa core. I'm interested in seeing if I can get stuff working without call0, i.e. twiddiling a GPIO, just to get something started, but there's so many flags and options for xtensa, I don't know where I'd begin.
Perhaps, if someone already has a ./configure for GCC that will build a functional GCC, they could post it?

Use crosstool-ng (https://github.com/foss-xtensa/crosstool-NG) with the following patch on top: http://lists.linux-xtensa.org/pipermail ... 01801.html
GCC won't build completely because it won't be able to assemble code that it generates for internal libraries because of always using windowed ABI.
But that doesn't matter because GCC won't be useful anyway, since it emits instructions that the core doesn't have and there's no switch to disable it.
Every compiled function would start with such instruction.
User avatar
By Squonk
#459 It looks like Open64 is using the GCC front-end for parsing, but actually replaces the GCC code emmission by completely independant code which looks like more optimized for RISC-like machines, being able to recognize larger code patterns, so how can we check if Open64 is using call0 vs. windowed ABI?

I am not an XTensa specialist, nor GCC one :roll: