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

User avatar
By Squonk
#127
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
User avatar
By Sprite_tm
#156 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.
User avatar
By jonsmirl
#158
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