PlatformIO Community

Udate toolchain "arm-none-eabi-gcc"

I’ve created a newbie project and it seems it uses kinda out-dated to “arm-none-eabi-gcc” version:

.platformio\packages\toolchain-gccarmnoneeabi\bin>arm-none-eabi-gcc.exe --version
arm-none-eabi-gcc.exe (GNU Tools for Arm Embedded Processors 7-2017-q4-major) 7.2.1 20170904 (release) [ARM/embedded-7-branch revision 255204]
Copyright © 2017 Free Software Foundation, Inc.
This is free software; see the source for copying conditions. There is NO
warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.

How to update to the latest one https://developer.arm.com/tools-and-software/open-source-software/developer-tools/gnu-toolchain/gnu-rm/downloads?

PlatformIO wizard offers a project based on “Zephyr RTOS”.
How to do a bare-metal (clean) project - no RTOS?

PlatformIO is choosing the compilers to fit those which are used natively by the framework, e.g. Arduino or mbed-os or Zephyr. E.g., Arduino cores are usually based of older GCC versions, and to keep compatibility so that one code compiles just as in the other environment, PIO does the same. So, changing the compiler should be done with care.

PIO only works packages (and never native installs). The ARM GCC is in the packages toolchain-gccarmnoneeabi. The documentation tells you how to choose a certain package version. Available package versions can be found by visiting the bintray and filtering for toolchain-gccarmnoneeabi-. It’s then listed per-OS. E.g., the latest version for Windows x64 is 1.90301.200702 meaning GCC 9.3.1 and thus selectable via platform_packages = toolchain-gccarmnoneeabi@1.90301.200702.

If you want the latest-greatest and it’s not available in the package repo, you must create a package yourself, by downloading the compiler archive sticking in a package.json (format can be seen e.g. in a downloaded bintray pacakge), then pointing to a downloadable version of that archive in a platform_packages directive.

Just create the project with any framework in that wizard, then modify the platformio.ini to remove the framework = ... line. That will remove compiling in a framework and you’re now baremetal. An example of that is given for an AVR Atmega328P in this project.