-->
Page 46 of 55

Re: New Working GCC for ESP8266

PostPosted: Sat May 01, 2021 7:22 pm
by davydnorris
eriksl wrote:
davydnorris wrote:I also see that the espressif fork of your repo is set to use newlib 3.0 - do you know if that's just a simple config change or have they done some espressif/xtensa specific patching on newlib? They seem to be pulling their own repo of newlib so it makes me wonder...

BTW I am not sure what you mean here, can you elaborate? I did nothing with the Espressif fork, it's based on the repo from Max.


Yeah they have forked Max's but have then hacked the ct-ng config to add their own ideas, as usual. One thing they have done is to go to newlib 3.0, but direct the git pull of newlib to their own repo

https://github.com/espressif/newlib-esp32

So this is the esp8266 ct-ng build, but pointing to their esp32 version of newlib 3.0. Their last commits on Jan 13th of this year even revved the branch of this repo for the 8266, so quite clearly their repo is used for both 8266 and 32 (and is not very well named!!)

If I get some time soon I want to firstly look into their newlib repo to see if they have esp8266 ifdefs in the code, and secondly want to compare their newlib to the generic gcc version to see what's been changed and why they feel the need for their own special version.

Re: New Working GCC for ESP8266

PostPosted: Sun May 02, 2021 3:02 am
by eriksl
Espressif has never been known for careful naming (or even careful coding...) so that doesn't surprise me.

Their best approach for having newlib support on xtensa would be to have the patches incorporated into upstream, but I think they find that too much hassle, such a shame.

The approach they take now isn't that bad though, forking the original repo. As long as they keep their own commits at the top (rebase with upstream), so you can keep up with upstream. I am not sure whether they master git at that level though.

I am curious about your findings. If it works, we may be able to patch up the url of newlib to point to that of Espressif.

Re: New Working GCC for ESP8266

PostPosted: Sun May 02, 2021 6:38 pm
by davydnorris
eriksl wrote:Espressif has never been known for careful naming (or even careful coding...) so that doesn't surprise me.

...

I am curious about your findings. If it works, we may be able to patch up the url of newlib to point to that of Espressif.


We can definitely do that already - we can grab their sample config and diff against your one to incorporate their changes. They also seem to have forked binutils too but I've never needed an 8266 specific version of them.

https://github.com/espressif/crosstool-NG/blob/esp-1.23.x/samples/xtensa-lx106-elf/crosstool.config

Re: New Working GCC for ESP8266

PostPosted: Mon May 03, 2021 3:59 am
by eriksl
Newlib needs patches for lx106. If you just select "newlib 3.0", it will abort with "no support for lx106 in newlib".