AVRdude

May 30, 2013

AVRdude is the software you run on a linux system to program an Atmel AVR microcontroller.

Some random stuff: Use "-t" to get into "terminal mode", where AVRdude is giving you a prompt and letting you do things like examine memory. For the device I am now working with, I do:
avrdude -p atmega32u4 -c avr109 -P /dev/ttyACM0 -t

Use -U flash:w:file.hex:i to write to flash and program the device. The final ":i indicates intel hex, which is the default and can be omitted in most cases. Also the letter "w" (for write) can be replaced by "r" (for read) and "v" (for verify).

To program eeprom, just replace the word "flash" with "eeprom", so you would use a command like: -U eeprom:w:file.eep. Note that the ".eep" file is probably in intel hex format also, so you can omit the :i which specifies the file format.

Intel Hex format

This is a simple ascii file format that has been around since the days of the pyramids. A line in an intel hex file looks like:
:CCAAAATTCC
You probably won't see the address records unless if you are working with a device that addresses 64K or less.

A file with only an end of file record is ... an empty file!


Feedback? Questions? Drop me a line!

Tom's Computer Info / tom@mmto.org