Avrdude

From Attie's Wiki
(Difference between revisions)
Jump to: navigation, search
m (Created page with 'For ATMega168: <pre> $ avrdude -c buspirate -P /dev/ttyUSB1 -x speed=3 -p m168 </pre> For ATMega328p: <pre> $ avrdude -c buspirate -P /dev/ttyUSB1 -x speed=3 -p m328p </pre> Te…')
 
m
Line 1: Line 1:
 +
For detailed info:
 +
<pre>
 +
$ man avrdude
 +
</pre>
 +
 +
<h2>Parameters</h2>
 +
Parameters marked with a <span style="color:red">*</span> are required.
 +
<h3><span style="color:red">*</span>Programmer Type</h3>
 +
* <code>-c buspirate</code> - for use with the buspirate
 +
* <code>-c stk500v1</code> - for use with the Arduino bootloader
 +
* other (see the man page)
 +
 +
<h3><span style="color:red">*</span>Programmer Port</h3>
 +
* <code>-P /dev/ttyUSB1</code> - the most likely for my systems
 +
 +
<h3><span style="color:red">*</span>Part Identifier</h3>
 +
* <code>-p m168</code> - for use with an ATMega168
 +
* <code>-p m328p</code> - for use with an ATMega328p
 +
* <code>-p m1280</code> - for use with an ATMega1280
 +
 +
<h3><span style="color:red">*</span>Burn Counter</h3>
 +
Not technically required, but a good idea. The burn counter is stored in the last 4 bytes of eeprom
 +
* <code>-y</code> - to increment the burn counter each burn
 +
* <code>-Y <i>value</i></code> - to initialise the burn counter
 +
 +
<h3>Baud Rate</h3>
 +
Required for <code>stk500v1</code><br>
 +
* <code>-b 57600</code> - for most of mine
 +
 +
<h3>Terminal Mode</h3>
 +
* <code>-t</code> - see [#terminal_mode] for mode
 +
 +
<h3>Memory Access</h3>
 +
There are others, but these are the most common
 +
* <code>-U flash:<i>operation</i>:<i>filename</i>[:<i>format</i>]</code> - where the firmware lives
 +
* <code>-U eeprom:<i>operation</i>:<i>filename</i>[:<i>format</i>]</code> - non-volatile memory
 +
* <code>-U lfuse:<i>operation</i>:<i>filename</i>[:<i>format</i>]</code> - low fuse byte
 +
* <code>-U hfuse:<i>operation</i>:<i>filename</i>[:<i>format</i>]</code> - high fuse byte
 +
* <code>-U efuse:<i>operation</i>:<i>filename</i>[:<i>format</i>]</code> - extended fuse byte
 +
 +
<code><i>operation</i></code> can be:
 +
* <code>r</code> - read
 +
* <code>w</code> - write
 +
* <code>v</code> - verify
 +
 +
<code><i>filename</i></code> points to the file to use
 +
 +
<code><i>format</i></code> can be:
 +
* <code>a</code> or omitted - for auto-detection
 +
* <code>i</code> - Intel Hex (output from obj-dump)
 +
* <code>r</code> - Raw binary
 +
* other (see the man page)
 +
 +
<h2>Terminal Mode</h2>
 +
 
For ATMega168:
 
For ATMega168:
 
<pre>
 
<pre>

Revision as of 19:26, 23 July 2010

For detailed info:

$ man avrdude

Contents

Parameters

Parameters marked with a * are required.

*Programmer Type

  • -c buspirate - for use with the buspirate
  • -c stk500v1 - for use with the Arduino bootloader
  • other (see the man page)

*Programmer Port

  • -P /dev/ttyUSB1 - the most likely for my systems

*Part Identifier

  • -p m168 - for use with an ATMega168
  • -p m328p - for use with an ATMega328p
  • -p m1280 - for use with an ATMega1280

*Burn Counter

Not technically required, but a good idea. The burn counter is stored in the last 4 bytes of eeprom

  • -y - to increment the burn counter each burn
  • -Y value - to initialise the burn counter

Baud Rate

Required for stk500v1

  • -b 57600 - for most of mine

Terminal Mode

  • -t - see [#terminal_mode] for mode

Memory Access

There are others, but these are the most common

  • -U flash:operation:filename[:format] - where the firmware lives
  • -U eeprom:operation:filename[:format] - non-volatile memory
  • -U lfuse:operation:filename[:format] - low fuse byte
  • -U hfuse:operation:filename[:format] - high fuse byte
  • -U efuse:operation:filename[:format] - extended fuse byte

operation can be:

  • r - read
  • w - write
  • v - verify

filename points to the file to use

format can be:

  • a or omitted - for auto-detection
  • i - Intel Hex (output from obj-dump)
  • r - Raw binary
  • other (see the man page)

Terminal Mode

For ATMega168:

$ avrdude -c buspirate -P /dev/ttyUSB1 -x speed=3 -p m168

For ATMega328p:

$ avrdude -c buspirate -P /dev/ttyUSB1 -x speed=3 -p m328p

Terminal mode: -t. Use command part to see detailed part information.
To upload file: -U memtype:op:filename[:format]
To use the arduino bootloader: -c stk500v1

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox