-->
Page 19 of 20

Re: Using GCC to program the ESP8266

PostPosted: Thu Sep 11, 2014 6:56 am
by Squonk
Here is an important hint: Tensilica's XCC compiler is not only based on GCC, but also on Open64:
http://ip.cadence.com/uploads/pdf/XCC%2 ... erview.pdf
http://www.open64.net/

Maybe our 106Micro core is better supported (call0) than in pure GCC?

Re: Using GCC to program the ESP8266

PostPosted: Thu Sep 11, 2014 3:27 pm
by cnlohr
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?

Re: Using GCC to program the ESP8266

PostPosted: Thu Sep 11, 2014 3:40 pm
by jcmvbkbc
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.

Re: Using GCC to program the ESP8266

PostPosted: Thu Sep 11, 2014 3:49 pm
by Squonk
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: