AVR/avrdude

From OmgaV Wiki

Jump to: navigation, search

Contents

avrdude, AVR MCU programmer

avrdude is a piece of software for programming AVR µCs. It is mostly used under Linux, but can also be used under Windows - and binaries are distributed as a part of the WinAVR package. The Windows port should have identical functionality, but more information about this can be found in avrdude's manual.

Installing avrdude

Simple usage

  1. Connect your STK500 to the COM-port, and power it on
  2. Find out what model your microcontroller is, and find out what avrdude calls it
    • To get a list, run: avrdude -c stk500
    • When you find your model, e.g. ATMEGA8515, write down what it says to the left of your model (m8515)
    • Example of a line otuput by avrdude -c stk500: m8515 = ATMEGA8515 [/etc/avrdude.conf:5385]
    • m8515 is the avrdude model number, ATMEGA8515 is the Atmel model number. The part in the brackets should be ignored.
  3. Find out what com-port your STK500 is connected to, and what the device name is.
    • TODO Write the default name for the com-port, and how to find which ones are available in /dev.
  4. Flash your compiled image using: avrdude -c stk500 -p m8515 -P /dev/SOMETHING -U flash:w:rom.hex
    • Note: Replace m8515 with the part number you find in step 2, /dev/SOMETHING with what you found in step 3 and rom.hex with the name of your image.

Advanced usage

Setting fuse-bits

TODO

Using avrdude's terminal mode

TODO