2022-03-06 23:09:47 +00:00
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
< html >
2022-03-16 22:22:14 +00:00
<!-- Created on March 16, 2022 by texi2html 5.0
2022-03-06 23:09:47 +00:00
texi2html was written by:
Lionel Cons < Lionel.Cons @ cern . ch > (original author)
Karl Berry < karl @ freefriends . org >
Olaf Bachmann < obachman @ mathematik . uni-kl . de >
and many others.
Maintained by: Many creative people.
Send bugs and suggestions to < texi2html-bug @ nongnu . org >
-->
< head >
< title > AVRDUDE: 2.3 Example Command Line Invocations< / title >
< meta name = "description" content = "AVRDUDE: 2.3 Example Command Line Invocations" >
< meta name = "keywords" content = "AVRDUDE: 2.3 Example Command Line Invocations" >
< meta name = "resource-type" content = "document" >
< meta name = "distribution" content = "global" >
< meta name = "Generator" content = "texi2html 5.0" >
< meta http-equiv = "Content-Type" content = "text/html; charset=utf-8" >
< style type = "text/css" >
<!--
a.summary-letter {text-decoration: none}
blockquote.smallquotation {font-size: smaller}
div.display {margin-left: 3.2em}
div.example {margin-left: 3.2em}
div.lisp {margin-left: 3.2em}
div.smalldisplay {margin-left: 3.2em}
div.smallexample {margin-left: 3.2em}
div.smalllisp {margin-left: 3.2em}
pre.display {font-family: serif}
pre.format {font-family: serif}
pre.menu-comment {font-family: serif}
pre.menu-preformatted {font-family: serif}
pre.smalldisplay {font-family: serif; font-size: smaller}
pre.smallexample {font-size: smaller}
pre.smallformat {font-family: serif; font-size: smaller}
pre.smalllisp {font-size: smaller}
span.nocodebreak {white-space:pre}
span.nolinebreak {white-space:pre}
span.roman {font-family:serif; font-weight:normal}
span.sansserif {font-family:sans-serif; font-weight:normal}
ul.no-bullet {list-style: none}
2022-03-16 22:22:14 +00:00
body { background-color: #ffd; }
h1 { text-shadow: .05em .05em #ccc; }
table {
border: 3px solid #ccf;
background-color: white;
}
div.example {
background-color: #dfd;
border: 3px solid #cfc;
}
samp {
color: blue;
}
code {
color: green;
}
2022-03-06 23:09:47 +00:00
-->
< / style >
< / head >
< body lang = "en" bgcolor = "#FFFFFF" text = "#000000" link = "#0000FF" vlink = "#800080" alink = "#FF0000" >
< a name = "Example-Command-Line-Invocations" > < / a >
< table class = "header" cellpadding = "1" cellspacing = "1" border = "0" >
< tr > < td valign = "middle" align = "left" > [< a href = "avrdude_2.html#Command-Line-Options" title = "Beginning of this chapter or previous chapter" > < < < / a > ]< / td >
< td valign = "middle" align = "left" > [< a href = "avrdude_4.html#Programmers-accepting-extended-parameters" title = "Previous section in reading order" > < < / a > ]< / td >
< td valign = "middle" align = "left" > [< a href = "avrdude_2.html#Command-Line-Options" title = "Up section" > Up < / a > ]< / td >
< td valign = "middle" align = "left" > [< a href = "avrdude_6.html#Terminal-Mode-Operation" title = "Next section in reading order" > > < / a > ]< / td >
< td valign = "middle" align = "left" > [< a href = "avrdude_6.html#Terminal-Mode-Operation" title = "Next chapter" > > > < / a > ]< / td >
< td valign = "middle" align = "left" > < / td >
< td valign = "middle" align = "left" > < / td >
< td valign = "middle" align = "left" > < / td >
< td valign = "middle" align = "left" > < / td >
< td valign = "middle" align = "left" > [< a href = "avrdude.html#Introduction" title = "Cover (top) of document" > Top< / a > ]< / td >
< td valign = "middle" align = "left" > [< a href = "avrdude_toc.html#SEC_Contents" title = "Table of contents" > Contents< / a > ]< / td >
< td valign = "middle" align = "left" > [Index]< / td >
< td valign = "middle" align = "left" > [< a href = "avrdude_abt.html#SEC_About" title = "About (help)" > ? < / a > ]< / td >
< / tr > < / table >
2022-03-16 22:22:14 +00:00
< hr >
2022-03-06 23:09:47 +00:00
< a name = "Example-Command-Line-Invocations-1" > < / a >
< h2 class = "section" > 2.3 Example Command Line Invocations< / h2 >
< p > Download the file < code > diag.hex< / code > to the ATmega128 chip using the
STK500 programmer connected to the default serial port:
< / p >
< div class = "smallexample" >
< table class = "cartouche" border = "1" > < tr > < td >
< pre class = "smallexample" > % avrdude -p m128 -c stk500 -e -U flash:w:diag.hex
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.03s
avrdude: Device signature = 0x1e9702
avrdude: erasing chip
avrdude: done.
avrdude: performing op: 1, flash, 0, diag.hex
avrdude: reading input file " diag.hex"
avrdude: input file diag.hex auto detected as Intel Hex
avrdude: writing flash (19278 bytes):
Writing | ################################################## | 100% 7.60s
avrdude: 19456 bytes of flash written
avrdude: verifying flash memory against diag.hex:
avrdude: load data flash data from input file diag.hex:
avrdude: input file diag.hex auto detected as Intel Hex
avrdude: input file diag.hex contains 19278 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 6.83s
avrdude: verifying ...
avrdude: 19278 bytes of flash verified
avrdude done. Thank you.
%
< / pre > < / td > < / tr > < / table >
< / div >
< p > Upload the flash memory from the ATmega128 connected to the STK500
programmer and save it in raw binary format in the file named
< code > c:/diag flash.bin< / code > :
< / p >
< div class = "smallexample" >
< table class = "cartouche" border = "1" > < tr > < td >
< pre class = "smallexample" > % avrdude -p m128 -c stk500 -U flash:r:" c:/diag flash.bin" :r
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.03s
avrdude: Device signature = 0x1e9702
avrdude: reading flash memory:
Reading | ################################################## | 100% 46.10s
avrdude: writing output file " c:/diag flash.bin"
avrdude done. Thank you.
%
< / pre > < / td > < / tr > < / table >
< / div >
< p > Using the default programmer, download the file < code > diag.hex< / code > to
flash, < code > eeprom.hex< / code > to EEPROM, and set the Extended, High, and Low
fuse bytes to 0xff, 0x89, and 0x2e respectively:
< / p >
< div class = "smallexample" >
< table class = "cartouche" border = "1" > < tr > < td >
< pre class = "smallexample" >
% avrdude -p m128 -u -U flash:w:diag.hex \
> -U eeprom:w:eeprom.hex \
> -U efuse:w:0xff:m \
> -U hfuse:w:0x89:m \
> -U lfuse:w:0x2e:m
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.03s
avrdude: Device signature = 0x1e9702
avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
To disable this feature, specify the -D option.
avrdude: erasing chip
avrdude: reading input file " diag.hex"
avrdude: input file diag.hex auto detected as Intel Hex
avrdude: writing flash (19278 bytes):
Writing | ################################################## | 100% 7.60s
avrdude: 19456 bytes of flash written
avrdude: verifying flash memory against diag.hex:
avrdude: load data flash data from input file diag.hex:
avrdude: input file diag.hex auto detected as Intel Hex
avrdude: input file diag.hex contains 19278 bytes
avrdude: reading on-chip flash data:
Reading | ################################################## | 100% 6.84s
avrdude: verifying ...
avrdude: 19278 bytes of flash verified
[ ... other memory status output skipped for brevity ... ]
avrdude done. Thank you.
%
< / pre > < / td > < / tr > < / table >
< / div >
< p > Connect to the JTAG ICE mkII which serial number ends up in 1C37 via
USB, and enter terminal mode:
< / p >
< div class = "smallexample" >
< table class = "cartouche" border = "1" > < tr > < td >
< pre class = "smallexample" >
% avrdude -c jtag2 -p m649 -P usb:1c:37 -t
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.03s
avrdude: Device signature = 0x1e9603
[ ... terminal mode output skipped for brevity ... ]
avrdude done. Thank you.
< / pre > < / td > < / tr > < / table >
< / div >
< p > List the serial numbers of all JTAG ICEs attached to USB. This is
done by specifying an invalid serial number, and increasing the
verbosity level.
< / p >
< div class = "smallexample" >
< table class = "cartouche" border = "1" > < tr > < td >
< pre class = "smallexample" >
% avrdude -c jtag2 -p m128 -P usb:xx -v
[...]
Using Port : usb:xxx
Using Programmer : jtag2
avrdude: usbdev_open(): Found JTAG ICE, serno: 00A000001C6B
avrdude: usbdev_open(): Found JTAG ICE, serno: 00A000001C3A
avrdude: usbdev_open(): Found JTAG ICE, serno: 00A000001C30
avrdude: usbdev_open(): did not find any (matching) USB device " usb:xxx"
< / pre > < / td > < / tr > < / table >
< / div >
< hr >
< table class = "header" cellpadding = "1" cellspacing = "1" border = "0" >
< tr > < td valign = "middle" align = "left" > [< a href = "avrdude_2.html#Command-Line-Options" title = "Beginning of this chapter or previous chapter" > < < < / a > ]< / td >
< td valign = "middle" align = "left" > [< a href = "avrdude_4.html#Programmers-accepting-extended-parameters" title = "Previous section in reading order" > < < / a > ]< / td >
< td valign = "middle" align = "left" > [< a href = "avrdude_2.html#Command-Line-Options" title = "Up section" > Up < / a > ]< / td >
< td valign = "middle" align = "left" > [< a href = "avrdude_6.html#Terminal-Mode-Operation" title = "Next section in reading order" > > < / a > ]< / td >
< td valign = "middle" align = "left" > [< a href = "avrdude_6.html#Terminal-Mode-Operation" title = "Next chapter" > > > < / a > ]< / td >
2022-03-16 22:22:14 +00:00
< td valign = "middle" align = "left" > < / td >
< td valign = "middle" align = "left" > < / td >
< td valign = "middle" align = "left" > < / td >
< td valign = "middle" align = "left" > < / td >
< td valign = "middle" align = "left" > [< a href = "avrdude.html#Introduction" title = "Cover (top) of document" > Top< / a > ]< / td >
< td valign = "middle" align = "left" > [< a href = "avrdude_toc.html#SEC_Contents" title = "Table of contents" > Contents< / a > ]< / td >
< td valign = "middle" align = "left" > [Index]< / td >
< td valign = "middle" align = "left" > [< a href = "avrdude_abt.html#SEC_About" title = "About (help)" > ? < / a > ]< / td >
2022-03-06 23:09:47 +00:00
< / tr > < / table >
< p >
< font size = "-1" >
2022-03-16 22:22:14 +00:00
This document was generated on < i > March 16, 2022< / i > using < a href = "http://www.nongnu.org/texi2html/" > < i > texi2html 5.0< / i > < / a > .
2022-03-06 23:09:47 +00:00
< / font >
< br >
< / p >
< / body >
< / html >