# AVR-GCC 10.1.0 for Windows 32 and 64 bit

This is where I’ll be uploading builds of AVR-GCC for Windows 32 and 64 bit, which will also include Binutils, AVR-LibC, AVRDUDE, Make and GDB. I’ll be trying to keep the builds up to date with the latest tool releases when I can.

The binaries are built from source on a Debian 10 virtual machine with MinGW (GCC 9.1.0 and older were built on an Arch Linux VM), apart from AVRDUDE where the pre-built binaries are obtained from the official download area. Both 32 bit and 64 bit Windows binaries are provided. There’s probably no benefit from using the 64 bit stuff, but all the cool kids are doing it so why not.
A bash script for building AVR-GCC, AVR-Binutils, AVR-LibC and AVR-GDB from source is also provided below, making it super easy to build these tools for yourself.

# Included tools

Tool Version
GCC 10.1.0
Binutils 2.34
AVR-LibC SVN with extras
GDB 9.2
AVRDUDE 6.3 (Not included in Linux release)
Make 4.2.1 (Not included in Linux release)

Upgrading the Arduino IDE is pretty easy, though there could be some incompatibilities with certain libraries. I’ve only tested this with Arduino 1.8.2.

2. Navigate to your Arduino IDE folder
3. Go to hardware/tools
4. Move the avr folder somewhere else, like to your desktop (renaming the folder won’t work, Arduino has some auto-detect thing which sometimes gets confused)
5. Move the extracted folder from earlier to the tools folder and rename it to avr
6. Copy the builtin_tools_versions.txt file and etc folder from the old avr folder to the new one

None

# Build Script

This build script will install the required packages, create directories and build the tools from source. This should work on Debian 8+, Ubuntu 16.04+, CentOS 7 and maybe Arch.

Building takes about 1 hour 45 minutes on an Debian Linux virtual machine with 4 cores i5 2500K @ 4GHz and 2GB RAM.

#### 4 pings

• Fridolin on May 2, 2016 at 10:55 pm

Hi,

compiling with

-xc *.c

results in

avr-gcc: error: *.c: Invalid argument

1. Hey Fridolin, I also saw your post on mikrocontroller.net about it being available in previous versions, but none of the GCC versions I tried (4.7.2, 4.9.2, 5.3.0) accept *.c as a valid argument :/

• JoJo on June 22, 2020 at 8:53 am

Problem is that * is not resolved by the shell. You need special build options to advise the tools to do so.

1. Yes, the option is --enable-mingw-wildcard which has been in use since the 8.2.0 release.

• Fridolin on May 2, 2016 at 11:16 pm

Please try an official version, for example the one included in Atmel Studio. It works ok with -xc *.c

-xc *.c is needed to be able to use -flto (which optimizes the code much better than when compiling the files one-by-one).

• Fridolin on May 2, 2016 at 11:26 pm

This is what an official Atmel Studio

avr-gcc -v

outputs (compile parameters). Maybe in your build something is missing?

Using built-in specs.
COLLECT_GCC=C:\Program Files (x86)\Atmel\Atmel Toolchain\AVR8 GCC\Native\3.4.1061\avr8-gnu-toolchain\bin\avr-gcc.exe
COLLECT_LTO_WRAPPER=c:/program\ files\ (x86)/atmel/atmel\ toolchain/avr8\ gcc/native/3.4.1061/avr8-gnu-toolchain/bin/../
libexec/gcc/avr/4.8.1/lto-wrapper.exe
Target: avr
Configured with: /home/jenkins/workspace/avr8-gnu-toolchain/src/gcc/configure LDFLAGS=-L/home/jenkins/workspace/avr8-gnu
-toolchain/avr8-gnu-toolchain-win32_x86/lib CPPFLAGS= –target=avr –host=i686-pc-mingw32 –build=x86_64-pc-linux-gnu —
prefix=/home/jenkins/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86 –libdir=/home/jenkins/workspace/avr8-gnu
-toolchain/avr8-gnu-toolchain-win32_x86/lib –enable-languages=c,c++ –with-dwarf2 –enable-doc –disable-shared –disab
gnu-toolchain-win32_x86 –with-gmp=/home/jenkins/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86 –with-mpc=/h
ome/jenkins/workspace/avr8-gnu-toolchain/avr8-gnu-toolchain-win32_x86 –enable-win32-registry=avrtoolchain –enable-fixe
d-point –with-pkgversion=AVR_8_bit_GNU_Toolchain_3.4.5_1522 –with-bugurl=http://www.atmel.com
gcc version 4.8.1 (AVR_8_bit_GNU_Toolchain_3.4.5_1522)

