-
-
Notifications
You must be signed in to change notification settings - Fork 3.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update Platform, Toolchain, Compiler/GCC, C++ Versions #4509
Comments
In general I'm in favour. One thing I would say is that because of the complex relationship between the various different parts of the platform I would advise caution from creating something too bespoke as franky many of the default options are riddled with bugs so we don't want to introduce more issues. So for example, using a different compiler than expressif expect could cause all sorts of fun. Therefore we need to prioritise upgrading to standard configurations first, which in turn will be limited by the libraries we use as there are many breaking changes between Arduino 2 and 3 and also esp-idf 4 and 5 |
I think that changing toolchain is the easiest and safest option. This will include new compiler and other tools. |
Recent discussion mentoring updates to C++ |
I think that was exactly related to this issue (or this issue is a result from that discussion). ESP32 env uses ancient gcc and working around that (by forcing newer standards via compiler options) may be prone to bugs. Upgrading toolchain may get us newer compiler (for better or worse yet to be determined). |
This is exactly the kind of vague comment I am trying to demystify here. What exactly are these sorts of fun? Without that knowledge, we can't really judge if anything improved with newer versions. The last time I tried building wled using newer toolchains for esp32, everything seemed to work fine for what I was trying to do. |
espressif core libraries are written and tested using a specific toolchain I am guessing. From what I have seen in those libraries they are not programmed that well or at least not as thorough as they should be. So using a different toolchain some timings might change, which can lead to unexpected behaviour or non-working peripherals. This is the "all sorts of fun". You never know what you get. But in any case, it is worth a shot but since configurations and combinateions are almost endless, it may be hard to find edge cases. |
So, please forgive my ignorance, but first question Do we get any of the newer options we are looking for in the V4 vs V3 platform? If not, does the latest V4 do any better Vs our current one? (I'm keen to ensure we first eliminate the official options before using unsupported combinations of language versions, compiler versions etc) |
Using IDF 4.4.4 upgrades gcc from 5.2.0 (July 16, 2015) to 8.4.0 (March 4, 2020) on esp32. Does it add some of the missing flags/pragmas? IIRC, it does. |
According to discord, the ESPHome guys are actively trying to get away from platformio because apparently, they stopped publishing updates for ESP platforms. Is that a path we could/should look into, too? Will try to find what and how they do/did it, later. On a related note... do we actually need arduino? |
yes, many commands and libraries depend on it. |
The fork I believe you are referring to is used to get Arduino Core V3 and ESP-IDF V5 Both of which contain breaking changes for the libraries that WLED is heavily dependent on. We will however be using this platform when we come to add support for C6 and P4 chips. See MoonModules work in this area for more details |
Is your feature request related to a problem? Please describe.
I'm always frustrated when I'm trying to work with the code.
Describe the solution you'd like
I would like to
Describe alternatives you've considered
Keeping everything as is is an option. Upgrading only parts of the above are options.
Additional context
There are some things I have been wanting to work on for time, but I don't want to deal ancient compilers and c++ versions. Currently we are bound to C++11 (except for esp8266, which compiles using C++17). Additionally, some of the compilers are so old, they lack support some basic flags and pragmas, such as changing optimization level for specific functions.
So far, when asking about this, I have gotten some vague answers there used to be some issues with some combinations of boards and platform version, but never any specifics. So, I would like this issue to be used to document:
a) what those issues are exactly, so that they can be tested with newer versions of things.
b) what would need to happen for this to work. For example: Wait for bug x to be fixed; drop support for older board y; upgrade only compiler but not platform for environment z.
With this documented, it should then be possible to discuss and estimate the impact and amount of work that would be, as well as what parts can or cannot be upgraded.
The text was updated successfully, but these errors were encountered: