Open nerdralph opened 9 years ago
I think the ideal would be taking Max's work and creating a script to add the lx106 files to a stock gcc source tree. 4.8 is no longer maintained. 4.9 is the minimum version you should be at, and preferably 5.2. On Dec 15, 2015 9:29 PM, "Dmitry Kireev" notifications@github.com wrote:
I'm working on building an alternative sdk: kireevco/esp-alt-sdk, which is based on similar concept as esp-open-sdk, but is meant to work on all plarforms, including Windows. It's not using crosstool-ng, and should work on mingw32,64 and probably cygwin. Currently I have a build working, some people reported errors, some people reported it working. I'm experimenting with https://github.com/fpoussin/esp-binutils vs https://github.com/jcmvbkbc/binutils-gdb-xtensa (latter has gdb in it).
Any thoughts/testing/contributions are welcome!
— Reply to this email directly or view it on GitHub https://github.com/esp8266/Arduino/issues/23#issuecomment-164955127.
@nerdralph not sure what do you mean, can you clarify please?
Max's gcc-xtensa is based on gcc 4.8.2. The lx106 is not a supported target in the stock gcc sources. Take Max's mods to the 4.8.2 tree and create a script or patch file so you can add lx106 support to the stock 4.9.3 and 5.2 sources. On Dec 15, 2015 10:09 PM, "Dmitry Kireev" notifications@github.com wrote:
@nerdralph https://github.com/nerdralph not sure what do you mean, can you clarify please?
— Reply to this email directly or view it on GitHub https://github.com/esp8266/Arduino/issues/23#issuecomment-164963774.
So, you want to take https://gcc.gnu.org/releases.html, and add lx106? That's pretty tough step, I think it's been maintained here https://github.com/jcmvbkbc/gcc-xtensa/tree/lx106-5.1?
By the way, how crosstool-ng is structured? I can't find a clear set of instructions how they build binutils?
You were asking for feedback; you didn't say it had to be easy. :-) Optimization in 4.8 without lto is pretty lame. If ipa-ra in 5.2 can work with the lx106, I expect you'd see 10-25% improvement in speed and code size. On Dec 15, 2015 10:16 PM, "Dmitry Kireev" notifications@github.com wrote:
So, you want to take https://gcc.gnu.org/releases.html, and add lx106? That's pretty tough step, I think it's been maintained here https://github.com/jcmvbkbc/gcc-xtensa/tree/lx106-5.1?
— Reply to this email directly or view it on GitHub https://github.com/esp8266/Arduino/issues/23#issuecomment-164964763.
@nerdralph
You were asking for feedback; you didn't say it had to be easy.
:-) fair enough:)
If ipa-ra in 5.2 can work with the lx106, I expect you'd see 10-25% improvement in speed and code size.
Well, that sounds great, really!
I didn't get very far into crosstool-ng before I decided it was an option I didn't want to pursue. On Dec 15, 2015 10:24 PM, "Dmitry Kireev" notifications@github.com wrote:
By the way, how crosstool-ng is structured? I can't find a clear set of instructions how they build binutils?
— Reply to this email directly or view it on GitHub https://github.com/esp8266/Arduino/issues/23#issuecomment-164966086.
@nerdralph that's the issue I'm trying to solve with esp-alt-sdk. Crosstoon-ng is way far from working ok on Windows, and I need to re-do the logic that is under ./ct-ng xtensa-lx105
...
@nerdralph just for fun, I'm trying to build binutils, gcc for xtensa target... we'll see how it goes.
Dont know if this issue is still valid but since I was searching for a newer GCC version (better constexpr
handling) for the ESP8266 I stumbled across it and a little later across that:
Binutils | GCC | libc | GDB | Download link |
---|---|---|---|---|
2.24 | 5.2.0 | Newlib 2.0.0 | 7.11 | esp8266-gcc5.2.0-r10.exe |
Link: http://gnutoolchains.com/esp8266/
That might be the desired GCC 5.2.
@igrr we discussed briefly moving to a newer toolchain, namely 5.2, which is the same as mentioned here. Would that address the issues discussed above? If so, I suggest tracking here, but I'd change the issue title.
While this issue does depend on updating to 5.2.0, there's (much) more to LTO support than just a toolchain update. Some core/libraries changes will be required for binaries built with LTO to actually work.
The included gcc wasn't built with the linker plugin, so enabling link-time optimization (-flto) fails. dlopen:'.../arduino-1.6.1/hardware/tools/esp8266/xtensa-lx106-elf/bin/../libexec/gcc/xtensa-lx106-elf/4.8.2/liblto_plugin-0.dll': The specified module could not be found. Lto not only reduces code size, it can significantly improve performance by doing constant folding for function calls like digitalWrite. http://nerdralph.blogspot.ca/2014/04/gcc-link-time-optimization-can-fix-bad.html
Want to back this issue? Post a bounty on it! We accept bounties via Bountysource.