Updating ARM GCC, pio automatically reverts back

Hello,

I am currently porting FreeRTOSv10 to an Adafruit Feather M0 (ATSAMD21G18, Cortex-M0+). I have noticed that some assembly (asm(..)) won’t compile out-of-the box if “.syntax unified” is used and error messages for assembly code change when one changes optimization flags. Anyway, that’s not the point of this topic. I now want to eliminate the possibility that this is the compiler’s fault.

I am on platformio 3.5.0rc8 and using the Atmel SAM platform. Doing a pio update gives:

Platform Manager
================
Platform Atmel SAM
--------
Updating atmelsam                        @ 2.7.1          [Up-to-date]
Updating framework-arduinosam            @ 2.10616.1      [Up-to-date]
Updating toolchain-gccarmnoneeabi        @ 1.40804.0      [Up-to-date]
Updating tool-bossac                     @ 1.10700.0      [Up-to-date]

The compiler version in the toolchain-gccarmnoneeabi is gcc version 4.8.4 20140725, more than 3 years old.

Platformio won’t update that package, although I can see on (Service End for Bintray, JCenter, GoCenter, and ChartCenter | JFrog) that version 1.50401.0 was released 4 months ago. I can manually download the package for x86/x64 linux (Service End for Bintray, JCenter, GoCenter, and ChartCenter | JFrog), delete the contents of my ~/.platformio/packages/toolchain-gccarmnoneeabi folder, extract the new one and manually execute the gcc binary there (returns 5.4.1 20160919 (release)).

However, once these files are overwritten, and I execute a pio run, it reverts me back to the old version!

$ pio run
PackageManager: Installing toolchain-gccarmnoneeabi @ >=1.40803.0,<1.40805.0
Downloading...
Unpacking...

What am I doing wrong here? How can I (manually, if I have to) update my compiler suite without pio reverting me back?

Just change version here platform-atmelsam/platform.json at develop · platformio/platform-atmelsam · GitHub

1 Like

Thank you, this worked. But wouldn’t it better for every if every platform using the arm-none-eabi compiler would be updated to make use of the new compiler?

We try to be maximum compatible with Arduino IDE. They still use 4.x toolchain.

If you need new toolchain, just fork our dev/platform and modify dependencies. Then in your “platformio.ini” please use “platform = https://github.com/username/repo.git”. Please replace with a valid repo url.