Using the GNU AVR toolchain on Windows 10

Introduction

This page attempts to describe a procedure for installing a complete GCC-based toolchain on a modern Windows system. I’ve developed these instructions on my Windows 10 machine, but they should work for versions of Windows as far back as Windows 7. On older versions, you might want to use WinAVR. WinAVR used to be the preferred way to get this toolchain set up on Windows, even to the point of being semi-official, but has not been maintained in years. The installer reportedly wreaks havoc on newer Windows versions, but it likely works great on XP.

Install Git

We’re going to use the bash shell installed by Git as our starting point. It’s easy to install, and if you’re using Git on Windows, you might have it already. Click the Start menu and search for “Git Bash”. If it comes up, you have it already. If not, download and install Git for Windows. The defaults for all of the choices in the installer will work for our purposes.

Install the Atmel GNU Toolchain

Download the Atmel AVR Toolchain for Windows from Atmel’s site and run the installer. When asked where to extract the files, click the “…” button and navigate to C:\Program Files, then click Extract.

Install the Atmel GNU Toolchain

Install GNU Make

Download Gnu Make and launch the installer. Accept the default location for the installation. You can choose whether or not you want an icon in your start menu.

Install GNU Make

Install avrdude

Download avrdude

. Unzip the archive, and copy the archive inside to C:\Program Files.

Update your PATH

Now we need to tell Windows where to locate all of the tools you’ve just installed when you type their names on the command line. Go to the Start menu and open the Control Panel, then go to System. From the left pane, choose “Advanced System Settings”. Under the Advanced tab, click the “Environment Variables” button.

Update your PATH

Under User variables, select “Path” and click the Edit button. If you don’t already have a variable called “Path”, click the New button to create it, enter “Path” without the name, and fill out the value as described below.

Using the GNU AVR toolchain on Windows 10

The Edit window that pops up is unfortunately different depending on whether you are creating a new variable or only have one item in your path, or if you have multiple items in your path already. In the first two cases, you just get a textbox for a value. In the third case, you get a list of values. Either way, you want to add the following three values. If you get the list, add them as separate items (see screenshot below). If you get the textbox, enter them separated by semicolons. Make sure that they are entered exactly or Windows won’t be able to find the programs.

The three values to add are:

  • C:\Program Files\avr8-gnu-toolchain\bin
  • C:\Program Files (x86)\GnuWin32\bin
  • C:\Program Files\avrdude

Make sure that they are entered exactly or Windows won't be able to find the programs.

Click OK on all of the windows you’ve opened.

 

Source: Using the GNU AVR toolchain on Windows 10


About The Author

Muhammad Bilal

I am a highly skilled and motivated individual with a Master's degree in Computer Science. I have extensive experience in technical writing and a deep understanding of SEO practices.

Scroll to Top