AVR-GCC 11.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 11.1.0
Binutils 2.36.1
AVR-LibC SVN with extras
GDB 10.2
AVRDUDE 6.3 (Not included in Linux release)
Make 4.2.1 (Not included in Linux release)


avr-gcc-11.1.0-x64-windows.zip (100.0 MB)
AVG-GCC 11.1.0 Windows x64 (64 bit)
Downloaded 5630 times
MD5: 3043B0659163DD116D02FE3470D404D5

avr-gcc-11.1.0-x86-windows.zip (98.3 MB)
AVG-GCC 11.1.0 Windows x86 (32 bit)
Downloaded 1149 times
MD5: B6459D9048B0870A96544330E54B66AE

avr-gcc-11.1.0-x64-linux.tar.bz2 (75.9 MB)
AVG-GCC 11.1.0 Linux x64
Downloaded 592 times
MD5: 53BBFC8CA900F2583A1DC45F13F589BF

Known Issues

Using avr-ar will return an error about libdep.dll.a not being designed to run on Windows. To fix this error delete avr-gcc-11.1.0-x64-windows/lib/bfd-plugins/libdep.dll.a

Upgrading the Arduino IDE

Upgrading the Arduino IDE is pretty easy, though there could be some incompatibilities with certain libraries. Only tested with Arduino 1.8.13.

  1. Download and extract one of the downloads above
  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 [bin/avrdude.exe] and [builtin_tools_versions.txt] files and [etc] folder from the old [avr] folder to the new one
  7. Done! Open up the Arduino IDE, load up the Blink example, upload it to your Arduino and make sure the LED is blinking!

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

