question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Using toolchain-atmelavr v5.4.0 vs v7.3.0

See original GitHub issue

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!

[env]
platform = atmelavr
framework = arduino
monitor_speed = 115200

board_build.f_cpu = 16000000L
board_hardware.uart = uart0
board_hardware.oscillator = external

upload_flags = -Pusb

; Use latest version (version 7.3.0)
platform_packages = 
    toolchain-atmelavr@~1.70300.191015

[env:megaatmega2561]
board = ATmega2561
board_build.mcu = atmega2561

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

image

toolchain-atmelavr v7.3.0

image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (1 by maintainers)

github_iconTop GitHub Comments

6reactions
EmperorArthurcommented, Feb 17, 2021

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:

  • The first google result, which is an old version of the docs, inaccurately says that “toolchain-atmelavr” contains multiple things, but has no links to the package itself
  • The latest version of the docs, just link to GCC’s latest page on the AVR. Not even the one for the compiler we’re using!
  • The packages page on the main site, also just links to GCC!
  • Searching Google for “toolchain-atmelavr 7.3” (without the quotes) now brings up fixes, but they don’t explain why the version numbers correspond

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.

2reactions
gudnimgcommented, Jan 1, 2021

You can do it like this:

; Use latest version (v7.3.0)
platform_packages = 
    toolchain-atmelavr@~1.70300.191015
Read more comments on GitHub >

github_iconTop Results From Across the Web

Using toolchain-atmelavr v5.4.0 vs v7.3.0 - Bountysource
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...
Read more >
AVR® and SAM MCU Downloads Archive
Visit the downloads archive for our AVR and SAM microcontrollers (MCUs) and microprocessors (MPUs). ... Atmel Studio 7 IDE Archives ... AVR Toolchain...
Read more >
Using AVR Studio 5 - maxEmbedded
Here is a step-by-step guide regarding how to create your first AVR Project using AVR Studio 5. After installation, open AVR Studio 5...
Read more >
gcc-avr: Package version severely outdated compared to main ...
This leaves avr-developers wishing to use newer C language features ... 4.0.2-1 ii libstdc++6 8.3.0-7 ii zlib1g 1:1.2.11.dfsg-1 gcc-avr ...
Read more >
AVR GCC Toolchain - Setup for Windows - TINUSAUR
Computer with Microsoft Windows – version 7, 8, or 10. ... On the page, look for “AVR 8-bit Toolchain v3.62 – Windows” or...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found