1. I have that same version of Atmel’s version of GCC, but mine still stays that *.c is invalid. [This] seems to say that you can specify all the files individually, during compile or after once the object files have been created.

2. Ah my bad, *.c does work, I didn’t have any .c files in the working directory! I’ll post an update in a bit…

3. Ok, I can’t seem to find anything obvious that I might have missed, so I’m not sure why *.c isn’t working on my 6.1.0 build. I guess a workaround for now would be specify each individual .c file -xc file1.c file2.c file3.c.

• Fridolin on May 3, 2016 at 5:28 pm

Do you know what’s strange? The order in which I specify all the .c files makes a difference in the binary size (that is also the case in the older versions).

• Fridolin on May 7, 2016 at 12:45 am

http://www.mikrocontroller.net/topic/396402?goto=4569504#4569522

Summary:

Default configuration of mingw-w64 misses wildcard support.

Two solutions:

You can recompile mingw-w64 from source with configure –enable-wildcard

or

Use Arch Linux. Their mingw-w64 has wildcard support enabled.

1. Ah thanks! I’ve rebuilt everything using Arch Linux, *.c now works, the download links have been updated 🙂

• Felix on May 3, 2016 at 11:48 am

1. LTO is enabled by default, so no need for any extra build options.

• Kshitij on May 17, 2016 at 6:51 am

Hello Zak,

This is a commendable effort. However, its missing AVR specific patches. For your next build, would you please apply the binutils-patches for avr and some avr-gcc specific updates, which are available at http://distribute.atmel.no/tools/opensource/Atmel-AVR-GNU-Toolchain// ? Off the top of my head, without the avr-size patch, the avr-size –mcu option will not work. There are also some fixes for ATtiny, iirc. Their GCC fixes do get merged upstream occasionally, but for a custom built toolchain, the binutils fixes do need to be looked into.

Either way, nice job.

1. Thanks for the link, though there seems to be a lot of patch failures for the latest GCC and things. I’ll have to go through them sometime, the few I looked at where because they’ve already been merged.

• Fridolin on September 23, 2016 at 10:04 am

Hi, have you tried compiling avr-gcc 6.2?

1. Oh! I didn’t know 6.2 was out, I’ll get it compiled sometime soon.

• Fridolin on April 16, 2017 at 7:41 pm

Any news?

6.3 has been out for quite some time now.

1. Oh, 7.1 is out now lol, I’ll probably get an updated download sorted this weekend.

• Stefan on October 12, 2016 at 12:08 pm

Where is make.exe?

1. You can download make [here]. Though, I think I’ll include it with future AVR-GCC builds.

• SigmaN on March 9, 2017 at 8:25 pm

AVR Toolchain GCC 6.3.0, binutils 2.28, avr-libc 2.0.0

Bug with string constant is FIXED.

Win32, Win64, Linux64, avr-libc in separate folders https://drive.google.com/file/d/0B7dMRxCEo4yhV283QVJUYlpBRW8/view?usp=sharing

Win32 Build ready for integration in Atmel Studio 7

• Willem on May 4, 2017 at 12:55 am

I got this to work with gcc 7.1.0.

* in your build script, the PREFIX_LIBC variable points to a different location than the rest of the tools. It should be the same.
* avrdude is missing in the build script. it also needs to be installed in the same prefix path.

Then, after building, and replacing the Arduino.app/Contents/Java/hardware/tools/avr directory, it almost works.
Except that i initially got this error when linking:

core/core.a: error adding symbols: Malformed archive

Somehow this is solved by changing the -std commandline option in platform,txt to: -std=gnu++1z.

The string bug mentioned seems to be solved.

I now use this shell script for switching: https://gist.github.com/nlitsme/04f33ec27cafd8678fddc66ecad9e828

PREFIX_LIBC is supposed to go to its own directory, so the contents can then be easily copied to the x86 and x64 builds.
I didn’t include avrdude in the build script as official pre-built windows binaries are readily available here, unlike GCC. The official binaries are the the ones I included in the download packages.

• Rob on May 24, 2017 at 11:46 pm

Hello,

Forgive me for being very stupid. I don’t know what AVR-GCC 7.1.0 for Windows 32 and 64 bit is. Is this software for the “N l Watch”?

1. Hey Rob, AVR-GCC is a set of tools used to compile source code (C and C++ code) into a format that can be loaded onto an AVR microcontroller, usually a .hex file. AVR-GCC isn’t specially made for the N|Watch, it can be used by any project that needs to compile some code for AVR.

• Henning on July 8, 2017 at 10:59 pm

Out of the box libwinpthread-1.dll is missing, it was present in the 6.1 release. Without it executing gcc fails.

Some kind of integrated coreutils would be really nice, I think.

1. Thanks for telling me about the missing dll! I’ve updated the downloads to include it now. I’ll have a think about including coreutils in the next release then.

• Theo on July 9, 2017 at 8:18 am

Great work! Thank you very much for these updated components!

Unfortunately, the package is still incomplete, I had to copy libwinpthread-1.dll to .\avr\libexec\gcc\avr\7.1.0\ as well.

• Henning on July 13, 2017 at 4:04 pm

Thank you very much!

• Wouter van Ooijen on March 3, 2018 at 10:05 am

Great work, it enables me to use modern C++ (C++17, concepts) for avr8 chips, both within Arduino and with my stand-alone makescripts.

But.. is anyone aware of a similar effort for Linux distro’s? All I can find is very old avr8-gcc versions.

1. Hey Wouter, I’ve just added a 7.3.0 release for Linux, see how it works for you.

• Alexander Kokushkin on September 6, 2018 at 4:53 pm

Hello, thank you! I tried 32bits build on Win7 and 64bits on Win10 running as Admin, with disabled antiviruses and using various Arduino folders compiling empty project but got this error:

c:\arduino-pr-beta1.9-build-80\hardware\tools\avr\bin../lib/gcc/avr/8.2.0/../../../../avr/bin/ar.exe: unable to rename ‘C:\Users\Support\AppData\Local\Temp\arduino_build_442983\core\core.a’; reason: File exists

Do you have any suggestions how to fix it? Thank you!

1. Hi Alex, I think this might be a bug with GCC 8. It looks like it has problems with adding new members to existing library archives. GCC 7.3.0 is the latest version that works, there’s a download for it at the bottom of the blog post, click on the ‘View History’ button.

• Henning on September 7, 2018 at 11:30 am

Thanks for your constant updates! You can work around the above core.a error by starting Arduino as admin and or disabling the virus scanner this sometimes helps. Using a portable version of Arduino or installing it into an unprivileged folder should work best. The problem seems to be widespread and not limited to GCC8. However after working around that I am met with “cc1.exe*: error: -fno-fat-lto-objects are supported only with linker plugin.” Arduino failed with GCC 8.1 with another error I did not investigate.

1. No problem! I still have the core.a error when running the portable version of Arduino from desktop as admin without any antivirus. With GCC 8.2 or 8.1 and binutils 2.31.1 I get the core.a rename error and with bintuils 2.30 I get a “file not recognized: file truncated” linker error. I think there might be some incompatibility with the AVR version of GCC 8 and binutils when dealing with library archives?

• Snek on September 24, 2018 at 12:52 pm

Had the same problem with latest ARM embedded toolchain. If you want to get LTO working properly you need to pass LTO plugin to ar. In boards.txt find ar flags and add –plugin=D:\path\to\toolchain\liblto_plugin-0.dll to it (plugin extension and path format depends on what OS you’re using).
I didn’t manage to pass the core.a problem with 8+ toolchain, but since you mentioned run as admin I’ll give it a try again. But still this problem has something to do with ar, just like LTO (since I was able to build without it).

• Shobai on September 11, 2018 at 9:53 pm

Thanks for doing this!

• Snoop05 on October 22, 2018 at 11:13 pm

Hi Zak, great job with MinGW builds. What about including avr-gdb (or at least as separate package)?

1. Hey Snoop, an avr-gdb build is something that I’ll be having a look into at some point, a few people have requested it already 🙂

• Thomas Zeisluft on January 2, 2019 at 4:40 pm

Thanks,!

I tried the 32 and 64 packages on windows from Atmel Studio 7.

avrsize reports 0% usage for all memory, and the CPU macro (rg __AVR_ATmega644P__) is not being defined.

Apart of that it just works so far.

Thomas

• apollo on February 20, 2019 at 10:49 am

Hi,
there is also an issue with your 7.3 package regarding the missing avrxmega3 lib!
means for attiny1616 gcc 8.c as well as 7.3 can’t be used – unfortunately!

Could you check and fix the issue with avrxmega3 lib?

many thanks, dk4ug

1. Hi Apollo, 8.2.0 has support for xmega3 devices so you might be able to just copy the xmega3 files from that to 7.3. However, AVR-libC doesn’t have xmega3 support so you’ll need to define all the register addresses and things yourself. The packs from here have some xmega3 stuff http://packs.download.atmel.com/ rename the .atpack to .zip.

• Labø on July 11, 2019 at 3:13 pm

Any way to use this on platformio for Arduino mega project?

1. Hi Labo, it’ll probably work, you’ll need to find where platformio keeps the AVR compiler and replace it with this one.

• Drashna on February 27, 2019 at 10:55 pm

I think that AVR GCC 8.3 is out now. That should fix the issues with 8.2-8.1.
Would you mind releasing a new version?

1. Aaaaannd done 🙂 Yup, those library archive issues seem to have been fixed.

• Thomas on March 5, 2019 at 11:54 am

Thanks for the ongoing effort.
Works nicely, just the avr-size patch is still missing, so I use the old avr-size executable

1. Hi Thomas, no problem 🙂 It seems that using avr-objdump with the -Pmem-usage argument is the new way of getting memory usage % – https://www.avrfreaks.net/forum/where-does-avr-size-get-data-supported-devices

• Dave on March 14, 2019 at 4:52 am

Thanks for doing this great work in updating AVR support to 8.3! Microchip only includes 5.4.0 with Atmel Studio, and no support with MPLABX (unless Atmel Studio is installed, too.). Since I do all of my development work in MPLABX it’ll be nice to free up some gigabytes by getting rid of Studio 7.
I also read all of the comments posted and further commend you for the speed with which you post fixes. Far better than I’ve ever seen, especially considering how technical the work is when building gcc. Nice work!

• Drashna on March 20, 2019 at 4:02 am

Awesome, thank you so much!!

Would you be willing to release the same for ARM GCC?

1. Hi Drashna! There’s already a lot of work going into ARM GCC builds – https://developer.arm.com/open-source/gnu-toolchain/gnu-rm/downloads and https://github.com/gnu-mcu-eclipse/arm-none-eabi-gcc/releases/tag/v8.2.1-1.2 (the second link would be better as there is currently a bug with the official release and 64bit Windows https://bugs.launchpad.net/gcc-arm-embedded/+bug/1810274).

• Drashna on March 20, 2019 at 7:11 pm

However, the problem is, that I use LTO, and these builds error out when using LTO.

But I suppose I should just disable it for ARM, since there is plenty of room.

Either way, thanks for your work!

1. Theres some stuff about liblto_plugin in the second link, that might help!

2. Nevermind, I didn’t need to copy any dlls for LTO like in the link. Just make sure you don’t have any -g debug flags set. Though, I found that LTO increased program size by almost 1K on the project I tried it on.

• Drashna on May 18, 2019 at 8:05 pm

Looks like 9.1.0 is out. I’ve seen it used by Arch.

1. Awesome! Windows builds have now been put up!

• Mosi on May 19, 2019 at 9:41 am

Hi
Would you please tell me what is difference between WinAVR and this AVR-GCC Windows?
Thanks

1. WinAVR is AVR-GCC 4.3.3 (very old) built for 8-bit and 32-bit AVRs, and includes bunch of other tools like SimulAVR and GDB.

• millo on May 27, 2019 at 3:17 am

Hello, is version 9.1 tested with Arduino IDE? Or is the text an old text? Then there is another problem with the avr-size.exe in the bin directory. Atmel Studio shows me 0Byte flash and ram. If I take an old avr-size.exe I get something displayed. But I don’t know if the values are correct now. Because the version is old and smaller. 491kB to 614kByte. Is there a solution?

1. This has been the case with avr-size for a long time now, the new way is to use avr-objdump with the -Pmem-usage argument – https://www.avrfreaks.net/forum/where-does-avr-size-get-data-supported-devices

• millo on May 27, 2019 at 3:34 am

Hi, and the includes of the new ATmega controller of the 4000 series are missing.

