AVRDUDE
A program for download/uploading AVR microcontroller flash and eeprom.
For AVRDUDE, Version 6.3, 15 February 2016.
by Brian S. Dean
Send comments on AVRDUDE to avrdude-dev@nongnu.org.
Use http://savannah.nongnu.org/bugs/?group=avrdude to report bugs.
Copyright
c
2003,2005 Brian S. Dean
Copyright
c
2006 - 2013 J¨org Wunsch
Permission is granted to make and distribute verbatim copies of this manual provided the
copyright notice and this permission notice are preserved on all copies.
Permission is granted to copy and distribute modified versions of this manual under the con-
ditions for verbatim copying, provided that the entire resulting derived work is distributed
under the terms of a permission notice identical to this one.
Permission is granted to copy and distribute translations of this manual into another lan-
guage, under the above conditions for modified versions, except that this permission notice
may be stated in a translation approved by the Free Software Foundation.
i
Table of Contents
1 Introduction . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 1
1.1 History and Credits . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3
2 Command Line Options . . . . . . . . . . . . . . . . . . . . 4
2.1 Option Descriptions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4
2.2 Programmers accepting extended parameters . . . . . . . . . . . . . . . . . 14
2.3 Example Command Line Invocations . . . . . . . . . . . . . . . . . . . . . . . . 17
3 Terminal Mode Operation . . . . . . . . . . . . . . . . . 21
3.1 Terminal Mode Commands. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 21
3.2 Terminal Mode Examples . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 22
4 Configuration File . . . . . . . . . . . . . . . . . . . . . . . . 25
4.1 AVRDUDE Defaults. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.2 Programmer Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 25
4.3 Part Definitions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 26
4.3.1 Parent Part . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 27
4.3.2 Instruction Format. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
4.4 Other Notes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 28
5 Programmer Specific Information . . . . . . . . . . 30
5.1 Atmel STK600 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 30
5.2 Atmel DFU bootloader using FLIP version 1 . . . . . . . . . . . . . . . . . 33
Appendix A Platform Dependent Information
. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
A.1 Unix . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
A.1.1 Unix Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
A.1.1.1 FreeBSD Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
A.1.1.2 Linux Installation. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 34
A.1.2 Unix Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
A.1.2.1 FreeBSD Configuration Files . . . . . . . . . . . . . . . . . . . . . . 35
A.1.2.2 Linux Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . 35
A.1.3 Unix Port Names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
A.1.4 Unix Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
A.2 Windows . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
A.2.1 Installation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 35
A.2.2 Configuration Files . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
A.2.2.1 Configuration file names. . . . . . . . . . . . . . . . . . . . . . . . . . . 36
A.2.2.2 How AVRDUDE finds the configuration files. . . . . . . . 36
A.2.3 Port Names. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
ii
A.2.3.1 Serial Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
A.2.3.2 Parallel Ports . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 36
A.2.4 Using the parallel port. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
A.2.4.1 Windows NT/2K/XP . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
A.2.4.2 Windows 95/98. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
A.2.5 Documentation . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
A.2.6 Credits. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 37
Appendix B Troubleshooting . . . . . . . . . . . . . . . 39
Chapter 1: Introduction 1
1 Introduction
AVRDUDE - AVR Downloader Uploader - is a program for downloading and uploading
the on-chip memories of Atmel’s AVR microcontrollers. It can program the Flash and
EEPROM, and where supported by the serial programming protocol, it can program fuse
and lock bits. AVRDUDE also supplies a direct instruction mode allowing one to issue any
programming instruction to the AVR chip regardless of whether AVRDUDE implements
that specific feature of a particular chip.
AVRDUDE can be used effectively via the command line to read or write all chip memory
types (eeprom, flash, fuse bits, lock bits, signature bytes) or via an interactive (terminal)
mode. Using AVRDUDE from the command line works well for programming the entire
memory of the chip from the contents of a file, while interactive mode is useful for exploring
memory contents, modifying individual bytes of eeprom, programming fuse/lock bits, etc.
AVRDUDE supports the following basic programmer types: Atmel’s STK500, Atmel’s
AVRISP and AVRISP mkII devices, Atmel’s STK600, Atmel’s JTAG ICE (the original one,
mkII, and 3, the latter two also in ISP mode), appnote avr910, appnote avr109 (including
the AVR Butterfly), serial bit-bang adapters, and the PPI (parallel port interface). PPI
represents a class of simple programmers where the programming lines are directly connected
to the PC parallel port. Several pin configurations exist for several variations of the PPI
programmers, and AVRDUDE can be configured to work with them by either specifying the
appropriate programmer on the command line or by creating a new entry in its configuration
file. All that’s usually required for a new entry is to tell AVRDUDE which pins to use for
each programming function.
A number of equally simple bit-bang programming adapters that connect to a serial port
are supported as well, among them the popular Ponyprog serial adapter, and the DASA
and DASA3 adapters that used to be supported by uisp(1). Note that these adapters are
meant to be attached to a physical serial port. Connecting to a serial port emulated on top
of USB is likely to not work at all, or to work abysmally slow.
If you happen to have a Linux system with at least 4 hardware GPIOs available (like
almost all embedded Linux boards) you can do without any additional hardware - just
connect them to the MOSI, MISO, RESET and SCK pins on the AVR and use the linuxgpio
programmer type. It bitbangs the lines using the Linux sysfs GPIO interface. Of course,
care should be taken about voltage level compatibility. Also, although not strictly required,
it is strongly advisable to protect the GPIO pins from overcurrent situations in some way.
The simplest would be to just put some resistors in series or better yet use a 3-state buffer
driver like the 74HC244. Have a look at http://kolev.info/avrdude-linuxgpio for a more
detailed tutorial about using this programmer type.
The STK500, JTAG ICE, avr910, and avr109/butterfly use the serial port to communi-
cate with the PC. The STK600, JTAG ICE mkII/3, AVRISP mkII, USBasp, avrftdi (and
derivatives), and USBtinyISP programmers communicate through the USB, using libusb
as a platform abstraction layer. The avrftdi adds support for the FT2232C/D, FT2232H,
and FT4232H devices. These all use the MPSSE mode, which has a specific pin mapping.
Bit 1 (the lsb of the byte in the config file) is SCK. Bit 2 is MOSI, and Bit 3 is MISO. Bit
4 usually reset. The 2232C/D parts are only supported on interface A, but the H parts
can be either A or B (specified by the usbdev config parameter). The STK500, STK600,
JTAG ICE, and avr910 contain on-board logic to control the programming of the target