Two avr-gcc versions and Ardunio IDE 2.0 uses the wrong one

Hello,

I got the following problem:

  • In the …AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\ folder are two versions of avr-gcc
    • 4.8.1-arduino5
    • 7.3.0-atmel3.6.1-arduino5
  • I need when the project is compiled for Arduboy that Arduino IDE (2.0.0-beta.8) use version from 7.3.0-atmel3.6.1-arduino5 folder, not from the 4.8.1-arduino5 folder, otherwise the build fails (I see the error cc1.exe: error: -fno-fat-lto-objects are supported only with linker plugin)
  • The only way I found it can fixed is to change in platform.txt file the line compiler.path={runtime.tools.avr-gcc.path}/bin/ and instead of {runtime.tools.avr-gcc.path} use there the full path, i.e. I need to change the line to compiler.path=c:\Users\petr.mazanec\AppData\Local\Arduino15\packages\arduino\tools\avr-gcc\7.3.0-atmel3.6.1-arduino5\bin\

Why is that happening in the first place?
Is there a better way how to fix it than my workaround? Any advice please?

Thanks a lot
STeN

Your post was MOVED to its current location as it is more suitable.

Could you also take a few moments to Learn How To Use The Forum.

Other general help and troubleshooting advice can be found here.
It will help you get the best out of the forum in the future.

This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.