-
-
Notifications
You must be signed in to change notification settings - Fork 106
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Using toolchain-atmelavr v5.4.0 vs v7.3.0 #224
Comments
I'm not sure why they aren't using v7.3.0 either. Arduino IDE have been doing this for a long time, and some of the gurus over at the Avrfreaks forum complains that MPLAB X and Atmel Studio 7 bundles v5.4.0 and not v7.3.0. BTW how did you switch between these two versions in PlatformIO? @valeros any good reason to stay at v5.4.0? |
You can do it like this: ; Use latest version (v7.3.0)
platform_packages =
toolchain-atmelavr@~1.70300.191015 |
Thank you so much @GunZi200 I have been searching everywhere for how to include a newer toolchain. How did you find what version mapped to "~1.70300.191015"? I can't seem to find that information. |
@EmperorArthur I saw it here on the PlatformIO forum (from @maxgerhardt) https://community.platformio.org/t/code-not-building-in-platformio-but-building-in-arduino-ide-avr-core-issue/16618 😄 |
Users also encounter actual compiler bugs in e.g. here and some Arduino libraries like FastLED need the newer compiler too to be compilable (see here). Also the avr-stub library sometimes doesn't compile without a newer compiler (see here). If the Arduino IDE is using it currently, I'd say we should upgrade immediately. CC @valeros |
As a workaround, I downloaded GCC 10 for AVR from here https://blog.zakkemble.net/avr-gcc-builds/ and manually copied it all to ~/.platformio/packages/toolchain-atmelavr. Now I can use the latest C++ in my builds :) |
At the least the documentation around "toolchain-atmelavr" could be expanded. Especially since this will probably happen again in the future. Instead of stumbling around, trying to figure out where to get the latest version, there should be a page somewhere. As an example:
Heck, I have no idea where the "toolchain-atmelavr" repository is, where PlatfomIO downloads it from, or even how it is built! This might be another issue, but it certainly made something as easy as upgrading a dependency into a nightmare. |
Hello everyone :)
I was simply trying to include
#include <cstdint>
for ATmega2561 which didn't work on v5.4.0 or v7.3.0 so maybe avr doesn't support it (curious about some C++ features). Anyway... I saw a big difference in program size between using v5.4.0 or v7.3.0: 468 byte difference to be exact!I am curious why v7.3.0 is not the default? Are there some compatability issues? Also is it possible to use an even newer version for avr-gcc? I noticed Arduino IDE uses v7.3.0 in their latest version v1.8.13
toolchain-atmelavr v5.4.0
toolchain-atmelavr v7.3.0
The text was updated successfully, but these errors were encountered: