-->
Page 3 of 55

Re: Using GCC to program the ESP8266

PostPosted: Sun Sep 28, 2014 7:26 pm
by jcmvbkbc
jcmvbkbc wrote:I've taken stab at adding call0 support in gcc: https://github.com/jcmvbkbc/gcc-xtensa/ ... all0-4.8.2
The cross-compiler is now able to bootstrap, but
- stack frame support is broken (-fomit-frame-pointer "fixes" that)
- callee-saved registers are not saved, a0 is not saved in non-leaf functions
- non-local jump code is just commented out, needs more attention.


Ok, spent some time on it, current status:
- stack frame support is fixed;
- callee-saved registers and a0 are saved and restored properly;
- generated code looks sane.

This should be enough to build self-hosted code. I'll look at commented out library code, but I think it's 1) not critical 2) it's *really* easy to fix anyway.
Code is in the same git tree. Testing feedback, pointers and patches are welcome.

Re: Using GCC to program the ESP8266

PostPosted: Sun Sep 28, 2014 11:58 pm
by Squonk
Thanks for working on GCC!

I hope to be able to test it soon and compare it to the existing XCC.

Re: Using GCC to program the ESP8266

PostPosted: Tue Sep 30, 2014 9:11 am
by Sprite_tm
jcmvbkbc wrote:Ok, spent some time on it, current status:
- stack frame support is fixed;
- callee-saved registers and a0 are saved and restored properly;
- generated code looks sane.

This should be enough to build self-hosted code. I'll look at commented out library code, but I think it's 1) not critical 2) it's *really* easy to fix anyway.
Code is in the same git tree. Testing feedback, pointers and patches are welcome.


Awesome! I'll give it a try as soon as I can.

Re: Using GCC to program the ESP8266

PostPosted: Tue Sep 30, 2014 9:24 am
by mamalala
Any quick hints about how to compile it? It's been a very, very long time since i compiled a GCC suite myself. I downloaded the archive for that branch and unpacked it. My host is Linux 64 Bit, but the 32 Bit support libs are also present.

Now, what do i tell configure as parameters, etc? Obviously i don't want to overwrite the system-wide installed GCC ;)

Thanks,

Chris