Go to file
Joerg Wunsch 9c7bb3787d Revert "Hint about possibly differing licensing terms."
This reverts commit fa079bec8c.

Changing the COPYING file prevents automatic license detections
from working correctly.
2022-01-04 12:53:27 +01:00
.github/workflows Always upload GitHub Build artifacts, even on failure 2021-12-29 22:27:36 +01:00
atmel-docs Just to make sure this won't get lost over time, make a copy of 2015-11-02 21:13:28 +00:00
src Update the man page to reflect the search order for avrdude.conf 2022-01-03 23:53:51 +01:00
tools Allow for overriding make tool from environment 2021-12-10 22:34:57 +00:00
.editorconfig Add GitHub build action for CMake project 2021-12-20 17:52:37 +01:00
.gitattributes Add .gitattributes and .gitignore, remove .cvsignore 2021-12-16 23:24:32 +01:00
.gitignore Another addition to .gitignore file 2021-12-26 14:22:39 +01:00
AUTHORS Add credits for giveio.sys driver contributions 2021-12-21 17:57:39 +01:00
COPYING Revert "Hint about possibly differing licensing terms." 2022-01-04 12:53:27 +01:00
INSTALL Update toplevel files. 2021-12-18 22:32:50 +01:00
NEWS Mention recent PRs and fixed issues 2022-01-03 23:35:10 +01:00
README.md Remove the License subclause 2021-12-31 00:07:52 +01:00

README.md

AVRDUDE

AVRDUDE - AVR Downloader Uploader - is a program for downloading and uploading the on-chip memories of Microchips AVR microcontrollers. It can program the Flash and EEPROM, and where supported by the 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 was originally written in 2003 by Brian S. Dean. Since 2006, AVRDUDE has been maintained by Jörg Wunsch, with the help of various contributors.

The latest version of AVRDUDE is always available here:
https://github.com/avrdudes/avrdude

Getting AVRDUDE for Windows

To get AVRDUDE for Windows, install the latest version from the Releases page.

Alternatively, you may build AVRDUDE yourself from source.

Getting AVRDUDE for Linux

To install AVRDUDE for Linux, install the package avrdude by running the following commands:

sudo apt-get install avrdude

Alternatively, you may build AVRDUDE yourself from source.

Getting AVRDUDE for MacOS

On MacOS, AVRDUDE can be installed through Mac Ports.

Alternatively, you may build AVRDUDE yourself from source.

Using AVRDUDE

AVRDUDE is a command-line application. Run the command avrdude without any arguments for a list of options.

A typical command to program your HEX file into your AVR microcontroller looks like this:

avrdude -c <programmer> -p <part> -U flash:w:<file>:i

For instance, to program an Arduino Uno connected to the serial port COM1 with a HEX file called blink.hex, you would run the following command:

avrdude -c arduino -P COM1 -b 115200 -p atmega328p -D -U flash:w:objs/blink.hex:i

There are many different programmers and options that may be required for the programming to succeed. For more information, refer to the AVRDUDE documentation.

General build instructions

Prerequisites

Depending on your requirements, the following prerequisites are needed:

  • libelf including header files (for directly reading ELF files)
  • libusb 0.1 or 1.0 (or compatible), including header files
  • libftdi or libftdi1 (for direct access to FTDI devices)
  • libhidapi or libhid (for access to recent Atmel/Microchip dongles)

Building

All source code is located in the src/ subdirectory. Thus all instructions are relative to that directory.

Source-code releases contain an up-to-date configure script that can be run to generate the required Makefiles:

cd src && ./configure && make && sudo make install

At the end of the configure script, a configuration summary is issued, like this:

Configuration summary:
----------------------
DO HAVE    libelf
DO HAVE    libusb
DO HAVE    libusb_1_0
DO HAVE    libftdi1
DON'T HAVE libftdi
DON'T HAVE libhid
DO HAVE    libhidapi
DO HAVE    pthread
DISABLED   doc
DISABLED   parport
DISABLED   linuxgpio
DISABLED   linuxspi

Make sure all the features you are interested in have been found.

Building the development source tree might possibly require to re-generate the configure script using the autoconf/automake tools. This can be done using the bootstrap script:

cd src && ./bootstrap

Building AVRDUDE for Windows

Windows Prerequisites

TODO.

Windows Build Instructions

TODO.

Building AVRDUDE for Linux

Linux Prerequisites

To build AVRDUDE for Linux, you need to install the following packages:

sudo apt-get install build-essential git automake libtool flex bison libelf-dev libusb-dev libftdi1-dev libhidapi-dev

To build the documentation, you need to install the following packages:

sudo apt-get install texlive texi2html

Linux Build Instructions

To build AVRDUDE for Linux, run the following commands:

git clone https://github.com/avrdudes/avrdude
cd avrdude
./bootstrap
./configure
make

To build the documentation for AVRDUDE, run the following commands:

cd doc
make all

Building AVRDUDE for MacOS

Prerequisites

The following things are needed to build AVRDUDE on MacOS:

  • a C compiler; either full XCode, or the XCode Command Line tools
  • autoconf, automake, libtool, hidapi, libftdi1, libusb, libelf; they can be installed e.g. from Mac Ports using
port install autoconf automake \
  libtool hidapi libftdi1 libusb libelf

Compilation

Depending on the location of the prerequisites, the CPPFLAGS and LDFLAGS variables need to be set accordingly. Mac Ports installs everything under /opt/local, so use

./configure CPPFLAGS=-I/opt/local/include LDFLAGS=-L/opt/local/lib

MacOS Brew requires

./configure CPPFLAGS=-I/usr/local/include LDFLAGS=-L/usr/local/Cellar