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 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 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.
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.
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
Click OK on all of the windows youâve opened.
Source: Using the GNU AVR toolchain on Windows 10