- Tue May 09, 2023 8:43 pm
eriksl wrote:The latest newlib and newlib nano are used with no local patches, only the overlay, which is required for xtensa chips in general. The latest ESP32 risc chips don't use anything - newlib is used straight out of the box
It seems this is already the case for the 2.0.0 version which I am using (from Max Filipov), but I think the overlay is specific for each newlib version and I am really not knowledgeable about how to adjust it for other newlib versions.
If the RTOS-SDK (source) has the overlay, I'd be interested in trying it on my (current) version of crosstool-ng, it will probably just work. IIRC Espressif uses an older version of ctng for their RTOS SDK.
There's a whole lot of problems with Espressif's prebuilt toolchain, which they include in their download of the RTOS SDK bundle, as well as stand alone. The biggest problem is that it's built on Msys2 with mingw path mapping, and this doesn't work at all when you try to use cygwin. I don't want to install both Msys and cygwin, and I need more unix-like commands than just build tools, so I needed to build the toolchain under cygwin.
The second huge issue is that their toolchain versions are old compared to the latest ESP32 IDF stuff and I want consistent versions of toolchains across all my chip versions (due to the Msys2 builds of the ESP32 chip toolchains I have to rebuild them as well, but that's another story)
I looked hard at the Espressif clone of crosstool-ng - it's originally clones from Max's crosstool-ng repo but they have pulled the latest stuff from the original crosstool-ng repo and it's almost up to date. Ideally they should change their remote to the original source but doesn't really matter. And yes they have their own repos for GCC and newlib, which is really annoying, but it builds.
I went back in their releases and found the last time their repo included any esp8266 stuff and I pulled the samples up to the top, and changed it to be consistent with the ESP32 samples. The esp8266 overlays are all still there and, as far as I can see, they are version agnostic and will work with their current gcc, newlib and binutils.
So now I have built the toolchain, and I pull down the latest RTOS SDK direct from their repo and I have used that to test, and the biggest problem is in the *printf format strings throughout the SDK components. That's going to be a pain to fix, and maybe that's why they have stopped revving the toolchain