-->
Page 7 of 20

Re: Using GCC to program the ESP8266

PostPosted: Wed Sep 03, 2014 1:01 am
by Squonk
gbit wrote:RC is a very old Xtensa product release. Latest is RF. The latest RF software can be used on these older cores. And in the latest software, all those _xtos_... functions are freely licensed, no need to rewrite.

I have zero experience with Xtensa CPUs, if you know them already, you are more than welcome to share here!

However, I am unsure if we will need to rewrite all _xtos_ function (if any), since there are already 18 of them that are located in ROM, along with others, both lower and upper level functions apparently, so we won't be able to modify these anyway.

What is left are the binary archives in /lib, that can be disassembled with xt-objdump -D

Re: Using GCC to program the ESP8266

PostPosted: Wed Sep 03, 2014 7:02 am
by jonsmirl
No need to rewrite any xtos functions. First a lot are in ROM. Second, xtos is released under a BSD license. It is fine to use the code.

Re: Using GCC to program the ESP8266

PostPosted: Thu Sep 04, 2014 7:09 am
by Sprite_tm
Has anyone already succeeded in building a version of gcc that can compile and link the example? I'm running into a fair amount of trouble using the xtensa crosstool-ng: the script that picks up the overlay file is completely broken making all the utils compile with the wrong overlay, causing the little<->big-endian compile problems. If I fix that, I get gcc compilation errors because the assembler doesn't seem to pick up on some instructions.

I'm trying buildroot now, but I'm pretty sure that's gonna try and compile a gcc for uclibc; not sure if that'll interfere.

Re: Using GCC to program the ESP8266

PostPosted: Thu Sep 04, 2014 7:20 am
by jonsmirl
Sprite_tm wrote:Has anyone already succeeded in building a version of gcc that can compile and link the example? I'm running into a fair amount of trouble using the xtensa crosstool-ng: the script that picks up the overlay file is completely broken making all the utils compile with the wrong overlay, causing the little<->big-endian compile problems. If I fix that, I get gcc compilation errors because the assembler doesn't seem to pick up on some instructions.

I'm trying buildroot now, but I'm pretty sure that's gonna try and compile a gcc for uclibc; not sure if that'll interfere.


Buildroot, uclibc, glibc, etc are all way too large for this chip. Those are meant for bigger xtensa chips that run Linux.

I used these instructions:
http://wiki.linux-xtensa.org/index.php/Crosstool-NG

make sure and pick 'none' for C library.

Built for me on first try. I was able to compile a few random files by manually adjusting the include paths. I didn't try linking since the makefile needs to be converted from Windows to Linux