Please provide new gcc toolchaains

The gcc toolchains provided with the Arduino IDE are out of date:

  • For Arduino Uno projects the gcc version ist 7.3.0 (that is from 2018)
  • For Raspberry Pico the gcc version ist 10.3.0 (that is from 2020)
  • For ESP32 projects the gcc version ist 8.4.0 (that is from 2020)
  • For STM32 projects the gcc version ist 12.2.1 (that is from 2022)

According to

https://developer.arm.com/downloads/-/arm-gnu-toolchain-downloads

there are newer toolchains (gcc 13.2) available. I am missing a few of the new features.

Please provide the Arduino IDE with modern toolchains. They should be available after a new installation of the Arduino IDE, without any manual installation.

Thanks
Richard

1 Like

I'll note that 7.3 is the last version of gcc "supported" by the chip Vendor (Atmel, Microchip.) There may be similar issues with the ESP chips - just because the gcc geeks managed to compile a new version of xxxx-gcc doesn't mean that it's been strongly tested or OKed by the more "fringe" processors. (and newer versions of avr-gcc in particular have been reported to generate poorer code.)

(You can, of course, replace the toolchains manually...)

1 Like

There are some related issues here:

Note that, with modern versions of Arduino IDE, the toolchain is completely separate from the Arduino IDE installation. Toolchains are installed by Boards Manager along with the platform, according to the tool dependency data in the platform's package index file:

https://arduino.github.io/arduino-cli/latest/package_index_json-specification/

So this has absolutely nothing to do with Arduino IDE. If a platform specifies a dependency on a newer version of GCC (and a package provides that version), it will be installed and used even for those using an older version of the IDE.

Thanks.

So if it is the Boards managers responsibility, please ask those people that are responsible for the dependency data to update their dependencies so that a current toolchain will be installed. Or can you give me links to contact them by myself?

When the Arduino IDE is installed, it should be installed per default with a current version of the compiler for all boards. If not, the Arduino IDE looks like an out-dated tool.

I linked to two of the requests in my previous reply.

There are hundreds of different Arduino boards platforms. You can identify the specific platforms for which a compiler toolchain update would benefit you, then submit requests to the appropriate issue trackers. Make sure to search the trackers first to make sure a request was not already submitted.

As I already tried to explain to you, that's not how it works.

If the Arduino IDE installation included the latest compiler toolchain for every one of the ever increasing dozens of different architectures of the Arduino hardware ecosystem, that would cause all sorts of harm:

  • Each IDE user would need to download and install tens of gigabytes of tools that they don't have any need for.
  • Packaging all those toolchains would be a massive burden for the Arduino IDE maintainers, and an unfair one since it would mean doing a great deal of work to provide toolchains that aren't even used for official Arduino boards, but rather for competing products.
  • The toolchain versions would be dependent on the IDE version (some users can't or won't update their IDE).
  • The toolchains wouldn't even be used by relevant platforms because platform maintainers often prefer to pin a specific compiler toolchain version for which they have been validated to work with.

This is why the platform maintainers are intentionally given complete control over the tool dependencies.

Only to those who don't understand what Arduino IDE is.

1 Like

Only to those who don't understand what Arduino IDE is.

This will be the vast majority. The Arduino IDE is used a lot by students that don't care about background details. I am using the Arduino IDE mainly for teaching C++ for microprocessor programming. And I want to teach it with current C++. My trainings would be outdated if I would teach outdated C++.

Thanks
Richard

Feel free to create your own boards platform that uses the latest version of GCC. This is the freedom that comes from Arduino giving the platform maintainer the control over the tool dependencies instead of imposing the use of some arbitrary bundled tools.

You can fork an existing platform and then use the documentation here to make the necessary configuration adjustments:

https://arduino.github.io/arduino-cli/latest/platform-specification/

https://arduino.github.io/arduino-cli/latest/package_index_json-specification/

I can't instruct all students to make all these quite complicated adjustments.

The latest platforms should be the default (at least for the widely used Raspi Pico, ESP32 and STM32 nucleo boards). Otherwise the Arduino IDE is only of limited use.

Thanks
Richard

Of course you wouldn't require the students to create the platform. YOU the teacher should create the platform.

No, not me.

It should be the default, so that they have it available on their notebooks, wokwi, VisualMicro extensions or whatever they use.

Thanks
Richard

Please provide a detailed description of what you mean by "default".

By default I mean what I get after downloading the Arduino IDE from your web site and installing it.

Without any additional steps to do, I just want to have my Arduino, Raspberry Pico, ESP32 and STM32 nucleo board projects to use a compiler from the latest available toolchain.

Thanks
Richard

That will never happen. I've already explained the reasons.

1 Like

If not the latest toolchain, than at least a quite current toolchain (e.g. gcc 12.2).

Since the old toolchains are installed: Why not installing a quite modern instead of an outdated one? Noone should use gcc 7.3 or 8.4 in 2024 anymore.

Thanks
Richard

You need to understand that there are two separate concepts here:

  • Platforms using a recent version of GCC
  • Bundling GCC with the Arduino IDE installation

The first of these is a quite reasonable thing to request. For some architectures, it might not be feasible, as was explained by @westfw, but for other architectures it is quite possible and even already done for some. For example, the "Raspberry Pi Pico/RP2040" and "STM32 MCU based boards" platforms are already using GCC 12.x.

But the second of these simply doesn't make any sense so you are only going to sabotage any efforts to accomplish the first if you insist on tying the two things together. With the exception of the "Arduino AVR Boards" platform (which is automatically installed by the IDE via the Boards Manager infrastructure on the first run of a fresh install), all additional platforms and the tool dependencies defined by the platform maintainer will be installed on demand by the user via Boards Manager. If it is problematic to require your students to do that, then you will need to prepare your own custom environment with all the necessary dependencies for their use.

The Arduino IDE is also used by a lot of students who don't care about the latest C++ language or compiler features.

I am curious as to which "new" features in C++ you consider so important as to be "necessary" in such a class. Pretty much all of the programming classes I've ever taken have focused on teaching a "core subset" of the language that is likely to be common to whatever actual development environment the student is likely to end up in, even if it's an old C compiler on a poor architecture, or the very old compiler version that some company has settled on because they think it's too painful and dangerous to move to something newer. (I may still have PTSD-related anger related to moving code from gcc 2.95 to gcc 3.x!)

As you say/imply, any "custom" compiler environment that you could set up would not be very useful to students who move somewhere where that environment is not present (or not even ALLOWED to be present.)

AVRs barely support C++ at all, and presumably you know about the limitations of C++ on microcontrollers with limited resources and no OS. I always get a sinking feeling when I see someone asking about the latest language features. I don't want to write code that is dependent on the latest bells and whistles; I don't even want to READ code that has been obfuscated by new-compiler-featuritis.
(Of course, there are some new features that are particularly useful. But I do like to see them explicitly mentioned!)

The Arduino IDE is only meant to be "of limited use."

3 Likes

Sorry to jump into this, but please don't do it blindly. I totally agree with Delta_G

There is a lot of work and testing that needs to be done (or at least should be done) by each board type, before they switch to a new GCC release. That is, it needs to be done in such a way as to minimize any negative impact on existing programs as much as possible.

For example, with one board type: Teensy
There are some Teensy users out there, who usually try out the latest GCC and when they find versions they like, which bring in new useful features, and that do not too negatively impact other things like: code compatibility, speed, code size, ..., they might suggest to Paul(PJRC) that this would be a good.

During that process, they often find compatibility issues, with the core code, and often will issue pull requests to fix the issues they have found.

If Paul decides to update to a newer GCC release or c++ setting there is a lot of work that has to be done!

For example, I believe he has test scripts to compile most if not all of the examples of all of the libraries and board types that ship with the Teensy release and tries to resolve as many of those as he can. I am not sure of how many different combinations; his test scripts might try. That is: Does it try to compile for every optimization level, in the menu, for every board type on each platform type (PC, MAC, Ubuntu)...

He might create an alpha release with different URL, for others to help out. Once there is a version that is ready for testing, a beta is released. After typically several beta releases, hopefully where most of the compatibility issues are found and resolved an official release is made.

Often times several more compatibility issues are found, as many developers will only use the official releases.

Note; the Teensy release cycle for 1.58 was used to update to GCC 11
The 1.59 cycle was used to switch from I believe C++14 to C++17.

My guess is Teensy(PJRC) is not unique in how much work is required to update to the newer toolchains! And I can imagine each of them have to decide is this the most worthwhile thing for them to spend their limited time and resources on?

Sorry for being overly verbose here!

3 Likes

Of course a new toolchain should only be delivered as a default if it is tested and OKed. I understand that there are boards for which this may be a cumbersome process.

But I have seen, that there are boards for which more recent gcc versions are already existing:

ESP IDF ships with gcc 12.2.0, according to
GCC - ESP32 - — ESP-IDF Programming Guide v5.2 documentation

For Raspberry Pi gcc 12 is available since July 2022 according to
https://forums.raspberrypi.com/viewtopic.php?t=337581

So please ask the board vendors (or whoever is responsible for the Arduino toolchain) to update it so that the Arduino IDE is quite current after the first intallation.

@westfw: It is not, that "I need" some particular features. C is providing workarounds since 1970 for all I might need. What I want is, to teach my students state of the art C++. What they learn today, they will work with in 5 or 10 years. Among the most important features that I would like to teach are modules or std::format.

So please consider my post as an encouragement to the board vendors, to deliver state of the art toolchains.

Especially you guys from the Arduino IDE should be interested in delivering it with a current toolchain. If someone sees, the arduino IDE works with a 5 year old compiler, most people will think, that the Arduino IDE is outdatet.

Thanks
Richard

Sigh. I'm going to exit the conversation now since it seems you haven't been reading what I wrote.

I wish you and your students success in your Arduino endeavors.

Arduino is for learning and teaching about small microcontrollers and their applications.

I can't imagine why anyone would consider Arduino to be a suitable platform for teaching the C++ programming language, let alone about the latest embellishments.

Since a laptop or desktop is required to program the things, the completely obvious choice is to teach C++ using the laptop or desktop as the platform.