Skip to comment form

    • Karanbir Soin on December 28, 2020 at 7:15 am
    • Reply

    The file averdude.conf in the etc folder needs to be replaced with the avrdude.conf in your build. . After this I can upluad the sketch using programmer USBASP

    • Karanbir Soin on January 6, 2021 at 2:03 pm
    • Reply

    I upgraded the Arduino IDE as listed on this page.
    The code does not upload. This is the error

    Arduino: 1.8.13 (Windows 10), Board: "Optiboot on 32-pin cpus, 16MHz, ATmega328p"
    [ADMIN EDIT: shortened massive compile log]
    avrdude: Version 6.3, compiled on Feb 17 2016 at 09:25:53
             Copyright (c) 2000-2005 Brian Dean, http://www.bdmicro.com/
             Copyright (c) 2007-2014 Joerg Wunsch
             System wide configuration file is "D:\Arduino_1.8.13\arduino-1.8.13\hardware\tools\avr/etc/avrdude.conf"
    avrdude: error at D:\Arduino_1.8.13\arduino-1.8.13\hardware\tools\avr/etc/avrdude.conf:1133: programmer type jtagice3_updi not found
    avrdude: error reading system wide configuration file "D:\Arduino_1.8.13\arduino-1.8.13\hardware\tools\avr/etc/avrdude.conf"
    avrdude: error reading system wide configuration file "D:\Arduino_1.8.13\arduino-1.8.13\hardware\tools\avr/etc/avrdude.conf"
    1. Hi Karanbir, I’ve updated the Arduino instructions. bin/avrdude.exe from the old avr folder needs to be copied to the new one.

    • David Watson on January 21, 2021 at 11:45 pm
    • Reply

    I have a question rather than a comment. I’ve just done a new install of Linux Mint 20, installed Arduino 1.8.13 via the software manager which came with avr-gcc 5.4 (2015). Downloaded your binaries and swapped out the necessary files. I have a test unit that record the compiler version and then outputs that info when reset thereby confirming it was compiled with 10.1.0. From terminal however, I enter avr-gcc –version and I still show 5.4. I’m curious to run Arduino-cli and don’t want 5.4 hijacking my build. Any idea how to completely eradicate 5.4 from the system?

    1. I would think avr-gcc was installed as its own package, so searching for the avr-gcc package in the software manager (might be called gcc-avr) and choosing uninstall might do the trick.

    • Kharitonov Dmitry on May 29, 2021 at 4:38 pm
    • Reply

    lib\bfd-plugins\libdep.dll.a is failure

    test case:

    type test.c

    int main(void) {
    return 0;

    type compile.bat
    del test.a

    set gccpath=c:/avr-gcc-11.1.0-x64-windows/bin
    set PATH=%gccpath%;%PATH%

    avr-gcc -DF_CPU=16000000 -mmcu=atmega1284p -I/usr/include/avr -I. -Wall -Werror -c -o test.o test.c

    avr-ar rcs test.a test.o
    avr-ar rcs test.a test.o


    Windows 7 SP1 x64

    1. Hey, this looks to be a binutils issue when using avr-ar, more info here – https://github.com/msys2/MINGW-packages/issues/7890
      Deleting avr-gcc-11.1.0-x64-windows/lib/bfd-plugins/libdep.dll.a should fix the problem.

  1. I’m hoping to use your excellent work to update an older project which uses C++.
    While this header compiles AOK from a C module, for a C++ module I get the following:
    “`avr-gcc -c -mmcu=atmega2561 -I. -x c++ -DF_CPU=8000000UL -D__PROG_TYPES_COMPAT__ -DNDEBUG -DHW_GUSS -DDSP_LPH88 -DWATCHDOG -Os -funsigned-char -funsigned-bitfields -fpack-struct -fshort-enums -fno-exceptions -Wall -Wundef -Winline -Wa,-adhlns=obj/Foo.lst -MMD -MP -MF .dep/FlarmDisplay.o.d Foo.cpp -o obj/Foo.o
    In file included from Foo.cpp:156:
    glcd.h:66:65: error: ‘__flash’ does not name a type
    66 | void LCD_Bitmap_256high(int x1, int y1, int x2, int y2, const __flash uint8_t Pbmp[], const __flash uint16_t ColorTable[], bool Compressed);
    | ^~~~~~~
    I found some older posts saying newer AVR C++ does not support __flash?
    Is this still true, and if so is there a work-around? Or is this effort doomed?

    1. Hey Dave, yea it looks like C++ does not support __flash, instead you’ll need to use PROGMEM and pgm_*() functions. https://www.avrfreaks.net/forum/avr-g-lacks-flash

      1. Unfortunately PROGMEM uses the GCC progmem attribute which is also deprecated. I’ve made my own macros for storage positioning (PROGMEM_FIRST_64KB and PROGMEM_HIGH) and adjusted the linker script accordingly. PROGMEM pointers are completely unchecked, which is to say a low 64kb progmem pointer must be a 16-bit entity (treated as any ptr in AVR), and a high progmem pointer must be explicitly declared as 32-bit. No help from the compiler but it seems to do the right stuff as long as these pointers are only used with the appropriate routines. PROGMEM macro must no longer be used with function arguments (previously accepted but unchecked by the compiler).

        I’ve retested the application updated as above with the old 2010 winavr compiler, and will retest with your latest Real Soon Now…

        Thanks Zak!
        Best Regards, Dave

    • Damir Bakiev on July 23, 2021 at 8:59 pm
    • Reply

    64-bit versions of programs work faster as there are 1.5 times more registers. Less need to access the cache. https://image3.slideserve.com/6560801/x86-64-programmer-s-model-l.jpg

    • Xavier on September 5, 2021 at 2:33 am
    • Reply

    AVR-GCC 5.4.0 is full of bugs that makes it unusable for serious embedded systems. That’s way I landed into your solution; however there’s an error:

    /home/myuser/arduino-1.8.13/hardware/tools/avr/bin/avr-ar: error while loading shared libraries: libfl.so.2: cannot open shared object file: No such file or directory
    make: *** [/home/myuser/arduino-1.8.13/Arduino.mk:1399: build-uno/libcore.a] Error 127

    Any hint? Thank you!

    • Xavier on September 5, 2021 at 2:59 am
    • Reply

    Two things:

    1.- AVR_GCC can’t handle 16 bit words. I’ve been having problems adding two 16 bits words; the compiler does strange things. It happened in 5.0.4, so I downloaded your build (11.1.0) for Linux (Mint) and the problem is still there. I also found (in 5.0.4) another error shifting bits in a 16 bit words, so I guess that is still there too, and the latest compiler version doesn’t solve them.

    2.- Your build needs (I don’t know why) the libfl library (it’s a flex library), so in order for my projects to compile I needed to install it:
    $ sudo apt install libfl-dev

    I’m affraid of still using AVR-GCC 🙁

    Anyway, thank you for your effort.

    1. Hi Xavier,
      I’ve not had problems with 16bit words. Could you post some code that produces the problems that you’re having (to https://pastebin.com/), with expected result and actual result?
      I’ll have a look into the flex library dependency.

Leave a Reply

Your email address will not be published.

Are you human? *