1. To add support for new microcontrollers you need to copy various files from Microchip’s version of AVR-GCC http://packs.download.atmel.com/ and some info here https://www.avrfreaks.net/forum/atmega4809-and-avr-libc

• Daniel Fernandes on June 23, 2019 at 3:33 am

Greetings.
My Windows is 64bit but the Arduino is certainly 32bit because it is installed in the Program Files (x86) folder, so which version should I download, x64 or x86?
Thank you

1. Hey Daniel, you can use either version as Arduino runs the compiler as a separate program.

• Steven on July 16, 2019 at 9:34 am

For some reason your 9.1 build (at least on linux) is lacking support for Xmega3 devices like the ATtiny212, ATtiny214, ATtiny412, ATtiny414, ATtiny416, ATtiny417, ATtiny814, ATtiny816, ATtiny817, ATtiny1614, ATtiny1616, ATtiny1617, ATtiny3214, ATtiny3216, ATtiny3217 which were introduced in gcc 8 series.

1. I’ve been using 9.1.0 (Windows) with an ATtiny402, another xmega3 based controller, without problems. However, avr-libc does not yet support it so you’ll need to copy various files from Microchip’s version of AVR-GCC http://packs.download.atmel.com/ and some info here https://www.avrfreaks.net/forum/atmega4809-and-avr-libc

• Steven on July 16, 2019 at 11:01 am

Hi Zak,

yes I looked into that, and you are correct.

Is it just me or does avr-libc have an abandon-ware smell to it?

Anyway, there are patches to put XMEGA3 support into avr-libc. Various people report success on the avr-libc list. I have made a modification to your script which will allow you to get the avr-libc source directly from SVN and patch with xmega3 support. Testing it now. When I get it to work I will share it back.

• Steven on July 16, 2019 at 2:00 pm

Yes, it works fine. No more copying files from hither and thither.
If your interested my modified version of the script is here: https://github.com/stevenj/avr-gcc-build-script

It will work as normal if you specify an archive for avr-libc. but if you say it’s “avr-libc-SVN” it will check out avr-libc from the official subversion repo, and patch it with the patch from here: https://savannah.nongnu.org/patch/?9543

• Steven Johnson on July 17, 2019 at 2:18 pm

Actually, I have just forked AVR-LIBC and use that in my version of your build script now. I include a number of changes, not just xmega3 support, bringing in a number of old outstanding patches to official avr-libc.

1. Awesome work 😀 I’ll see about making a build that contains your forked avr-libc, lots of useful fixes there!

• milelo on July 31, 2019 at 10:04 am

I tried upgrading my ATtiny10 project from 8.3.0. the compiled program size was 1006 bytes (98.2% Full) with the new version it is now 1188 bytes (116.0% Full) so not usable. It looks like there is an issue with optimization for this device.

1. Heya, yeah different versions of GCC give slightly different code sizes, probably with slighly different run speeds too. Older versions like 4.9.2 might give the smallest sizes. Have you tried different optimaizaton levels, like -0s?

• CompMan on August 5, 2019 at 11:16 am

Hello! Can you give a link to version 8.3.0?

1. Heya, there’s a View History button at the bottom of the blog post with links to all previous releases.

1. Thank you so much. Although the toolchain 3.6.1 with GCC 5.4.0 included in Atmel Studio 7.0.1931 can compile C++14 code, it doesn’t support builtin functions like __is_trivially_constructible, which means I can’t write complete C++11 code. With your 9.1.0 build, I even want to use C++20 features!

2. Size of hex file is shown as 0 in compiler output and properties window. After I replace avr-size.exe with the original one, it works correctly. There is some problem with avr-size.exe in your build.

3. I found the reason. Given command line option “–help”, the original avr-size.exe prints:
C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin>avr-size –help
Usage: avr-size- [option(s)] [file(s)]
Displays the sizes of sections inside binary files
If no input file(s) are specified, a.out is assumed
The options are:
-A|-B|-C –format={sysv|berkeley|avr} Select output style (default is berkeley)
–mcu= MCU name for AVR format only
–mlist-devices List all supported MCUs
-o|-d|-x –radix={8|10|16} Display numbers in octal, decimal or hex
-t –totals Display the total sizes (Berkeley only)
–common Display total size for *COM* syms
–target= Set the binary file format
-h –help Display this information
-v –version Display the program’s version

avr-size: supported targets: elf32-avr elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex

