AVRDUDE: A.2 Windows

[ << ] | [ < ] | [] | [ > ] | [ >> ] |  |  |  |  | [] | [] | [] | [ ? ]

## A.2 Windows

[ << ] | [ < ] | [] | [ > ] | [ >> ] |  |  |  |  | [] | [] | [] | [ ? ]

### A.2.1 Installation

A Windows executable of avrdude is included in WinAVR which can be found at http://sourceforge.net/projects/winavr. WinAVR is a suite of executable, open source software development tools for the AVR for the Windows platform.

There are two options to build avrdude from source under Windows. The first one is to use Cygwin (http://www.cygwin.com/).

To build and install from the source tarball for Windows (using Cygwin):

    $ set PREFIX=<your install directory path>
    $ export PREFIX
    $ gunzip -c avrdude-6.4.tar.gz | tar xf -
    $ cd avrdude-6.4
    $ ./configure LDFLAGS="-static" --prefix=$PREFIX --datadir=$PREFIX
    --sysconfdir=$PREFIX/bin --enable-versioned-doc=no
    $ make
    $ make install

Note that recent versions of Cygwin (starting with 1.7) removed the MinGW support from the compiler that is needed in order to build a native Win32 API binary that does not require to install the Cygwin library `cygwin1.dll` at run-time. Either try using an older compiler version that still supports MinGW builds, or use MinGW (http://www.mingw.org/) directly.

[ << ] | [ < ] | [] | [ > ] | [ >> ] |  |  |  |  | [] | [] | [] | [ ? ]

### A.2.2 Configuration Files

[ << ] | [ < ] | [] | [ > ] | [ >> ] |  |  |  |  | [] | [] | [] | [ ? ]

#### A.2.2.1 Configuration file names

AVRDUDE on Windows looks for a system configuration file name of `avrdude.conf` and looks for a user override configuration file of `avrdude.rc`.

[ << ] | [ < ] | [] | [ > ] | [ >> ] |  |  |  |  | [] | [] | [] | [ ? ]

#### A.2.2.2 How AVRDUDE finds the configuration files.

AVRDUDE on Windows has a different way of searching for the system and user configuration files. Below is the search method for locating the configuration files:

1. The directory from which the application loaded.
2. The current directory.
3. The Windows system directory. On Windows NT, the name of this directory is `SYSTEM32`.
4. Windows NT: The 16-bit Windows system directory. The name of this directory is `SYSTEM`.
5. The Windows directory.
6. The directories that are listed in the PATH environment variable.

[ << ] | [ < ] | [] | [ > ] | [ >> ] |  |  |  |  | [] | [] | [] | [ ? ]

### A.2.3 Port Names

[ << ] | [ < ] | [] | [ > ] | [ >> ] |  |  |  |  | [] | [] | [] | [ ? ]

#### A.2.3.1 Serial Ports

When you select a serial port (i.e. when using an STK500) use the Windows serial port device names such as: com1, com2, etc.

[ << ] | [ < ] | [] | [ > ] | [ >> ] |  |  |  |  | [] | [] | [] | [ ? ]

#### A.2.3.2 Parallel Ports

AVRDUDE will accept 3 Windows parallel port names: lpt1, lpt2, or lpt3. Each of these names corresponds to a fixed parallel port base address:

`lpt1`

  0x378

`lpt2`

  0x278

`lpt3`

  0x3BC

On your desktop PC, lpt1 will be the most common choice. If you are using a laptop, you might have to use lpt3 instead of lpt1. Select the name of the port the corresponds to the base address of the parallel port that you want.

If the parallel port can be accessed through a different address, this address can be specified directly, using the common C language notation (i. e., hexadecimal values are prefixed by `0x`).

[ << ] | [ < ] | [] | [ > ] | [ >> ] |  |  |  |  | [] | [] | [] | [ ? ]

### A.2.4 Using the parallel port

[ << ] | [ < ] | [] | [ > ] | [ >> ] |  |  |  |  | [] | [] | [] | [ ? ]

#### A.2.4.1 Windows NT/2K/XP

On Windows NT, 2000, and XP user applications cannot directly access the parallel port. However, kernel mode drivers can access the parallel port. giveio.sys is a driver that can allow user applications to set the state of the parallel port pins.

Before using AVRDUDE, the giveio.sys driver must be loaded. The accompanying command-line program, loaddrv.exe, can do just that.

To make things even easier there are 3 batch files that are also included:

1. install_giveio.bat Install and start the giveio driver.
2. status_giveio.bat Check on the status of the giveio driver.
3. remove_giveio.bat Stop and remove the giveio driver from memory.

These 3 batch files calls the loaddrv program with various options to install, start, stop, and remove the driver.

When you first execute install_giveio.bat, loaddrv.exe and giveio.sys must be in the current directory. When install_giveio.bat is executed it will copy giveio.sys from your current directory to your Windows directory. It will then load the driver from the Windows directory. This means that after the first time install_giveio is executed, you should be able to subsequently execute the batch file from any directory and have it successfully start the driver.

Note that you must have administrator privilege to load the giveio driver.

[ << ] | [ < ] | [] | [ > ] | [ >> ] |  |  |  |  | [] | [] | [] | [ ? ]

#### A.2.4.2 Windows 95/98

On Windows 95 and 98 the giveio.sys driver is not needed.

[ << ] | [ < ] | [] | [ > ] | [ >> ] |  |  |  |  | [] | [] | [] | [ ? ]

### A.2.5 Documentation

AVRDUDE installs a manual page as well as info, HTML and PDF documentation. The manual page is installed in `/usr/local/man/man1` area, while the HTML and PDF documentation is installed in `/usr/local/share/doc/avrdude` directory. The info manual is installed in `/usr/local/info/avrdude.info`.

Note that these locations can be altered by various configure options such as ‘`--prefix`’ and ‘`--datadir`’.

[ << ] | [ < ] | [] | [ > ] | [ >> ] |  |  |  |  | [] | [] | [] | [ ? ]

### A.2.6 Credits.

Thanks to:

- Dale Roberts for the giveio driver.
- Paula Tomlinson for the loaddrv sources.
- Chris Liechti <cliechti@gmx.net> for modifying loaddrv to be command line driven and for writing the batch files.

[ << ] | [ < ] | [] | [ > ] | [ >> ]