Discuss here different C compiler set ups, and compiling executables for the ESP8266
User avatar
By igrr
#1117
Sprite_tm wrote:jcmvbkbc, do you have a Paypal address or something? I'd like to buy you a virtual beer for your effort :)

I second that ;)

mamalala wrote:Alright, now you have the two extra libs, next step is to edit my Makefile so that it uses the freshly compiled GCC, and also to have it point to the systems include directory, since some sources use things like "#include <string.h>". I attach a modified Makefile here, just edit the path's to the new GCC tools accordingly.

Looks like using host headers when cross-compiling leads to some 4/8 byte word issues, at least in my case.
Headers from XtDevTools/install/builds/RC-2010.1-win32/lx106/xtensa-elf/include seem to do better job.
Would be great to build libc along with the the compiler to avoid copying stuff from the VM, though.
User avatar
By mamalala
#1118
igrr wrote:
mamalala wrote:Alright, now you have the two extra libs, next step is to edit my Makefile so that it uses the freshly compiled GCC, and also to have it point to the systems include directory, since some sources use things like "#include <string.h>". I attach a modified Makefile here, just edit the path's to the new GCC tools accordingly.

Looks like using host headers when cross-compiling leads to some 4/8 byte word issues, at least in my case.
Headers from XtDevTools/install/builds/RC-2010.1-win32/lx106/xtensa-elf/include seem to do better job.
Would be great to build libc along with the the compiler to avoid copying stuff from the VM, though.


You are right. I already did a test, and i am able to compile libhal and the newlib sources that are in the sources found in the VM. libhal is rather straightforward, but newlib is a mess. While it recognizes, for example, the CC_FOR_TARGET when i set it to the gcc binaries, it refuses to take the LD_FOR_TARGET. I'm absolutely stupid when it comes to adpating that automake stuff, so i'm at a loss what to do with that.

Compiling the newlib will also get us the required include files from there.

Anyone here wants to give it a shot? Then i could make a .tar.gz of that stuff (and the required includes for the core-stuff from the vm) and upload it to my site. All the files required for that, as far as i can tell, have a permissive license, so there should be no problem with that.

Stuff compiles fine with the self-compiles libhal and libc, and it even works.

Greetings,

Chris
User avatar
By jcmvbkbc
#1119
igrr wrote:
Sprite_tm wrote:jcmvbkbc, do you have a Paypal address or something? I'd like to buy you a virtual beer for your effort :)

I second that ;)

Thanks, but no, thank you. Having you guys using it is a reward. And bugreports and patches are always welcome.

igrr wrote:Looks like using host headers when cross-compiling leads to some 4/8 byte word issues, at least in my case.
Headers from XtDevTools/install/builds/RC-2010.1-win32/lx106/xtensa-elf/include seem to do better job.
Would be great to build libc along with the the compiler to avoid copying stuff from the VM, though.

I'll try to find out if xtensa newlib port can be published.