For the new one:
C:\Program Files (x86)\Atmel\Studio\7.0\toolchain\avr8\avr8-gnu-toolchain\bin>avr-size+ –help
Usage: avr-size+ [option(s)] [file(s)]
Displays the sizes of sections inside binary files
If no input file(s) are specified, a.out is assumed
The options are:
-A|-B –format={sysv|berkeley} Select output style (default is berkeley)
-o|-d|-x –radix={8|10|16} Display numbers in octal, decimal or hex
-t –totals Display the total sizes (Berkeley only)
–common Display total size for *COM* syms
–target= Set the binary file format
-h –help Display this information
-v –version Display the program’s version

avr-size: supported targets: elf32-avr elf32-little elf32-big plugin srec symbolsrec verilog tekhex binary ihex

Note that the option “-C” is unsupported in the new one.
Then I write a program to replace avr-size.exe. It simply prints command line options to a file. I found that Atmel Studio invoke avr-size.exe with option “-C”. So it can’t parse the output (the help info above). That’s the reason it shows 0.
A solution is to replace the avr-size.exe with the original one. It works, for both builder output and properties window.

1. Heya Jerry, using avr-objdump with the -Pmem-usage argument is the new way of getting memory usage % – https://www.avrfreaks.net/forum/where-does-avr-size-get-data-supported-devices

• Androiders on November 23, 2019 at 9:17 am

Hi!

I am in the process of trying to build a crosscompiler for avr for linux and found this supperb page. Thank you.
However, i think there is something wrong with the makefile generation.
I followed the steps from your buildscript above (but did them manually) and produces a Makefiles in the …/obj-avr/include/avr that had spaces on line 644 instead of a TAB. After i changed that it seems to work.

Excellent work by the way!

• gjl on January 16, 2020 at 9:38 am

Hi, some random remarks:

1) When configuring GCC, –with-gnu-as –with-gnu-as might improve toolchain experience in some cases.

2) Binutils is sometimes overly strict with build warnings and errors out depending on how the build compiler warns. This can be mitigated by –disable-werror when configuring Binutils

3) I am having problems building avr-gcc in parallel, presumably due to some libgcc make(file) glitches, whereas building the host stuff (make -j xxx all-host) works fine for me.

• Andreas on February 29, 2020 at 11:10 pm

in the last days I tried to build the following plugin:

https://github.com/jcmvbkbc/avr-flash-vtbl

It is used to move the vtables of the AVRs into the .progmem instead of .rodata section. The plugin is simply used as compiler Parameter -fplugin=avr-flash-vtbl.so. Unfortunately the path to the plugin has to be absolute. At least, that’s the way it was working for me. Perhaps someone can confirm the opposite.

But to build and use the plugin, the compiler had to be configured and compiled with the –enable-plugin. This took some time. For this I used your script. Thanks! Only the option mentioned above was added. After that I still had some troubles with the
plugin. To spare the others, I’ll put compiler and the plugin. The plugin is located directly in the archive. Under Linux I did not test the plugin. If someone tried a feedback would be helpful!

Here are compiler Avr-Gcc 9.2.0 and plugin for Linux and Windows:

https://c.1und1.de/@520232801136547587/bdXynAy6S5ym-0B2PZPquA

Best regards Andreaas

1. Hi Andreas, thanks for this! I’ll build the next AVR-GCC release with –enable-plugin.

• Bercik on March 16, 2020 at 10:53 am

Hi Zak, hi to all readers,
for the last few days i tried to build my own toolchain with the most available updates and the latests version of headers files from atmel/microchip atpacks.

For the simple info:
– Binutils 2.34
– GCC: 9.3.0 (main relesase) build with “–enable-plugins” option
– AVR-LibC: SVN r2550

https://mega.nz/#F!lSpQXa4K!o0lD5wC46_H7INk-3qwyYA
please check if everything is correct.

and ofcourse:
wash your hands and stay at home.

1. Looks good to me, good work an including all of the patches!

• supersuper on March 19, 2020 at 11:32 pm

hi,
have you any plan to build version 9.3 which was released some days ago?!

thanks

1. Heya, yes, a 9.3.0 release is on the todo list, but for now Bercik has kindly made a release with a bunch of extra patches included – https://blog.zakkemble.net/avr-gcc-builds/comment-page-1/#comment-209216

• Piotr on April 26, 2020 at 8:56 pm

