LinuxCommandLibrary

avrdude

Program AVR microcontroller flash and fuses

TLDR

Upload firmware to Arduino

$ avrdude -p [atmega328p] -c [arduino] -P [/dev/ttyUSB0] -U flash:w:[firmware.hex]
copy
Read flash memory
$ avrdude -p [atmega328p] -c [usbasp] -U flash:r:[backup.hex]:i
copy
Set fuse bits
$ avrdude -p [atmega328p] -c [usbasp] -U lfuse:w:[0xE2]:m
copy
Verify without writing
$ avrdude -p [atmega328p] -c [arduino] -P [/dev/ttyUSB0] -U flash:v:[firmware.hex]
copy

SYNOPSIS

avrdude -p partno -c programmer [options]

DESCRIPTION

avrdude (AVR Downloader Uploader) is a utility for programming Atmel AVR microcontrollers. It supports numerous programmers and can read/write flash, EEPROM, fuse bits, and lock bits.
The tool is essential for Arduino development and embedded systems work with AVR chips.

PARAMETERS

-p partno

Specify AVR device (e.g., atmega328p, attiny85)
-c programmer
Programmer type (arduino, usbasp, avrisp2)
-P port
Communication port (/dev/ttyUSB0, COM3)
-U memtype:op:file:format
Memory operation (flash:w:file.hex:i)
-b baudrate
Override baud rate
-B bitclock
Bit clock period
-v
Verbose output
-n
Dry run (no writes)
-F
Force (override signature check)

CONFIGURATION

/etc/avrdude.conf

System-wide configuration defining programmer types, part definitions, and default settings.
~/.avrduderc
Per-user configuration overrides. Can add custom programmer definitions or modify part settings.

MEMORY OPERATIONS

flash

Program memory
eeprom
Data memory
lfuse, hfuse, efuse
Configuration fuses
lock
Lock bits
Operations: r (read), w (write), v (verify)

CAVEATS

Incorrect fuse settings can brick the device. Requires proper permissions for serial ports. Wrong programmer selection causes failures. Always backup fuses before modification. USB connection issues common on some platforms.

HISTORY

avrdude was created by Brian Dean in 2003 as an open-source alternative to Atmel's proprietary programming tools. It has become the standard tool for AVR programming.

SEE ALSO

> TERMINAL_GEAR

Curated for the Linux community

Copied to clipboard

> TERMINAL_GEAR

Curated for the Linux community