How to install a newer toolchain than the official one

I am evaluating PlatformIO for my next Arduino Due project.

My greatest concern is that I want to use the latest stable version of gccarmnoneeabi (Version 8-2018-q4-major). There is of course no such release from the Arduino team, because it would force several library owners out in the world to update their libraries. Therefore the official toolchain is by far outdated.

Can you please explain how could I define my own toolchain package without overwriting the official one and use it in parallel? Is it also possible to share such a package with other users?

Thanks in advance,

1 Like

Wow, thank you for the recent update, updating gccarmnoneeabi to 2017-q4!
(I have just received it in the 4.0 Beta, as Atmel SAM 3.7.0.)

This seems to be a huge but reasonable step, as Arduino itself brought out this version for SAMD as a beta a while ago, so library owners had some time to adapt. This already allows us to use most of the modern C++ features.

I have also found that the package toolchain-gccarmnoneeabi-darwin_x86_64-1.80201.181220.tar.gz is also available. Is it possible to select this one in the platformio.ini of a project somehow, or do I need to fork the whole platform to use it?

You should be able to use the new platform_packages feature (docs)

platform_packages =

Just for the others in case somebody else is interested in it, I was wrong with the exact version number.

platform_packages = toolchain-gccarmnoneeabi@1.80201.190214

I also added this line:
build_flags = -std=c++17

Of course there are some compiler warnings in arduino sources, and I haven’t tested much on the target hardware.

1 Like

Just for safety reasons you should also build_unflags = -std=... whatever C++ standard it was using before. Best to get a look at a compile command using pio run -v and inspecting all set -std switches for a g++ invoke


Thanks, you are right.
build_unflags = -std=gnu++11

And now I have much-much more warnings. :slight_smile: