Page 1 of 1

Any way to use a more up to date version of GCC?

Posted: Sat Jun 16, 2018 3:38 am
by hak8or
The IDF toolchain comes with GCC 5.2.0, and from what I understand even using Espressif's version of crosstool-NG will still use that old version of GCC. This is a GCC version all the way from mid 2015, bringing it to roughly 3 years old by now.

https://github.com/espressif/crosstool-NG

Is there any way for me to use a more modern version of GCC via Espressif's crosstool-NG, or are there considerations by Espressif to update to a new version of GCC, specifically with much better C++17 functionality?

For example, I am working on a project and want to use functionality like string_view and structured bindings so I can do stuff like this to drastically clean up my code. Not to mention the massive improvements to templates, and constexpr-if.

Code: Select all

auto [x,y] = Point(4,2);

Re: Any way to use a more up to date version of GCC?

Posted: Sat Jun 16, 2018 4:32 am
by ESP_igrr
We are working on updating the toolchain (GCC, newlib, GDB) to more recent versions. Depending on how much breakage that will cause, the update will happen either after IDF 3.1 is released, or after the next minor version. In any case, we plan to publish our branches of {GCC, newlib} (with some IDF specific patches) in a couple of weeks.

Re: Any way to use a more up to date version of GCC?

Posted: Sat Jun 16, 2018 4:30 pm
by hak8or
Oh wow, that is great! Can you comment on which major version (8,7,6) and which minor version we talking when saying recent? For example GCC 8.x (8.1 would be breath taking), GCC 7.x (7.3 vs 7.2 vs etc), GCC 6.x, etc?

Out of curiosity, why did Espressif go with GCC instead of LLVM + Clang? Is it because Mentor didn't port enough of their arch to LLVM, because more staff at Espressif were familiar with the GCC codebase, etc?