Hi,
Would it be possible to add some c++ standard library headers to the build? I know a lot of them wouldn’t be very useful for embedded programs but there is a few that would really help. E.g. “type_traits” or “cstddef” which has “std::byte” in addition to things from “stddef.h”.
Best Regards

1. Hi Piotr, I’ll have a look at including it, but no promises!

• kimstik on June 18, 2020 at 11:14 am

This is known annoying bug of gcc since v9
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91189

BTW, Zak, may you build binaries for GCC 8.4 ?

• bequest333 on June 19, 2020 at 6:13 pm

Great work,I am using attiny and avr-as.
I want to store the flash address in EEPROM, but it doesn’t work.
Is there a way to avoid the error?　lo8 compiles fine.

.section .eeprom
O .byte lo8(RRESET0)
X .byte pm_lo8(RRESET0)
Error: junk at end of line, first unrecognized character is `(‘

Thank you.

• JoJo on June 22, 2020 at 9:01 am

Hi, in your v10 build, 64-bit double (-mdouble=64) is not working properly because some essential patches for avr-libc are missing, namely #57071 for math. h et al. and #49567 for multilib structure.

1. Thanks, I’ll have a look into these.

4. Just tried with 1.8.13, which compiles and loads just fine as installed from the binary.

First error (I’ve not gone verbose as the earlier messages are not relevant, I think).

avrdude: can’t open config file “C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf”: No such file or directory
avrdude: error reading system wide configuration file “C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf”
avrdude: error reading system wide configuration file “C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf”

This appears to be a result of the missing /etc sub-directory containing avrdude.conf.

Copying this directory from the installation then produces the following error,

avrdude: error reading system wide configuration file “C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf”
avrdude: error reading system wide configuration file “C:\Program Files (x86)\Arduino\hardware\tools\avr/etc/avrdude.conf”

1. Hi David, yes, the Arduino install instructions do mention about copying the etc folder from the original toolchain to the new one. The jtagice3_updi error is because the avrdude that comes with this toolchain doesn’t have all of Arduinos extra stuff. You’ll need to copy bin/avrdude.exe from Arduinos avr folder. I’ll have to add that to the instructions too.

• Gustavo on September 28, 2020 at 3:39 pm

Hi Zak, congratulations on your great work!
Is there a way to get your exact script and environment to build v8.3.0? I understand that you were using Arch Linux before, right?
If your v8.3.0 binaries are available somewhere, please pass me the link as well. For whatever reason, I get smaller ATtiny85 Ihex binaries with that version than with the newer ones on Windows (though I’m by no means an expert on compilers). If you have any clues as to why this could be happening that would be great, I am using exactly the same makefile for all my test, just replacing the avr-gcc directories to switch versions.
Thank you!

1. Hey Gustavo, scroll down to the bottom of the post just under the build script. There is a “View History” button, click that and there is a download for 8.3.0. The increased binary size seems to be a known thing for GCC 9 and 10 ( https://gcc.gnu.org/bugzilla/show_bug.cgi?id=91189 ) and is unlikely to be fixed. AVR support will probably be removed in GCC 11 too 🙁

• Gustavo on September 30, 2020 at 2:16 pm

Thanks Zak! After posting my question I saw that someone had also asked for previous versions a while before, sorry for that. Yes, I read about the avr-gcc end of support in AVR Freaks, very bad news … Regards!

• millo on October 28, 2020 at 11:25 pm

Hallo,

> “AVR support will probably be removed in GCC 11 too.”
Is no longer current. Someone is working on the implementation of the gcc requirement to maintain avr support. Everyone is still allowed to donate.
https://www.bountysource.com/issues/84630749-avr-convert-the-backend-to-mode_cc-so-it-can-be-kept-in-future-releases

1. Yes, I saw that bounty, but I don’t see any proof that someone is actually working on it. It says Mini69 started working on it in August and also estimated to have it done for August, but it looks like any random person can say that.

EDIT Actually, going to the bug thing here it looks like pipcet is working on something, but not much activity since August though.

1. […] tip to Zak Kemble for providing this single-package download for Windows 32/64 and a bash script file for building from source for GCC, Binutils, and […]

2. […] the help from: Zak’s Electronics Blog ~* and AVR LIBC user’s manual I have compilied Download from Dropbox: avr-linux-toolchain.tar.gz […]

3. […] avr-gcc pre-built binaries […]