1This is avrdude.info, produced by makeinfo version 6.8 from
2avrdude.texi.
3
4INFO-DIR-SECTION AVR Programming & development tools.
5START-INFO-DIR-ENTRY
6* AvrDude: (avrdude).            AVR program downloader/uploader.
7END-INFO-DIR-ENTRY
8
9This file documents the avrdude program.
10
11   For avrdude version 6.4, 29 November 2021.
12
13   Copyright (C) 2003, 2005 Brian Dean
14
15   Copyright (C) 2006 - 2021 Jörg Wunsch
16
17   Permission is granted to make and distribute verbatim copies of this
18manual provided the copyright notice and this permission notice are
19preserved on all copies.
20
21   Permission is granted to copy and distribute modified versions of
22this manual under the conditions for verbatim copying, provided that the
23entire resulting derived work is distributed under the terms of a
24permission notice identical to this one.
25
26   Permission is granted to copy and distribute translations of this
27manual into another language, under the above conditions for modified
28versions, except that this permission notice may be stated in a
29translation approved by the Free Software Foundation.
30
31   Alternatively, this documentation may be copied and distributed under
32the terms of the GNU Free Documentation License (FDL), version 1.3.
33
34
35File: avrdude.info,  Node: Top,  Next: Introduction,  Prev: (dir),  Up: (dir)
36
37This file documents the avrdude program for downloading/uploading
38programs to Atmel AVR microcontrollers.
39
40   For avrdude version 6.4, 29 November 2021.
41
42   Send comments on AVRDUDE to <avrdude-dev@nongnu.org>.
43
44   Use <http://savannah.nongnu.org/bugs/?group=avrdude> to report bugs.
45
46   Copyright (C) 2003,2005 Brian S. Dean
47
48   Copyright (C) 2006 Jörg Wunsch
49
50* Menu:
51
52* Introduction::
53* Command Line Options::
54* Terminal Mode Operation::
55* Configuration File::
56* Programmer Specific Information::
57* Platform Dependent Information::
58* Troubleshooting::
59
60
61File: avrdude.info,  Node: Introduction,  Next: Command Line Options,  Prev: Top,  Up: Top
62
631 Introduction
64**************
65
66AVRDUDE - AVR Downloader Uploader - is a program for downloading and
67uploading the on-chip memories of Atmel's AVR microcontrollers.  It can
68program the Flash and EEPROM, and where supported by the serial
69programming protocol, it can program fuse and lock bits.  AVRDUDE also
70supplies a direct instruction mode allowing one to issue any programming
71instruction to the AVR chip regardless of whether AVRDUDE implements
72that specific feature of a particular chip.
73
74   AVRDUDE can be used effectively via the command line to read or write
75all chip memory types (eeprom, flash, fuse bits, lock bits, signature
76bytes) or via an interactive (terminal) mode.  Using AVRDUDE from the
77command line works well for programming the entire memory of the chip
78from the contents of a file, while interactive mode is useful for
79exploring memory contents, modifying individual bytes of eeprom,
80programming fuse/lock bits, etc.
81
82   AVRDUDE supports the following basic programmer types: Atmel's
83STK500, Atmel's AVRISP and AVRISP mkII devices, Atmel's STK600, Atmel's
84JTAG ICE (the original one, mkII, and 3, the latter two also in ISP
85mode), appnote avr910, appnote avr109 (including the AVR Butterfly),
86serial bit-bang adapters, and the PPI (parallel port interface).  PPI
87represents a class of simple programmers where the programming lines are
88directly connected to the PC parallel port.  Several pin configurations
89exist for several variations of the PPI programmers, and AVRDUDE can be
90configured to work with them by either specifying the appropriate
91programmer on the command line or by creating a new entry in its
92configuration file.  All that's usually required for a new entry is to
93tell AVRDUDE which pins to use for each programming function.
94
95   A number of equally simple bit-bang programming adapters that connect
96to a serial port are supported as well, among them the popular Ponyprog
97serial adapter, and the DASA and DASA3 adapters that used to be
98supported by uisp(1).  Note that these adapters are meant to be attached
99to a physical serial port.  Connecting to a serial port emulated on top
100of USB is likely to not work at all, or to work abysmally slow.
101
102   If you happen to have a Linux system with at least 4 hardware GPIOs
103available (like almost all embedded Linux boards) you can do without any
104additional hardware - just connect them to the MOSI, MISO, RESET and SCK
105pins on the AVR and use the linuxgpio programmer type.  It bitbangs the
106lines using the Linux sysfs GPIO interface.  Of course, care should be
107taken about voltage level compatibility.  Also, although not strictly
108required, it is strongly advisable to protect the GPIO pins from
109overcurrent situations in some way.  The simplest would be to just put
110some resistors in series or better yet use a 3-state buffer driver like
111the 74HC244.  Have a look at http://kolev.info/avrdude-linuxgpio for a
112more detailed tutorial about using this programmer type.
113
114   Under a Linux installation with direct access to the SPI bus and GPIO
115pins, such as would be found on a Raspberry Pi, the "linuxspi"
116programmer type can be used to directly connect to and program a chip
117using the built in interfaces on the computer.  The requirements to use
118this type are that an SPI interface is exposed along with one GPIO pin.
119The GPIO serves as the reset output since the Linux SPI drivers do not
120hold slave select down when a transfer is not occuring and thus it
121cannot be used as the reset pin.  A readily available level translator
122should be used between the SPI bus/reset GPIO and the chip to avoid
123potentially damaging the computer's SPI controller in the event that the
124chip is running at 5V and the SPI runs at 3.3V. The GPIO chosen for
125reset can be configured in the avrdude configuration file using the
126'reset' entry under the linuxspi programmer, or directly in the port
127specification.  An external pull-up resistor should be connected between
128the AVR's reset pin and Vcc.  If Vcc is not the same as the SPI voltage,
129this should be done on the AVR side of the level translator to protect
130the hardware from damage.
131
132   On a Raspberry Pi, header J8 provides access to the SPI and GPIO
133lines.
134
135   Typically, pins 19, 21, and 23 are SPI MOSI, MISO, and SCK, while
136pins 24 and 26 would serve as CE outputs.  So, close to these pins is
137pin 22 as GPIO25 which can be used as /RESET, and pin 25 can be used as
138GND.
139
140   A typical programming cable would then look like:
141
142'J8 pin'    'ISP pin'   'Name'
143'21'        '1'         'MISO'
144'-'         '2'         'Vcc - leave open'
145'23'        '3'         'SCK'
146'19'        '4'         'MOSI'
147'22'        '5'         '/RESET'
148'25'        '6'         'GND'
149
150   (Mind the 3.3 V voltage level of the Raspberry Pi!)
151
152   The '-P PORTNAME' option defaults to '/dev/spidev0.0:/dev/gpiochip0'
153for this programmer.
154
155   The STK500, JTAG ICE, avr910, and avr109/butterfly use the serial
156port to communicate with the PC. The STK600, JTAG ICE mkII/3, AVRISP
157mkII, USBasp, avrftdi (and derivatives), and USBtinyISP programmers
158communicate through the USB, using 'libusb' as a platform abstraction
159layer.  The avrftdi adds support for the FT2232C/D, FT2232H, and FT4232H
160devices.  These all use the MPSSE mode, which has a specific pin
161mapping.  Bit 1 (the lsb of the byte in the config file) is SCK. Bit 2
162is MOSI, and Bit 3 is MISO. Bit 4 usually reset.  The 2232C/D parts are
163only supported on interface A, but the H parts can be either A or B
164(specified by the usbdev config parameter).  The STK500, STK600, JTAG
165ICE, and avr910 contain on-board logic to control the programming of the
166target device.  The avr109 bootloader implements a protocol similar to
167avr910, but is actually implemented in the boot area of the target's
168flash ROM, as opposed to being an external device.  The fundamental
169difference between the two types lies in the protocol used to control
170the programmer.  The avr910 protocol is very simplistic and can easily
171be used as the basis for a simple, home made programmer since the
172firmware is available online.  On the other hand, the STK500 protocol is
173more robust and complicated and the firmware is not openly available.
174The JTAG ICE also uses a serial communication protocol which is similar
175to the STK500 firmware version 2 one.  However, as the JTAG ICE is
176intended to allow on-chip debugging as well as memory programming, the
177protocol is more sophisticated.  (The JTAG ICE mkII protocol can also be
178run on top of USB.) Only the memory programming functionality of the
179JTAG ICE is supported by AVRDUDE. For the JTAG ICE mkII/3, JTAG,
180debugWire and ISP mode are supported, provided it has a firmware
181revision of at least 4.14 (decimal).  See below for the limitations of
182debugWire.  For ATxmega devices, the JTAG ICE mkII/3 is supported in PDI
183mode, provided it has a revision 1 hardware and firmware version of at
184least 5.37 (decimal).
185
186   The Atmel-ICE (ARM/AVR) is supported (JTAG, PDI for Xmega, debugWIRE,
187ISP modes).
188
189   Atmel's XplainedPro boards, using EDBG protocol (CMSIS-DAP
190compliant), are supported by the "jtag3" programmer type.
191
192   Atmel's XplainedMini boards, using mEDBG protocol, are also supported
193by the "jtag3" programmer type.
194
195   The AVR Dragon is supported in all modes (ISP, JTAG, PDI, HVSP, PP,
196debugWire).  When used in JTAG and debugWire mode, the AVR Dragon
197behaves similar to a JTAG ICE mkII, so all device-specific comments for
198that device will apply as well.  When used in ISP and PDI mode, the AVR
199Dragon behaves similar to an AVRISP mkII (or JTAG ICE mkII in ISP mode),
200so all device-specific comments will apply there.  In particular, the
201Dragon starts out with a rather fast ISP clock frequency, so the '-B
202BITCLOCK' option might be required to achieve a stable ISP
203communication.  For ATxmega devices, the AVR Dragon is supported in PDI
204mode, provided it has a firmware version of at least 6.11 (decimal).
205
206   Wiring boards (e.g.  Arduino Mega 2560 Rev3) are supported, utilizing
207STK500 V2.x protocol, but a simple DTR/RTS toggle to set the boards into
208programming mode.  The programmer type is "wiring".  Note that the -D
209option will likely be required in this case, because the bootloader will
210rewrite the program memory, but no true chip erase can be performed.
211
212   The Arduino (which is very similar to the STK500 1.x) is supported
213via its own programmer type specification "arduino".  This programmer
214works for the Arduino Uno Rev3.
215
216   The BusPirate is a versatile tool that can also be used as an AVR
217programmer.  A single BusPirate can be connected to up to 3 independent
218AVRs.  See the section on _extended parameters_ below for details.
219
220   The USBasp ISP and USBtinyISP adapters are also supported, provided
221AVRDUDE has been compiled with libusb support.  They both feature simple
222firmware-only USB implementations, running on an ATmega8 (or ATmega88),
223or ATtiny2313, respectively.
224
225   The Atmel DFU bootloader is supported in both, FLIP protocol version
2261 (AT90USB* and ATmega*U* devices), as well as version 2 (Xmega
227devices).  See below for some hints about FLIP version 1 protocol
228behaviour.
229
230   The MPLAB(R) PICkit 4, MPLAB(R) SNAP, and Curiosity Nano boards are
231supported in UPDI mode.  The Curiosity Nano board is dubbed "PICkit on
232Board", thus the name 'pkobn_updi'.
233
234* Menu:
235
236* History::
237
238
239File: avrdude.info,  Node: History,  Prev: Introduction,  Up: Introduction
240
2411.1 History and Credits
242=======================
243
244AVRDUDE was written by Brian S. Dean under the name of AVRPROG to run on
245the FreeBSD Operating System.  Brian renamed the software to be called
246AVRDUDE when interest grew in a Windows port of the software so that the
247name did not conflict with AVRPROG.EXE which is the name of Atmel's
248Windows programming software.
249
250   The AVRDUDE source now resides in the public CVS repository on
251savannah.gnu.org (<http://savannah.gnu.org/projects/avrdude/>), where it
252continues to be enhanced and ported to other systems.  In addition to
253FreeBSD, AVRDUDE now runs on Linux and Windows.  The developers behind
254the porting effort primarily were Ted Roth, Eric Weddington, and Joerg
255Wunsch.
256
257   And in the spirit of many open source projects, this manual also
258draws on the work of others.  The initial revision was composed of parts
259of the original Unix manual page written by Joerg Wunsch, the original
260web site documentation by Brian Dean, and from the comments describing
261the fields in the AVRDUDE configuration file by Brian Dean.  The texi
262formatting was modeled after that of the Simulavr documentation by Ted
263Roth.
264
265
266File: avrdude.info,  Node: Command Line Options,  Next: Terminal Mode Operation,  Prev: Introduction,  Up: Top
267
2682 Command Line Options
269**********************
270
271* Menu:
272
273* Option Descriptions::
274* Programmers accepting extended parameters::
275* Example Command Line Invocations::
276
277
278File: avrdude.info,  Node: Option Descriptions,  Next: Programmers accepting extended parameters,  Prev: Command Line Options,  Up: Command Line Options
279
2802.1 Option Descriptions
281=======================
282
283AVRDUDE is a command line tool, used as follows:
284
285     avrdude -p partno OPTIONS ...
286
287Command line options are used to control AVRDUDE's behaviour.  The
288following options are recognized:
289
290'-p PARTNO'
291     This is the only mandatory option and it tells AVRDUDE what type of
292     part (MCU) that is connected to the programmer.  The PARTNO
293     parameter is the part's id listed in the configuration file.
294     Specify -p ?  to list all parts in the configuration file.  If a
295     part is unknown to AVRDUDE, it means that there is no config file
296     entry for that part, but it can be added to the configuration file
297     if you have the Atmel datasheet so that you can enter the
298     programming specifications.  Currently, the following MCU types are
299     understood:
300
301     'uc3a0512'  AT32UC3A0512
302     'c128'      AT90CAN128
303     'c32'       AT90CAN32
304     'c64'       AT90CAN64
305     'pwm2'      AT90PWM2
306     'pwm216'    AT90PWM216
307     'pwm2b'     AT90PWM2B
308     'pwm3'      AT90PWM3
309     'pwm316'    AT90PWM316
310     'pwm3b'     AT90PWM3B
311     '1200'      AT90S1200 (****)
312     '2313'      AT90S2313
313     '2333'      AT90S2333
314     '2343'      AT90S2343 (*)
315     '4414'      AT90S4414
316     '4433'      AT90S4433
317     '4434'      AT90S4434
318     '8515'      AT90S8515
319     '8535'      AT90S8535
320     'usb1286'   AT90USB1286
321     'usb1287'   AT90USB1287
322     'usb162'    AT90USB162
323     'usb646'    AT90USB646
324     'usb647'    AT90USB647
325     'usb82'     AT90USB82
326     'm103'      ATmega103
327     'm128'      ATmega128
328     'm1280'     ATmega1280
329     'm1281'     ATmega1281
330     'm1284'     ATmega1284
331     'm1284p'    ATmega1284P
332     'm1284rfr2' ATmega1284RFR2
333     'm128rfa1'  ATmega128RFA1
334     'm128rfr2'  ATmega128RFR2
335     'm16'       ATmega16
336     'm1608'     ATmega1608
337     'm1609'     ATmega1609
338     'm161'      ATmega161
339     'm162'      ATmega162
340     'm163'      ATmega163
341     'm164p'     ATmega164P
342     'm168'      ATmega168
343     'm168p'     ATmega168P
344     'm168pb'    ATmega168PB
345     'm169'      ATmega169
346     'm16u2'     ATmega16U2
347     'm2560'     ATmega2560 (**)
348     'm2561'     ATmega2561 (**)
349     'm2564rfr2' ATmega2564RFR2
350     'm256rfr2'  ATmega256RFR2
351     'm32'       ATmega32
352     'm3208'     ATmega3208
353     'm3209'     ATmega3209
354     'm324a'     ATmega324A
355     'm324p'     ATmega324P
356     'm324pa'    ATmega324PA
357     'm324pb'    ATmega324PB
358     'm325'      ATmega325
359     'm3250'     ATmega3250
360     'm328'      ATmega328
361     'm328p'     ATmega328P
362     'm328pb'    ATmega328PB
363     'm329'      ATmega329
364     'm3290'     ATmega3290
365     'm3290p'    ATmega3290P
366     'm329p'     ATmega329P
367     'm32m1'     ATmega32M1
368     'm32u2'     ATmega32U2
369     'm32u4'     ATmega32U4
370     'm406'      ATMEGA406
371     'm48'       ATmega48
372     'm4808'     ATmega4808
373     'm4809'     ATmega4809
374     'm48p'      ATmega48P
375     'm48pb'     ATmega48PB
376     'm64'       ATmega64
377     'm640'      ATmega640
378     'm644'      ATmega644
379     'm644p'     ATmega644P
380     'm644rfr2'  ATmega644RFR2
381     'm645'      ATmega645
382     'm6450'     ATmega6450
383     'm649'      ATmega649
384     'm6490'     ATmega6490
385     'm64m1'     ATmega64M1
386     'm64rfr2'   ATmega64RFR2
387     'm8'        ATmega8
388     'm808'      ATmega808
389     'm809'      ATmega809
390     'm8515'     ATmega8515
391     'm8535'     ATmega8535
392     'm88'       ATmega88
393     'm88p'      ATmega88P
394     'm88pb'     ATmega88PB
395     'm8a'       ATmega8A
396     'm8u2'      ATmega8U2
397     't10'       ATtiny10
398     't11'       ATtiny11 (***)
399     't12'       ATtiny12
400     't13'       ATtiny13
401     't15'       ATtiny15
402     't1604'     ATtiny1604
403     't1606'     ATtiny1606
404     't1607'     ATtiny1607
405     't1614'     ATtiny1614
406     't1616'     ATtiny1616
407     't1617'     ATtiny1617
408     't1624'     ATtiny1624
409     't1626'     ATtiny1626
410     't1627'     ATtiny1627
411     't1634'     ATtiny1634
412     't20'       ATtiny20
413     't202'      ATtiny202
414     't204'      ATtiny204
415     't212'      ATtiny212
416     't214'      ATtiny214
417     't2313'     ATtiny2313
418     't24'       ATtiny24
419     't25'       ATtiny25
420     't26'       ATtiny26
421     't261'      ATtiny261
422     't28'       ATtiny28
423     't3216'     ATtiny3216
424     't3217'     ATtiny3217
425     't4'        ATtiny4
426     't40'       ATtiny40
427     't402'      ATtiny402
428     't404'      ATtiny404
429     't406'      ATtiny406
430     't412'      ATtiny412
431     't414'      ATtiny414
432     't416'      ATtiny416
433     't417'      ATtiny417
434     't424'      ATtiny424
435     't426'      ATtiny426
436     't427'      ATtiny427
437     't4313'     ATtiny4313
438     't43u'      ATtiny43u
439     't44'       ATtiny44
440     't441'      ATtiny441
441     't45'       ATtiny45
442     't461'      ATtiny461
443     't5'        ATtiny5
444     't804'      ATtiny804
445     't806'      ATtiny806
446     't807'      ATtiny807
447     't814'      ATtiny814
448     't816'      ATtiny816
449     't817'      ATtiny817
450     't824'      ATtiny824
451     't826'      ATtiny826
452     't827'      ATtiny827
453     't84'       ATtiny84
454     't841'      ATtiny841
455     't85'       ATtiny85
456     't861'      ATtiny861
457     't88'       ATtiny88
458     't9'        ATtiny9
459     'x128a1'    ATxmega128A1
460     'x128a1d'   ATxmega128A1revD
461     'x128a1u'   ATxmega128A1U
462     'x128a3'    ATxmega128A3
463     'x128a3u'   ATxmega128A3U
464     'x128a4'    ATxmega128A4
465     'x128a4u'   ATxmega128A4U
466     'x128b1'    ATxmega128B1
467     'x128b3'    ATxmega128B3
468     'x128c3'    ATxmega128C3
469     'x128d3'    ATxmega128D3
470     'x128d4'    ATxmega128D4
471     'x16a4'     ATxmega16A4
472     'x16a4u'    ATxmega16A4U
473     'x16c4'     ATxmega16C4
474     'x16d4'     ATxmega16D4
475     'x16e5'     ATxmega16E5
476     'x192a1'    ATxmega192A1
477     'x192a3'    ATxmega192A3
478     'x192a3u'   ATxmega192A3U
479     'x192c3'    ATxmega192C3
480     'x192d3'    ATxmega192D3
481     'x256a1'    ATxmega256A1
482     'x256a3'    ATxmega256A3
483     'x256a3b'   ATxmega256A3B
484     'x256a3bu'  ATxmega256A3BU
485     'x256a3u'   ATxmega256A3U
486     'x256c3'    ATxmega256C3
487     'x256d3'    ATxmega256D3
488     'x32a4'     ATxmega32A4
489     'x32a4u'    ATxmega32A4U
490     'x32c4'     ATxmega32C4
491     'x32d4'     ATxmega32D4
492     'x32e5'     ATxmega32E5
493     'x384c3'    ATxmega384C3
494     'x384d3'    ATxmega384D3
495     'x64a1'     ATxmega64A1
496     'x64a1u'    ATxmega64A1U
497     'x64a3'     ATxmega64A3
498     'x64a3u'    ATxmega64A3U
499     'x64a4'     ATxmega64A4
500     'x64a4u'    ATxmega64A4U
501     'x64b1'     ATxmega64B1
502     'x64b3'     ATxmega64B3
503     'x64c3'     ATxmega64C3
504     'x64d3'     ATxmega64D3
505     'x64d4'     ATxmega64D4
506     'x8e5'      ATxmega8E5
507     'avr128da28'AVR128DA28
508     'avr128da32'AVR128DA32
509     'avr128da48'AVR128DA48
510     'avr128da64'AVR128DA64
511     'avr128db28'AVR128DB28
512     'avr128db32'AVR128DB32
513     'avr128db48'AVR128DB48
514     'avr128db64'AVR128DB64
515     'avr32da28' AVR32DA28
516     'avr32da32' AVR32DA32
517     'avr32da48' AVR32DA48
518     'avr32db28' AVR32DB28
519     'avr32db32' AVR32DB32
520     'avr32db48' AVR32DB48
521     'avr64da28' AVR64DA28
522     'avr64da32' AVR64DA32
523     'avr64da48' AVR64DA48
524     'avr64da64' AVR64DA64
525     'avr64db28' AVR64DB28
526     'avr64db32' AVR64DB32
527     'avr64db48' AVR64DB48
528     'avr64db64' AVR64DB64
529     'ucr2'      deprecated,
530     'lgt8fx168p'LGT8FX168P
531     'lgt8fx328p'LGT8FX328P
532     'lgt8fx88p' LGT8FX88P
533
534     (*) The AT90S2323 and ATtiny22 use the same algorithm.
535
536     (**) Flash addressing above 128 KB is not supported by all
537     programming hardware.  Known to work are jtag2, stk500v2, and
538     bit-bang programmers.
539
540     (***) The ATtiny11 can only be programmed in high-voltage serial
541     mode.
542
543     (****) The ISP programming protocol of the AT90S1200 differs in
544     subtle ways from that of other AVRs.  Thus, not all programmers
545     support this device.  Known to work are all direct bitbang
546     programmers, and all programmers talking the STK500v2 protocol.
547
548'-b BAUDRATE'
549     Override the RS-232 connection baud rate specified in the
550     respective programmer's entry of the configuration file.
551
552'-B BITCLOCK'
553     Specify the bit clock period for the JTAG interface or the ISP
554     clock (JTAG ICE only).  The value is a floating-point number in
555     microseconds.  Alternatively, the value might be suffixed with
556     "Hz", "kHz", or "MHz", in order to specify the bit clock frequency,
557     rather than a period.  The default value of the JTAG ICE results in
558     about 1 microsecond bit clock period, suitable for target MCUs
559     running at 4 MHz clock and above.  Unlike certain parameters in the
560     STK500, the JTAG ICE resets all its parameters to default values
561     when the programming software signs off from the ICE, so for MCUs
562     running at lower clock speeds, this parameter must be specified on
563     the command-line.  It can also be set in the configuration file by
564     using the 'default_bitclock' keyword.
565
566'-c PROGRAMMER-ID'
567     Specify the programmer to be used.  AVRDUDE knows about several
568     common programmers.  Use this option to specify which one to use.
569     The PROGRAMMER-ID parameter is the programmer's id listed in the
570     configuration file.  Specify -c ?  to list all programmers in the
571     configuration file.  If you have a programmer that is unknown to
572     AVRDUDE, and the programmer is controlled via the PC parallel port,
573     there's a good chance that it can be easily added to the
574     configuration file without any code changes to AVRDUDE. Simply copy
575     an existing entry and change the pin definitions to match that of
576     the unknown programmer.  Currently, the following programmer ids
577     are understood and supported:
578
579     '2232HIO'      FT2232H based generic programmer
580     '4232h'        FT4232H based generic programmer
581     'arduino'      Arduino
582     'arduino-ft232r'Arduino: FT232R connected to ISP
583     'atmelice'     Atmel-ICE (ARM/AVR) in JTAG mode
584     'atmelice_dw'  Atmel-ICE (ARM/AVR) in debugWIRE mode
585     'atmelice_isp' Atmel-ICE (ARM/AVR) in ISP mode
586     'atmelice_pdi' Atmel-ICE (ARM/AVR) in PDI mode
587     'atmelice_updi'Atmel-ICE (ARM/AVR) in UPDI mode
588     'avr109'       Atmel AppNote AVR109 Boot Loader
589     'avr910'       Atmel Low Cost Serial Programmer
590     'avr911'       Atmel AppNote AVR911 AVROSP
591     'avrftdi'      FT2232D based generic programmer
592     'avrisp'       Atmel AVR ISP
593     'avrisp2'      Atmel AVR ISP mkII
594     'avrispmkII'   Atmel AVR ISP mkII
595     'avrispv2'     Atmel AVR ISP V2
596     'buspirate'    The Bus Pirate
597     'buspirate_bb' The Bus Pirate (bitbang interface,
598                    supports TPI)
599     'butterfly'    Atmel Butterfly Development Board
600     'butterfly_mk' Mikrokopter.de Butterfly
601     'bwmega'       BitWizard ftdi_atmega builtin programmer
602     'C232HM'       FT232H based module from FTDI and
603                    Glyn.com.au
604     'c2n232i'      serial port banging, reset=dtr sck=!rts
605                    mosi=!txd miso=!cts
606     'dasa'         serial port banging, reset=rts sck=dtr
607                    mosi=txd miso=cts
608     'dasa3'        serial port banging, reset=!dtr sck=rts
609                    mosi=txd miso=cts
610     'diecimila'    alias for arduino-ft232r
611     'dragon_dw'    Atmel AVR Dragon in debugWire mode
612     'dragon_hvsp'  Atmel AVR Dragon in HVSP mode
613     'dragon_isp'   Atmel AVR Dragon in ISP mode
614     'dragon_jtag'  Atmel AVR Dragon in JTAG mode
615     'dragon_pdi'   Atmel AVR Dragon in PDI mode
616     'dragon_pp'    Atmel AVR Dragon in PP mode
617     'ehajo-isp'    avr-isp-programmer from eHaJo,
618                    http://www.eHaJo.de
619     'flip1'        FLIP USB DFU protocol version 1 (doc7618)
620     'flip2'        FLIP USB DFU protocol version 2 (AVR4023)
621     'ft232r'       FT232R Synchronous BitBang
622     'ft245r'       FT245R Synchronous BitBang
623     'iseavrprog'   USBtiny-based USB programmer,
624                    https://github.com/IowaScaledEngineering/ckt-avrp
625     'jtag1'        Atmel JTAG ICE (mkI)
626     'jtag1slow'    Atmel JTAG ICE (mkI)
627     'jtag2'        Atmel JTAG ICE mkII
628     'jtag2avr32'   Atmel JTAG ICE mkII im AVR32 mode
629     'jtag2dw'      Atmel JTAG ICE mkII in debugWire mode
630     'jtag2fast'    Atmel JTAG ICE mkII
631     'jtag2isp'     Atmel JTAG ICE mkII in ISP mode
632     'jtag2pdi'     Atmel JTAG ICE mkII PDI mode
633     'jtag2slow'    Atmel JTAG ICE mkII
634     'jtag3'        Atmel AVR JTAGICE3 in JTAG mode
635     'jtag3dw'      Atmel AVR JTAGICE3 in debugWIRE mode
636     'jtag3isp'     Atmel AVR JTAGICE3 in ISP mode
637     'jtag3pdi'     Atmel AVR JTAGICE3 in PDI mode
638     'jtag3updi'    Atmel AVR JTAGICE3 in UPDI mode
639     'jtagkey'      Amontec JTAGKey, JTAGKey-Tiny and
640                    JTAGKey2
641     'jtagmkI'      Atmel JTAG ICE (mkI)
642     'jtagmkII'     Atmel JTAG ICE mkII
643     'jtagmkII_avr32'Atmel JTAG ICE mkII im AVR32 mode
644     'lm3s811'      Luminary Micro LM3S811 Eval Board (Rev.
645                    A)
646     'mib510'       Crossbow MIB510 programming board
647     'mkbutterfly'  Mikrokopter.de Butterfly
648     'nibobee'      NIBObee
649     'o-link'       O-Link, OpenJTAG from www.100ask.net
650     'openmoko'     Openmoko debug board (v3)
651     'pavr'         Jason Kyle's pAVR Serial Programmer
652     'pickit2'      MicroChip's PICkit2 Programmer
653     'pickit4_updi' MPLAB(R) PICkit 4 in UPDI mode
654     'pkobn_updi'   Curiosity nano (nEDBG) in UPDI mode
655     'ponyser'      design ponyprog serial, reset=!txd
656                    sck=rts mosi=dtr miso=cts
657     'powerdebugger'Atmel PowerDebugger (ARM/AVR) in JTAG
658                    mode
659     'powerdebugger_dw'Atmel PowerDebugger (ARM/AVR) in
660                    debugWire mode
661     'powerdebugger_isp'Atmel PowerDebugger (ARM/AVR) in ISP mode
662     'powerdebugger_pdi'Atmel PowerDebugger (ARM/AVR) in PDI mode
663     'powerdebugger_updi'Atmel PowerDebugger (ARM/AVR) in UPDI
664                    mode
665     'siprog'       Lancos SI-Prog
666                    <http://www.lancos.com/siprogsch.html>
667     'snap_updi'    MPLAB(R) SNAP in UPDI mode
668     'stk500'       Atmel STK500
669     'stk500hvsp'   Atmel STK500 V2 in high-voltage serial
670                    programming mode
671     'stk500pp'     Atmel STK500 V2 in parallel programming
672                    mode
673     'stk500v1'     Atmel STK500 Version 1.x firmware
674     'stk500v2'     Atmel STK500 Version 2.x firmware
675     'stk600'       Atmel STK600
676     'stk600hvsp'   Atmel STK600 in high-voltage serial
677                    programming mode
678     'stk600pp'     Atmel STK600 in parallel programming mode
679     'tc2030'       Tag-Connect TC2030
680     'ttl232r'      FTDI TTL232R-5V with ICSP adapter
681     'tumpa'        TIAO USB Multi-Protocol Adapter
682     'UM232H'       FT232H based module from FTDI and
683                    Glyn.com.au
684     'uncompatino'  uncompatino with all pairs of pins
685                    shorted
686     'usbasp'       USBasp, http://www.fischl.de/usbasp/
687     'usbasp-clone' Any usbasp clone with correct VID/PID
688     'usbtiny'      USBtiny simple USB programmer,
689                    https://learn.adafruit.com/usbtinyisp
690     'wiring'       Wiring
691     'xbee'         XBee Series 2 Over-The-Air (XBeeBoot)
692     'xplainedmini' Atmel AVR XplainedMini in ISP mode
693     'xplainedmini_dw'Atmel AVR XplainedMini in debugWIRE mode
694     'xplainedmini_updi'Atmel AVR XplainedMini in UPDI mode
695     'xplainedpro'  Atmel AVR XplainedPro in JTAG mode
696     'xplainedpro_updi'Atmel AVR XplainedPro in UPDI mode
697
698'-C CONFIG-FILE'
699     Use the specified config file for configuration data.  This file
700     contains all programmer and part definitions that AVRDUDE knows
701     about.  If not specified, AVRDUDE reads the configuration file from
702     /usr/local/etc/avrdude.conf (FreeBSD and Linux).  See Appendix A
703     for the method of searching for the configuration file for Windows.
704
705     If CONFIG-FILE is written as +FILENAME then this file is read after
706     the system wide and user configuration files.  This can be used to
707     add entries to the configuration without patching your system wide
708     configuration file.  It can be used several times, the files are
709     read in same order as given on the command line.
710
711'-D'
712     Disable auto erase for flash.  When the -U option with flash memory
713     is specified, avrdude will perform a chip erase before starting any
714     of the programming operations, since it generally is a mistake to
715     program the flash without performing an erase first.  This option
716     disables that.  Auto erase is not used for ATxmega devices as these
717     devices can use page erase before writing each page so no explicit
718     chip erase is required.  Note however that any page not affected by
719     the current operation will retain its previous contents.
720
721'-e'
722     Causes a chip erase to be executed.  This will reset the contents
723     of the flash ROM and EEPROM to the value '0xff', and clear all lock
724     bits.  Except for ATxmega devices which can use page erase, it is
725     basically a prerequisite command before the flash ROM can be
726     reprogrammed again.  The only exception would be if the new
727     contents would exclusively cause bits to be programmed from the
728     value '1' to '0'.  Note that in order to reprogram EERPOM cells, no
729     explicit prior chip erase is required since the MCU provides an
730     auto-erase cycle in that case before programming the cell.
731
732'-E EXITSPEC[,...]'
733     By default, AVRDUDE leaves the parallel port in the same state at
734     exit as it has been found at startup.  This option modifies the
735     state of the '/RESET' and 'Vcc' lines the parallel port is left at,
736     according to the exitspec arguments provided, as follows:
737
738     'reset'
739          The '/RESET' signal will be left activated at program exit,
740          that is it will be held low, in order to keep the MCU in reset
741          state afterwards.  Note in particular that the programming
742          algorithm for the AT90S1200 device mandates that the '/RESET'
743          signal is active before powering up the MCU, so in case an
744          external power supply is used for this MCU type, a previous
745          invocation of AVRDUDE with this option specified is one of the
746          possible ways to guarantee this condition.
747
748     'noreset'
749          The '/RESET' line will be deactivated at program exit, thus
750          allowing the MCU target program to run while the programming
751          hardware remains connected.
752
753     'vcc'
754          This option will leave those parallel port pins active (i.  e.
755          high) that can be used to supply 'Vcc' power to the MCU.
756
757     'novcc'
758          This option will pull the 'Vcc' pins of the parallel port down
759          at program exit.
760
761     'd_high'
762          This option will leave the 8 data pins on the parallel port
763          active (i.  e.  high).
764
765     'd_low'
766          This option will leave the 8 data pins on the parallel port
767          inactive (i.  e.  low).
768
769     Multiple EXITSPEC arguments can be separated with commas.
770
771'-F'
772     Normally, AVRDUDE tries to verify that the device signature read
773     from the part is reasonable before continuing.  Since it can happen
774     from time to time that a device has a broken (erased or
775     overwritten) device signature but is otherwise operating normally,
776     this options is provided to override the check.  Also, for
777     programmers like the Atmel STK500 and STK600 which can adjust
778     parameters local to the programming tool (independent of an actual
779     connection to a target controller), this option can be used
780     together with '-t' to continue in terminal mode.
781
782'-i DELAY'
783     For bitbang-type programmers, delay for approximately DELAY
784     microseconds between each bit state change.  If the host system is
785     very fast, or the target runs off a slow clock (like a 32 kHz
786     crystal, or the 128 kHz internal RC oscillator), this can become
787     necessary to satisfy the requirement that the ISP clock frequency
788     must not be higher than 1/4 of the CPU clock frequency.  This is
789     implemented as a spin-loop delay to allow even for very short
790     delays.  On Unix-style operating systems, the spin loop is
791     initially calibrated against a system timer, so the number of
792     microseconds might be rather realistic, assuming a constant system
793     load while AVRDUDE is running.  On Win32 operating systems, a
794     preconfigured number of cycles per microsecond is assumed that
795     might be off a bit for very fast or very slow machines.
796
797'-l LOGFILE'
798     Use LOGFILE rather than STDERR for diagnostics output.  Note that
799     initial diagnostic messages (during option parsing) are still
800     written to STDERR anyway.
801
802'-n'
803     No-write - disables actually writing data to the MCU (useful for
804     debugging AVRDUDE).
805
806'-O'
807     Perform a RC oscillator run-time calibration according to Atmel
808     application note AVR053.  This is only supported on the STK500v2,
809     AVRISP mkII, and JTAG ICE mkII hardware.  Note that the result will
810     be stored in the EEPROM cell at address 0.
811
812'-P PORT'
813     Use port to identify the device to which the programmer is
814     attached.  Normally, the default parallel port is used, but if the
815     programmer type normally connects to the serial port, the default
816     serial port will be used.  See Appendix A, Platform Dependent
817     Information, to find out the default port names for your platform.
818     If you need to use a different parallel or serial port, use this
819     option to specify the alternate port name.
820
821     On Win32 operating systems, the parallel ports are referred to as
822     lpt1 through lpt3, referring to the addresses 0x378, 0x278, and
823     0x3BC, respectively.  If the parallel port can be accessed through
824     a different address, this address can be specified directly, using
825     the common C language notation (i.  e., hexadecimal values are
826     prefixed by 0X).
827
828     For the JTAG ICE mkII, if AVRDUDE has been built with libusb
829     support, PORT may alternatively be specified as 'usb'[:SERIALNO].
830     In that case, the JTAG ICE mkII will be looked up on USB. If
831     SERIALNO is also specified, it will be matched against the serial
832     number read from any JTAG ICE mkII found on USB. The match is done
833     after stripping any existing colons from the given serial number,
834     and right-to-left, so only the least significant bytes from the
835     serial number need to be given.  For a trick how to find out the
836     serial numbers of all JTAG ICEs attached to USB, see *note Example
837     Command Line Invocations::.
838
839     As the AVRISP mkII device can only be talked to over USB, the very
840     same method of specifying the port is required there.
841
842     For the USB programmer "AVR-Doper" running in HID mode, the port
843     must be specified as AVRDOPER.  Libhidapi support is required on
844     Unix and Mac OS but not on Windows.  For more information about
845     AVR-Doper see <http://www.obdev.at/avrusb/avrdoper.html>.
846
847     For the USBtinyISP, which is a simplistic device not implementing
848     serial numbers, multiple devices can be distinguished by their
849     location in the USB hierarchy.  See the respective *Note
850     Troubleshooting:: entry for examples.
851
852     For the XBee programmer the target MCU is to be programmed
853     wirelessly over a ZigBee mesh using the XBeeBoot bootloader.  The
854     ZigBee 64-bit address for the target MCU's own XBee device must be
855     supplied as a 16-character hexadecimal value as a port prefix,
856     followed by the '@' character, and the serial device to connect to
857     a second directly contactable XBee device associated with the same
858     mesh (with a default baud rate of 9600).  This may look similar to:
859     '0013a20000000001dev/tty.serial'.
860
861     For diagnostic purposes, if the target MCU with an XBeeBoot
862     bootloader is connected directly to the serial port, the 64-bit
863     address field can be omitted.  In this mode the default baud rate
864     will be 19200.
865
866     For programmers that attach to a serial port using some kind of
867     higher level protocol (as opposed to bit-bang style programmers),
868     PORT can be specified as 'net':HOST:PORT.  In this case, instead of
869     trying to open a local device, a TCP network connection to (TCP)
870     PORT on HOST is established.  Square brackets may be placed around
871     HOST to improve readability for numeric IPv6 addresses (e.g.
872     'net:[2001:db8::42]:1337').  The remote endpoint is assumed to be a
873     terminal or console server that connects the network stream to a
874     local serial port where the actual programmer has been attached to.
875     The port is assumed to be properly configured, for example using a
876     transparent 8-bit data connection without parity at 115200 Baud for
877     a STK500.
878
879     Note: The ability to handle IPv6 hostnames and addresses is limited
880     to Posix systems (by now).
881
882'-q'
883     Disable (or quell) output of the progress bar while reading or
884     writing to the device.  Specify it a second time for even quieter
885     operation.
886
887'-u'
888     Disables the default behaviour of reading out the fuses three times
889     before programming, then verifying at the end of programming that
890     the fuses have not changed.  If you want to change fuses you will
891     need to specify this option, as avrdude will see the fuses have
892     changed (even though you wanted to) and will change them back for
893     your "safety".  This option was designed to prevent cases of fuse
894     bits magically changing (usually called _safemode_).
895
896     If one of the configuration files contains a line
897
898     'default_safemode = no;'
899
900     safemode is disabled by default.  The '-u' option's effect is
901     negated in that case, i.  e.  it _enables_ safemode.
902
903     Safemode is always disabled for AVR32, Xmega and TPI devices.
904
905'-s'
906     Disable safemode prompting.  When safemode discovers that one or
907     more fuse bits have unintentionally changed, it will prompt for
908     confirmation regarding whether or not it should attempt to recover
909     the fuse bit(s).  Specifying this flag disables the prompt and
910     assumes that the fuse bit(s) should be recovered without asking for
911     confirmation first.
912
913'-t'
914     Tells AVRDUDE to enter the interactive "terminal" mode instead of
915     up- or downloading files.  See below for a detailed description of
916     the terminal mode.
917
918'-U MEMTYPE:OP:FILENAME[:FORMAT]'
919     Perform a memory operation.  Multiple '-U' options can be specified
920     in order to operate on multiple memories on the same command-line
921     invocation.  The MEMTYPE field specifies the memory type to operate
922     on.  Use the '-v' option on the command line or the 'part' command
923     from terminal mode to display all the memory types supported by a
924     particular device.  Typically, a device's memory configuration at
925     least contains the memory types 'flash' and 'eeprom'.  All memory
926     types currently known are:
927     'calibration'
928          One or more bytes of RC oscillator calibration data.
929     'eeprom'
930          The EEPROM of the device.
931     'efuse'
932          The extended fuse byte.
933     'flash'
934          The flash ROM of the device.
935     'fuse'
936          The fuse byte in devices that have only a single fuse byte.
937     'hfuse'
938          The high fuse byte.
939     'lfuse'
940          The low fuse byte.
941     'lock'
942          The lock byte.
943     'signature'
944          The three device signature bytes (device ID).
945     'fuse_N_'
946          The fuse bytes of ATxmega devices, _N_ is an integer number
947          for each fuse supported by the device.
948     'application'
949          The application flash area of ATxmega devices.
950     'apptable'
951          The application table flash area of ATxmega devices.
952     'boot'
953          The boot flash area of ATxmega devices.
954     'prodsig'
955          The production signature (calibration) area of ATxmega
956          devices.
957     'usersig'
958          The user signature area of ATxmega devices.
959
960     The OP field specifies what operation to perform:
961
962     'r'
963          read the specified device memory and write to the specified
964          file
965
966     'w'
967          read the specified file and write it to the specified device
968          memory
969
970     'v'
971          read the specified device memory and the specified file and
972          perform a verify operation
973
974     The FILENAME field indicates the name of the file to read or write.
975     The FORMAT field is optional and contains the format of the file to
976     read or write.  Possible values are:
977
978     'i'
979          Intel Hex
980
981     's'
982          Motorola S-record
983
984     'r'
985          raw binary; little-endian byte order, in the case of the flash
986          ROM data
987
988     'e'
989          ELF (Executable and Linkable Format), the final output file
990          from the linker; currently only accepted as an input file
991
992     'm'
993          immediate mode; actual byte values specified on the command
994          line, separated by commas or spaces in place of the FILENAME
995          field of the '-U' option.  This is useful for programming fuse
996          bytes without having to create a single-byte file or enter
997          terminal mode.  If the number specified begins with '0x', it
998          is treated as a hex value.  If the number otherwise begins
999          with a leading zero ('0') it is treated as octal.  Otherwise,
1000          the value is treated as decimal.
1001
1002     'a'
1003          auto detect; valid for input only, and only if the input is
1004          not provided at stdin.
1005
1006     'd'
1007          decimal; this and the following formats are only valid on
1008          output.  They generate one line of output for the respective
1009          memory section, forming a comma-separated list of the values.
1010          This can be particularly useful for subsequent processing,
1011          like for fuse bit settings.
1012
1013     'h'
1014          hexadecimal; each value will get the string _0x_ prepended.
1015
1016     'o'
1017          octal; each value will get a _0_ prepended unless it is less
1018          than 8 in which case it gets no prefix.
1019
1020     'b'
1021          binary; each value will get the string _0b_ prepended.
1022
1023     The default is to use auto detection for input files, and raw
1024     binary format for output files.
1025
1026     Note that if FILENAME contains a colon, the FORMAT field is no
1027     longer optional since the filename part following the colon would
1028     otherwise be misinterpreted as FORMAT.
1029
1030     When reading any kind of flash memory area (including the various
1031     sub-areas in Xmega devices), the resulting output file will be
1032     truncated to not contain trailing 0xFF bytes which indicate
1033     unprogrammed (erased) memory.  Thus, if the entire memory is
1034     unprogrammed, this will result in an output file that has no
1035     contents at all.
1036
1037     As an abbreviation, the form '-U' FILENAME is equivalent to
1038     specifying '-U' _flash:w:_FILENAME_:a_.  This will only work if
1039     FILENAME does not have a colon in it.
1040
1041'-v'
1042     Enable verbose output.  More '-v' options increase verbosity level.
1043
1044'-V'
1045     Disable automatic verify check when uploading data.
1046
1047'-x EXTENDED_PARAM'
1048     Pass EXTENDED_PARAM to the chosen programmer implementation as an
1049     extended parameter.  The interpretation of the extended parameter
1050     depends on the programmer itself.  See below for a list of
1051     programmers accepting extended parameters.
1052
1053
1054File: avrdude.info,  Node: Programmers accepting extended parameters,  Next: Example Command Line Invocations,  Prev: Option Descriptions,  Up: Command Line Options
1055
10562.2 Programmers accepting extended parameters
1057=============================================
1058
1059'JTAG ICE mkII/3'
1060'AVR Dragon'
1061
1062     When using the JTAG ICE mkII/3 or AVR Dragon in JTAG mode, the
1063     following extended parameter is accepted:
1064     ''jtagchain=UB,UA,BB,BA''
1065          Setup the JTAG scan chain for UB units before, UA units after,
1066          BB bits before, and BA bits after the target AVR,
1067          respectively.  Each AVR unit within the chain shifts by 4
1068          bits.  Other JTAG units might require a different bit shift
1069          count.
1070
1071'AVR910'
1072
1073     The AVR910 programmer type accepts the following extended
1074     parameter:
1075     ''devcode=VALUE''
1076          Override the device code selection by using VALUE as the
1077          device code.  The programmer is not queried for the list of
1078          supported device codes, and the specified VALUE is not
1079          verified but used directly within the 'T' command sent to the
1080          programmer.  VALUE can be specified using the conventional
1081          number notation of the C programming language.
1082     ''no_blockmode''
1083          Disables the default checking for block transfer capability.
1084          Use 'no_blockmode' only if your 'AVR910' programmer creates
1085          errors during initial sequence.
1086
1087'BusPirate'
1088
1089     The BusPirate programmer type accepts the following extended
1090     parameters:
1091     ''reset=cs,aux,aux2''
1092          The default setup assumes the BusPirate's CS output pin
1093          connected to the RESET pin on AVR side.  It is however
1094          possible to have multiple AVRs connected to the same BP with
1095          MISO, MOSI and SCK lines common for all of them.  In such a
1096          case one AVR should have its RESET connected to BusPirate's
1097          _CS_ pin, second AVR's RESET connected to BusPirate's _AUX_
1098          pin and if your BusPirate has an _AUX2_ pin (only available on
1099          BusPirate version v1a with firmware 3.0 or newer) use that to
1100          activate RESET on the third AVR.
1101
1102          It may be a good idea to decouple the BusPirate and the AVR's
1103          SPI buses from each other using a 3-state bus buffer.  For
1104          example 74HC125 or 74HC244 are some good candidates with the
1105          latches driven by the appropriate reset pin (cs, aux or aux2).
1106          Otherwise the SPI traffic in one active circuit may interfere
1107          with programming the AVR in the other design.
1108
1109     ''spifreq=0..7''
1110          '0'  30 kHz (default)
1111          '1'  125 kHz
1112          '2'  250 kHz
1113          '3'  1 MHz
1114          '4'  2 MHz
1115          '5'  2.6 MHz
1116          '6'  4 MHz
1117          '7'  8 MHz
1118
1119     ''rawfreq=0..3''
1120          Sets the SPI speed and uses the Bus Pirate's binary "raw-wire"
1121          mode instead of the default binary SPI mode:
1122
1123          '0'  5 kHz
1124          '1'  50 kHz
1125          '2'  100 kHz (Firmware
1126               v4.2+ only)
1127          '3'  400 kHz (v4.2+)
1128
1129          The only advantage of the "raw-wire" mode is that different
1130          SPI frequencies are available.  Paged writing is not
1131          implemented in this mode.
1132
1133     ''ascii''
1134          Attempt to use ASCII mode even when the firmware supports
1135          BinMode (binary mode).  BinMode is supported in firmware 2.7
1136          and newer, older FW's either don't have BinMode or their
1137          BinMode is buggy.  ASCII mode is slower and makes the above
1138          'reset=', 'spifreq=' and 'rawfreq=' parameters unavailable.
1139          Be aware that ASCII mode is not guaranteed to work with newer
1140          firmware versions, and is retained only to maintain
1141          compatibility with older firmware versions.
1142
1143     ''nopagedwrite''
1144          Firmware versions 5.10 and newer support a binary mode SPI
1145          command that enables whole pages to be written to AVR flash
1146          memory at once, resulting in a significant write speed
1147          increase.  If use of this mode is not desirable for some
1148          reason, this option disables it.
1149
1150     ''nopagedread''
1151          Newer firmware versions support in binary mode SPI command
1152          some AVR Extended Commands.  Using the "Bulk Memory Read from
1153          Flash" results in a significant read speed increase.  If use
1154          of this mode is not desirable for some reason, this option
1155          disables it.
1156
1157     ''cpufreq=125..4000''
1158          This sets the _AUX_ pin to output a frequency of N kHz.
1159          Connecting the _AUX_ pin to the XTAL1 pin of your MCU, you can
1160          provide it a clock, for example when it needs an external
1161          clock because of wrong fuses settings.  Make sure the CPU
1162          frequency is at least four times the SPI frequency.
1163
1164     ''serial_recv_timeout=1...''
1165          This sets the serial receive timeout to the given value.  The
1166          timeout happens every time avrdude waits for the BusPirate
1167          prompt.  Especially in ascii mode this happens very often, so
1168          setting a smaller value can speed up programming a lot.  The
1169          default value is 100ms.  Using 10ms might work in most cases.
1170
1171'Wiring'
1172
1173     When using the Wiring programmer type, the following optional
1174     extended parameter is accepted:
1175     ''snooze=0..32767''
1176          After performing the port open phase, AVRDUDE will wait/snooze
1177          for SNOOZE milliseconds before continuing to the protocol sync
1178          phase.  No toggling of DTR/RTS is performed if SNOOZE > 0.
1179
1180'PICkit2'
1181     Connection to the PICkit2 programmer:
1182     '(AVR)''(PICkit2)'
1183     'RST''VPP/MCLR (1) '
1184     'VDD''VDD Target (2) --
1185          possibly optional if
1186          AVR self powered '
1187     'GND''GND (3) '
1188     'MISO''PGD (4) '
1189     'SCLK''PDC (5) '
1190     'OSI''AUX (6) '
1191
1192     Extended command line parameters:
1193     ''clockrate=RATE''
1194          Sets the SPI clocking rate in Hz (default is 100kHz).
1195          Alternately the -B or -i options can be used to set the
1196          period.
1197     ''timeout=USB-TRANSACTION-TIMEOUT''
1198          Sets the timeout for USB reads and writes in milliseconds
1199          (default is 1500 ms).
1200
1201'USBasp'
1202     Extended parameters:
1203     ''section_config''
1204          Programmer will erase configuration section with option '-e'
1205          (chip erase), rather than entire chip.  Only applicable to TPI
1206          devices (ATtiny 4/5/9/10/20/40).
1207
1208'xbee'
1209     Extended parameters:
1210     ''xbeeresetpin=1..7''
1211          Select the XBee pin 'DIO<1..7>' that is connected to the MCU's
1212          ‘/RESET’ line.  The programmer needs to know which DIO pin to
1213          use to reset into the bootloader.  The default (3) is the
1214          'DIO3' pin (XBee pin 17), but some commercial products use a
1215          different XBee pin.
1216
1217          The remaining two necessary XBee-to-MCU connections are not
1218          selectable - the XBee 'DOUT' pin (pin 2) must be connected to
1219          the MCU's ‘RXD’ line, and the XBee 'DIN' pin (pin 3) must be
1220          connected to the MCU's ‘TXD’ line.
1221
1222
1223File: avrdude.info,  Node: Example Command Line Invocations,  Prev: Programmers accepting extended parameters,  Up: Command Line Options
1224
12252.3 Example Command Line Invocations
1226====================================
1227
1228Download the file 'diag.hex' to the ATmega128 chip using the STK500
1229programmer connected to the default serial port:
1230
1231     % avrdude -p m128 -c stk500 -e -U flash:w:diag.hex
1232
1233     avrdude: AVR device initialized and ready to accept instructions
1234
1235     Reading | ################################################## | 100% 0.03s
1236
1237     avrdude: Device signature = 0x1e9702
1238     avrdude: erasing chip
1239     avrdude: done.
1240     avrdude: performing op: 1, flash, 0, diag.hex
1241     avrdude: reading input file "diag.hex"
1242     avrdude: input file diag.hex auto detected as Intel Hex
1243     avrdude: writing flash (19278 bytes):
1244
1245     Writing | ################################################## | 100% 7.60s
1246
1247     avrdude: 19456 bytes of flash written
1248     avrdude: verifying flash memory against diag.hex:
1249     avrdude: load data flash data from input file diag.hex:
1250     avrdude: input file diag.hex auto detected as Intel Hex
1251     avrdude: input file diag.hex contains 19278 bytes
1252     avrdude: reading on-chip flash data:
1253
1254     Reading | ################################################## | 100% 6.83s
1255
1256     avrdude: verifying ...
1257     avrdude: 19278 bytes of flash verified
1258
1259     avrdude: safemode: Fuses OK
1260
1261     avrdude done.  Thank you.
1262
1263     %
1264
1265Upload the flash memory from the ATmega128 connected to the STK500
1266programmer and save it in raw binary format in the file named 'c:/diag
1267flash.bin':
1268
1269     % avrdude -p m128 -c stk500 -U flash:r:"c:/diag flash.bin":r
1270
1271     avrdude: AVR device initialized and ready to accept instructions
1272
1273     Reading | ################################################## | 100% 0.03s
1274
1275     avrdude: Device signature = 0x1e9702
1276     avrdude: reading flash memory:
1277
1278     Reading | ################################################## | 100% 46.10s
1279
1280     avrdude: writing output file "c:/diag flash.bin"
1281
1282     avrdude: safemode: Fuses OK
1283
1284     avrdude done.  Thank you.
1285
1286     %
1287
1288Using the default programmer, download the file 'diag.hex' to flash,
1289'eeprom.hex' to EEPROM, and set the Extended, High, and Low fuse bytes
1290to 0xff, 0x89, and 0x2e respectively:
1291
1292
1293     % avrdude -p m128 -u -U flash:w:diag.hex \
1294     >                 -U eeprom:w:eeprom.hex \
1295     >                 -U efuse:w:0xff:m      \
1296     >                 -U hfuse:w:0x89:m      \
1297     >                 -U lfuse:w:0x2e:m
1298
1299     avrdude: AVR device initialized and ready to accept instructions
1300
1301     Reading | ################################################## | 100% 0.03s
1302
1303     avrdude: Device signature = 0x1e9702
1304     avrdude: NOTE: FLASH memory has been specified, an erase cycle will be performed
1305              To disable this feature, specify the -D option.
1306     avrdude: erasing chip
1307     avrdude: reading input file "diag.hex"
1308     avrdude: input file diag.hex auto detected as Intel Hex
1309     avrdude: writing flash (19278 bytes):
1310
1311     Writing | ################################################## | 100% 7.60s
1312
1313     avrdude: 19456 bytes of flash written
1314     avrdude: verifying flash memory against diag.hex:
1315     avrdude: load data flash data from input file diag.hex:
1316     avrdude: input file diag.hex auto detected as Intel Hex
1317     avrdude: input file diag.hex contains 19278 bytes
1318     avrdude: reading on-chip flash data:
1319
1320     Reading | ################################################## | 100% 6.84s
1321
1322     avrdude: verifying ...
1323     avrdude: 19278 bytes of flash verified
1324
1325     [ ... other memory status output skipped for brevity ... ]
1326
1327     avrdude done.  Thank you.
1328
1329     %
1330
1331Connect to the JTAG ICE mkII which serial number ends up in 1C37 via
1332USB, and enter terminal mode:
1333
1334
1335     % avrdude -c jtag2 -p m649 -P usb:1c:37 -t
1336
1337     avrdude: AVR device initialized and ready to accept instructions
1338
1339     Reading | ################################################## | 100% 0.03s
1340
1341     avrdude: Device signature = 0x1e9603
1342
1343     [ ... terminal mode output skipped for brevity ... ]
1344
1345     avrdude done.  Thank you.
1346
1347
1348List the serial numbers of all JTAG ICEs attached to USB. This is done
1349by specifying an invalid serial number, and increasing the verbosity
1350level.
1351
1352
1353     % avrdude -c jtag2 -p m128 -P usb:xx -v
1354     [...]
1355              Using Port            : usb:xxx
1356              Using Programmer      : jtag2
1357     avrdude: usbdev_open(): Found JTAG ICE, serno: 00A000001C6B
1358     avrdude: usbdev_open(): Found JTAG ICE, serno: 00A000001C3A
1359     avrdude: usbdev_open(): Found JTAG ICE, serno: 00A000001C30
1360     avrdude: usbdev_open(): did not find any (matching) USB device "usb:xxx"
1361
1362
1363
1364File: avrdude.info,  Node: Terminal Mode Operation,  Next: Configuration File,  Prev: Command Line Options,  Up: Top
1365
13663 Terminal Mode Operation
1367*************************
1368
1369AVRDUDE has an interactive mode called TERMINAL MODE that is enabled by
1370the '-t' option.  This mode allows one to enter interactive commands to
1371display and modify the various device memories, perform a chip erase,
1372display the device signature bytes and part parameters, and to send raw
1373programming commands.  Commands and parameters may be abbreviated to
1374their shortest unambiguous form.  Terminal mode also supports a command
1375history so that previously entered commands can be recalled and edited.
1376
1377* Menu:
1378
1379* Terminal Mode Commands::
1380* Terminal Mode Examples::
1381
1382
1383File: avrdude.info,  Node: Terminal Mode Commands,  Next: Terminal Mode Examples,  Prev: Terminal Mode Operation,  Up: Terminal Mode Operation
1384
13853.1 Terminal Mode Commands
1386==========================
1387
1388The following commands are implemented:
1389
1390'dump MEMTYPE ADDR NBYTES'
1391     Read NBYTES from the specified memory area, and display them in the
1392     usual hexadecimal and ASCII form.
1393
1394'dump'
1395     Continue dumping the memory contents for another NBYTES where the
1396     previous dump command left off.
1397
1398'write MEMTYPE ADDR BYTE1 ... BYTEN'
1399     Manually program the respective memory cells, starting at address
1400     addr, using the values BYTE1 through BYTEN.  This feature is not
1401     implemented for bank-addressed memories such as the flash memory of
1402     ATMega devices.
1403
1404'erase'
1405     Perform a chip erase.
1406
1407'send B1 B2 B3 B4'
1408     Send raw instruction codes to the AVR device.  If you need access
1409     to a feature of an AVR part that is not directly supported by
1410     AVRDUDE, this command allows you to use it, even though AVRDUDE
1411     does not implement the command.  When using direct SPI mode, up to
1412     3 bytes can be omitted.
1413
1414'sig'
1415     Display the device signature bytes.
1416
1417'spi'
1418     Enter direct SPI mode.  The _pgmled_ pin acts as slave select.
1419     _Only supported on parallel bitbang programmers._
1420
1421'part'
1422     Display the current part settings and parameters.  Includes chip
1423     specific information including all memory types supported by the
1424     device, read/write timing, etc.
1425
1426'pgm'
1427     Return to programming mode (from direct SPI mode).
1428
1429'verbose [LEVEL]'
1430     Change (when LEVEL is provided), or display the verbosity level.
1431     The initial verbosity level is controlled by the number of '-v'
1432     options given on the command line.
1433
1434'?'
1435'help'
1436     Give a short on-line summary of the available commands.
1437
1438'quit'
1439     Leave terminal mode and thus AVRDUDE.
1440
1441In addition, the following commands are supported on the STK500 and
1442STK600 programmer:
1443
1444'vtarg VOLTAGE'
1445     Set the target's supply voltage to VOLTAGE Volts.
1446
1447'varef [CHANNEL] VOLTAGE'
1448     Set the adjustable voltage source to VOLTAGE Volts.  This voltage
1449     is normally used to drive the target's _Aref_ input on the STK500
1450     and STK600.  The STK600 offers two reference voltages, which can be
1451     selected by the optional parameter CHANNEL (either 0 or 1).
1452
1453'fosc FREQ[M|k]'
1454     Set the master oscillator to FREQ Hz.  An optional trailing letter
1455     'M' multiplies by 1E6, a trailing letter 'k' by 1E3.
1456
1457'fosc off'
1458     Turn the master oscillator off.
1459
1460'sck PERIOD'
1461     _STK500 and STK600 only:_ Set the SCK clock period to PERIOD
1462     microseconds.
1463
1464     _JTAG ICE only:_ Set the JTAG ICE bit clock period to PERIOD
1465     microseconds.  Note that unlike STK500 settings, this setting will
1466     be reverted to its default value (approximately 1 microsecond) when
1467     the programming software signs off from the JTAG ICE. This
1468     parameter can also be used on the JTAG ICE mkII/3 to specify the
1469     ISP clock period when operating the ICE in ISP mode.
1470
1471'parms'
1472     _STK500 and STK600 only:_ Display the current voltage and master
1473     oscillator parameters.
1474
1475     _JTAG ICE only:_ Display the current target supply voltage and JTAG
1476     bit clock rate/period.
1477
1478
1479File: avrdude.info,  Node: Terminal Mode Examples,  Prev: Terminal Mode Commands,  Up: Terminal Mode Operation
1480
14813.2 Terminal Mode Examples
1482==========================
1483
1484Display part parameters, modify eeprom cells, perform a chip erase:
1485
1486     % avrdude -p m128 -c stk500 -t
1487
1488     avrdude: AVR device initialized and ready to accept instructions
1489     avrdude: Device signature = 0x1e9702
1490     avrdude: current erase-rewrite cycle count is 52 (if being tracked)
1491     avrdude> part
1492     >>> part
1493
1494     AVR Part              : ATMEGA128
1495     Chip Erase delay      : 9000 us
1496     PAGEL                 : PD7
1497     BS2                   : PA0
1498     RESET disposition     : dedicated
1499     RETRY pulse           : SCK
1500     serial program mode   : yes
1501     parallel program mode : yes
1502     Memory Detail         :
1503
1504                                 Page                       Polled
1505       Memory Type Paged  Size   Size #Pages MinW  MaxW   ReadBack
1506       ----------- ------ ------ ---- ------ ----- ----- ---------
1507       eeprom      no       4096    8     0  9000  9000 0xff 0xff
1508       flash       yes    131072  256   512  4500  9000 0xff 0x00
1509       lfuse       no          1    0     0     0     0 0x00 0x00
1510       hfuse       no          1    0     0     0     0 0x00 0x00
1511       efuse       no          1    0     0     0     0 0x00 0x00
1512       lock        no          1    0     0     0     0 0x00 0x00
1513       calibration no          1    0     0     0     0 0x00 0x00
1514       signature   no          3    0     0     0     0 0x00 0x00
1515
1516     avrdude> dump eeprom 0 16
1517     >>> dump eeprom 0 16
1518     0000  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
1519
1520     avrdude> write eeprom 0 1 2 3 4
1521     >>> write eeprom 0 1 2 3 4
1522
1523     avrdude> dump eeprom 0 16
1524     >>> dump eeprom 0 16
1525     0000  01 02 03 04 ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
1526
1527     avrdude> erase
1528     >>> erase
1529     avrdude: erasing chip
1530     avrdude> dump eeprom 0 16
1531     >>> dump eeprom 0 16
1532     0000  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|
1533
1534     avrdude>
1535
1536Program the fuse bits of an ATmega128 (disable M103 compatibility,
1537enable high speed external crystal, enable brown-out detection, slowly
1538rising power).  Note since we are working with fuse bits the -u (unsafe)
1539option is specified, which allows you to modify the fuse bits.  First
1540display the factory defaults, then reprogram:
1541
1542     % avrdude -p m128 -u -c stk500 -t
1543
1544     avrdude: AVR device initialized and ready to accept instructions
1545     avrdude: Device signature = 0x1e9702
1546     avrdude: current erase-rewrite cycle count is 52 (if being tracked)
1547     avrdude> d efuse
1548     >>> d efuse
1549     0000  fd                                                |.               |
1550
1551     avrdude> d hfuse
1552     >>> d hfuse
1553     0000  99                                                |.               |
1554
1555     avrdude> d lfuse
1556     >>> d lfuse
1557     0000  e1                                                |.               |
1558
1559     avrdude> w efuse 0 0xff
1560     >>> w efuse 0 0xff
1561
1562     avrdude> w hfuse 0 0x89
1563     >>> w hfuse 0 0x89
1564
1565     avrdude> w lfuse 0 0x2f
1566     >>> w lfuse 0 0x2f
1567
1568     avrdude>
1569
1570
1571File: avrdude.info,  Node: Configuration File,  Next: Programmer Specific Information,  Prev: Terminal Mode Operation,  Up: Top
1572
15734 Configuration File
1574********************
1575
1576AVRDUDE reads a configuration file upon startup which describes all of
1577the parts and programmers that it knows about.  The advantage of this is
1578that if you have a chip that is not currently supported by AVRDUDE, you
1579can add it to the configuration file without waiting for a new release
1580of AVRDUDE. Likewise, if you have a parallel port programmer that is not
1581supported by AVRDUDE, chances are good that you can copy and existing
1582programmer definition, and with only a few changes, make your programmer
1583work with AVRDUDE.
1584
1585   AVRDUDE first looks for a system wide configuration file in a
1586platform dependent location.  On Unix, this is usually
1587'/usr/local/etc/avrdude.conf', while on Windows it is usually in the
1588same location as the executable file.  The name of this file can be
1589changed using the '-C' command line option.  After the system wide
1590configuration file is parsed, AVRDUDE looks for a per-user configuration
1591file to augment or override the system wide defaults.  On Unix, the
1592per-user file is '.avrduderc' within the user's home directory.  On
1593Windows, this file is the 'avrdude.rc' file located in the same
1594directory as the executable.
1595
1596* Menu:
1597
1598* AVRDUDE Defaults::
1599* Programmer Definitions::
1600* Part Definitions::
1601* Other Notes::
1602
1603
1604File: avrdude.info,  Node: AVRDUDE Defaults,  Next: Programmer Definitions,  Prev: Configuration File,  Up: Configuration File
1605
16064.1 AVRDUDE Defaults
1607====================
1608
1609'default_parallel = "DEFAULT-PARALLEL-DEVICE";'
1610     Assign the default parallel port device.  Can be overridden using
1611     the '-P' option.
1612
1613'default_serial = "DEFAULT-SERIAL-DEVICE";'
1614     Assign the default serial port device.  Can be overridden using the
1615     '-P' option.
1616
1617'default_programmer = "DEFAULT-PROGRAMMER-ID";'
1618     Assign the default programmer id.  Can be overridden using the '-c'
1619     option.
1620
1621'default_bitclock = "DEFAULT-BITCLOCK";'
1622     Assign the default bitclock value.  Can be overridden using the
1623     '-B' option.
1624
1625
1626File: avrdude.info,  Node: Programmer Definitions,  Next: Part Definitions,  Prev: AVRDUDE Defaults,  Up: Configuration File
1627
16284.2 Programmer Definitions
1629==========================
1630
1631The format of the programmer definition is as follows:
1632
1633     programmer
1634         parent <id>                                 # <id> is a quoted string
1635         id       = <id1> [, <id2> [, <id3>] ...] ;  # <idN> are quoted strings
1636         desc     = <description> ;                  # quoted string
1637         type     = "par" | "stk500" | ... ;         # programmer type (see below for a list)
1638         baudrate = <num> ;                          # baudrate for serial ports
1639         vcc      = <num1> [, <num2> ... ] ;         # pin number(s)
1640         buff     = <num1> [, <num2> ... ] ;         # pin number(s)
1641         reset    = <num> ;                          # pin number
1642         sck      = <num> ;                          # pin number
1643         mosi     = <num> ;                          # pin number
1644         miso     = <num> ;                          # pin number
1645         errled   = <num> ;                          # pin number
1646         rdyled   = <num> ;                          # pin number
1647         pgmled   = <num> ;                          # pin number
1648         vfyled   = <num> ;                          # pin number
1649         usbvid   = <hexnum>;                        # USB VID (Vendor ID)
1650         usbpid   = <hexnum> [, <hexnum> ...];       # USB PID (Product ID)
1651         usbdev   = <interface>;                     # USB interface or other device info
1652         usbvendor = <vendorname>;                   # USB Vendor Name
1653         usbproduct = <productname>;                 # USB Product Name
1654         usbsn    = <serialno>;                      # USB Serial Number
1655       ;
1656
1657If a parent is specified, all settings of it (except its ids) are used
1658for the new programmer.  These values can be changed by new setting them
1659for the new programmer.
1660
1661To invert a bit in the pin definitions, use '= ~ <num>'.
1662
1663Not all programmer types can handle a list of USB PIDs.
1664
1665Following programmer types are currently implemented:
1666
1667'arduino'          Arduino programmer
1668'avr910'           Serial programmers using protocol
1669                   described in application note AVR910
1670'avrftdi'          Interface to the MPSSE Engine of FTDI
1671                   Chips using libftdi.
1672'buspirate'        Using the Bus Pirate's SPI interface for
1673                   programming
1674'buspirate_bb'     Using the Bus Pirate's bitbang interface
1675                   for programming
1676'butterfly'        Atmel Butterfly evaluation board; Atmel
1677                   AppNotes AVR109, AVR911
1678'butterfly_mk'     Mikrokopter.de Butterfly
1679'dragon_dw'        Atmel AVR Dragon in debugWire mode
1680'dragon_hvsp'      Atmel AVR Dragon in HVSP mode
1681'dragon_isp'       Atmel AVR Dragon in ISP mode
1682'dragon_jtag'      Atmel AVR Dragon in JTAG mode
1683'dragon_pdi'       Atmel AVR Dragon in PDI mode
1684'dragon_pp'        Atmel AVR Dragon in PP mode
1685'flip1'            FLIP USB DFU protocol version 1 (doc7618)
1686'flip2'            FLIP USB DFU protocol version 2 (AVR4023)
1687'ftdi_syncbb'      FT245R/FT232R Synchronous BitBangMode
1688                   Programmer
1689'jtagmki'          Atmel JTAG ICE mkI
1690'jtagmkii'         Atmel JTAG ICE mkII
1691'jtagmkii_avr32'   Atmel JTAG ICE mkII in AVR32 mode
1692'jtagmkii_dw'      Atmel JTAG ICE mkII in debugWire mode
1693'jtagmkii_isp'     Atmel JTAG ICE mkII in ISP mode
1694'jtagmkii_pdi'     Atmel JTAG ICE mkII in PDI mode
1695'jtagice3'         Atmel JTAGICE3
1696'jtagice3_pdi'     Atmel JTAGICE3 in PDI mode
1697'jtagice3_updi'    Atmel JTAGICE3 in UPDI mode
1698'jtagice3_dw'      Atmel JTAGICE3 in debugWire mode
1699'jtagice3_isp'     Atmel JTAGICE3 in ISP mode
1700'linuxgpio'        GPIO bitbanging using the Linux sysfs
1701                   interface (not available)
1702'linuxspi'         SPI using Linux spidev driver (not
1703                   available)
1704'par'              Parallel port bitbanging
1705'pickit2'          Microchip's PICkit2 Programmer
1706'serbb'            Serial port bitbanging
1707'stk500'           Atmel STK500 Version 1.x firmware
1708'stk500generic'    Atmel STK500, autodetect firmware version
1709'stk500v2'         Atmel STK500 Version 2.x firmware
1710'stk500hvsp'       Atmel STK500 V2 in high-voltage serial
1711                   programming mode
1712'stk500pp'         Atmel STK500 V2 in parallel programming
1713                   mode
1714'stk600'           Atmel STK600
1715'stk600hvsp'       Atmel STK600 in high-voltage serial
1716                   programming mode
1717'stk600pp'         Atmel STK600 in parallel programming mode
1718'usbasp'           USBasp programmer, see
1719                   http://www.fischl.de/usbasp/
1720'usbtiny'          Driver for "usbtiny"-type programmers
1721'wiring'           http://wiring.org.co/, Basically STK500v2
1722                   protocol, with some glue to trigger the
1723                   bootloader.
1724'xbee'             XBee Series 2 Over-The-Air (XBeeBoot)
1725
1726
1727File: avrdude.info,  Node: Part Definitions,  Next: Other Notes,  Prev: Programmer Definitions,  Up: Configuration File
1728
17294.3 Part Definitions
1730====================
1731
1732     part
1733         id               = <id> ;                 # quoted string
1734         desc             = <description> ;        # quoted string
1735         family_id        = <description> ;        # quoted string
1736         has_jtag         = <yes/no> ;             # part has JTAG i/f
1737         has_debugwire    = <yes/no> ;             # part has debugWire i/f
1738         has_pdi          = <yes/no> ;             # part has PDI i/f
1739         has_updi         = <yes/no> ;             # part has UPDI i/f
1740         has_tpi          = <yes/no> ;             # part has TPI i/f
1741         devicecode       = <num> ;                # numeric
1742         stk500_devcode   = <num> ;                # numeric
1743         avr910_devcode   = <num> ;                # numeric
1744         signature        = <num> <num> <num> ;    # signature bytes
1745         usbpid           = <num> ;                # DFU USB PID
1746         reset            = dedicated | io;
1747         retry_pulse      = reset | sck;
1748         pgm_enable       = <instruction format> ;
1749         chip_erase       = <instruction format> ;
1750         chip_erase_delay = <num> ;                # micro-seconds
1751         # STK500 parameters (parallel programming IO lines)
1752         pagel            = <num> ;                # pin name in hex, i.e., 0xD7
1753         bs2              = <num> ;                # pin name in hex, i.e., 0xA0
1754         serial           = <yes/no> ;             # can use serial downloading
1755         parallel         = <yes/no/pseudo>;       # can use par. programming
1756         # STK500v2 parameters, to be taken from Atmel's XML files
1757         timeout          = <num> ;
1758         stabdelay        = <num> ;
1759         cmdexedelay      = <num> ;
1760         synchloops       = <num> ;
1761         bytedelay        = <num> ;
1762         pollvalue        = <num> ;
1763         pollindex        = <num> ;
1764         predelay         = <num> ;
1765         postdelay        = <num> ;
1766         pollmethod       = <num> ;
1767         mode             = <num> ;
1768         delay            = <num> ;
1769         blocksize        = <num> ;
1770         readsize         = <num> ;
1771         hvspcmdexedelay  = <num> ;
1772         # STK500v2 HV programming parameters, from XML
1773         pp_controlstack  = <num>, <num>, ...;     # PP only
1774         hvsp_controlstack = <num>, <num>, ...;    # HVSP only
1775         hventerstabdelay = <num>;
1776         progmodedelay    = <num>;                 # PP only
1777         latchcycles      = <num>;
1778         togglevtg        = <num>;
1779         poweroffdelay    = <num>;
1780         resetdelayms     = <num>;
1781         resetdelayus     = <num>;
1782         hvleavestabdelay = <num>;
1783         resetdelay       = <num>;
1784         synchcycles      = <num>;                 # HVSP only
1785         chiperasepulsewidth = <num>;              # PP only
1786         chiperasepolltimeout = <num>;
1787         chiperasetime    = <num>;                 # HVSP only
1788         programfusepulsewidth = <num>;            # PP only
1789         programfusepolltimeout = <num>;
1790         programlockpulsewidth = <num>;            # PP only
1791         programlockpolltimeout = <num>;
1792         # JTAG ICE mkII parameters, also from XML files
1793         allowfullpagebitstream = <yes/no> ;
1794         enablepageprogramming = <yes/no> ;
1795         idr              = <num> ;                # IO addr of IDR (OCD) reg.
1796         rampz            = <num> ;                # IO addr of RAMPZ reg.
1797         spmcr            = <num> ;                # mem addr of SPMC[S]R reg.
1798         eecr             = <num> ;                # mem addr of EECR reg.
1799                                                   # (only when != 0x3c)
1800         is_at90s1200     = <yes/no> ;             # AT90S1200 part
1801         is_avr32         = <yes/no> ;             # AVR32 part
1802
1803         memory <memtype>
1804             paged           = <yes/no> ;          # yes / no
1805             size            = <num> ;             # bytes
1806             page_size       = <num> ;             # bytes
1807             num_pages       = <num> ;             # numeric
1808             min_write_delay = <num> ;             # micro-seconds
1809             max_write_delay = <num> ;             # micro-seconds
1810             readback_p1     = <num> ;             # byte value
1811             readback_p2     = <num> ;             # byte value
1812             pwroff_after_write = <yes/no> ;       # yes / no
1813             read            = <instruction format> ;
1814             write           = <instruction format> ;
1815             read_lo         = <instruction format> ;
1816             read_hi         = <instruction format> ;
1817             write_lo        = <instruction format> ;
1818             write_hi        = <instruction format> ;
1819             loadpage_lo     = <instruction format> ;
1820             loadpage_hi     = <instruction format> ;
1821             writepage       = <instruction format> ;
1822           ;
1823       ;
1824
1825* Menu:
1826
1827* Parent Part::
1828* Instruction Format::
1829
1830
1831File: avrdude.info,  Node: Parent Part,  Next: Instruction Format,  Prev: Part Definitions,  Up: Part Definitions
1832
18334.3.1 Parent Part
1834-----------------
1835
1836Parts can also inherit parameters from previously defined parts using
1837the following syntax.  In this case specified integer and string values
1838override parameter values from the parent part.  New memory definitions
1839are added to the definitions inherited from the parent.
1840
1841        part parent <id>                              # quoted string
1842            id               = <id> ;                 # quoted string
1843            <any set of other parameters from the list above>
1844          ;
1845
1846
1847File: avrdude.info,  Node: Instruction Format,  Prev: Parent Part,  Up: Part Definitions
1848
18494.3.2 Instruction Format
1850------------------------
1851
1852Instruction formats are specified as a comma separated list of string
1853values containing information (bit specifiers) about each of the 32 bits
1854of the instruction.  Bit specifiers may be one of the following formats:
1855
1856'1'
1857     The bit is always set on input as well as output
1858
1859'0'
1860     the bit is always clear on input as well as output
1861
1862'x'
1863     the bit is ignored on input and output
1864
1865'a'
1866     the bit is an address bit, the bit-number matches this bit
1867     specifier's position within the current instruction byte
1868
1869'aN'
1870     the bit is the Nth address bit, bit-number = N, i.e., 'a12' is
1871     address bit 12 on input, 'a0' is address bit 0.
1872
1873'i'
1874     the bit is an input data bit
1875
1876'o'
1877     the bit is an output data bit
1878
1879   Each instruction must be composed of 32 bit specifiers.  The
1880instruction specification closely follows the instruction data provided
1881in Atmel's data sheets for their parts.  For example, the EEPROM read
1882and write instruction for an AT90S2313 AVR part could be encoded as:
1883
1884
1885     read  = "1  0  1  0   0  0  0  0   x x x x  x x x x",
1886             "x a6 a5 a4  a3 a2 a1 a0   o o o o  o o o o";
1887
1888     write = "1  1  0  0   0  0  0  0   x x x x  x x x x",
1889             "x a6 a5 a4  a3 a2 a1 a0   i i i i  i i i i";
1890
1891
1892
1893File: avrdude.info,  Node: Other Notes,  Prev: Part Definitions,  Up: Configuration File
1894
18954.4 Other Notes
1896===============
1897
1898   * The 'devicecode' parameter is the device code used by the STK500
1899     and is obtained from the software section ('avr061.zip') of Atmel's
1900     AVR061 application note available from
1901     <http://www.atmel.com/dyn/resources/prod_documents/doc2525.pdf>.
1902
1903   * Not all memory types will implement all instructions.
1904
1905   * AVR Fuse bits and Lock bits are implemented as a type of memory.
1906
1907   * Example memory types are: 'flash', 'eeprom', 'fuse', 'lfuse' (low
1908     fuse), 'hfuse' (high fuse), 'efuse' (extended fuse), 'signature',
1909     'calibration', 'lock'.
1910
1911   * The memory type specified on the AVRDUDE command line must match
1912     one of the memory types defined for the specified chip.
1913
1914   * The 'pwroff_after_write' flag causes AVRDUDE to attempt to power
1915     the device off and back on after an unsuccessful write to the
1916     affected memory area if VCC programmer pins are defined.  If VCC
1917     pins are not defined for the programmer, a message indicating that
1918     the device needs a power-cycle is printed out.  This flag was added
1919     to work around a problem with the at90s4433/2333's; see the
1920     at90s4433 errata at:
1921
1922     <http://www.atmel.com/dyn/resources/prod_documents/doc1280.pdf>
1923
1924   * The boot loader from application note AVR109 (and thus also the AVR
1925     Butterfly) does not support writing of fuse bits.  Writing lock
1926     bits is supported, but is restricted to the boot lock bits (BLBxx).
1927     These are restrictions imposed by the underlying SPM instruction
1928     that is used to program the device from inside the boot loader.
1929     Note that programming the boot lock bits can result in a
1930     "shoot-into-your-foot" scenario as the only way to unprogram these
1931     bits is a chip erase, which will also erase the boot loader code.
1932
1933     The boot loader implements the "chip erase" function by erasing the
1934     flash pages of the application section.
1935
1936     Reading fuse and lock bits is fully supported.
1937
1938     Note that due to the inability to write the fuse bits, the safemode
1939     functionality does not make sense for these boot loaders.
1940
1941
1942File: avrdude.info,  Node: Programmer Specific Information,  Next: Platform Dependent Information,  Prev: Configuration File,  Up: Top
1943
19445 Programmer Specific Information
1945*********************************
1946
1947* Menu:
1948
1949* Atmel STK600::
1950* Atmel DFU bootloader using FLIP version 1::
1951
1952
1953File: avrdude.info,  Node: Atmel STK600,  Next: Atmel DFU bootloader using FLIP version 1,  Prev: Programmer Specific Information,  Up: Programmer Specific Information
1954
19555.1 Atmel STK600
1956================
1957
1958The following devices are supported by the respective STK600 routing and
1959socket card:
1960
1961Routing card       Socket card        Devices
1962---------------------------------------------------------------------------
1963''                 'STK600-ATTINY10'  ATtiny4 ATtiny5 ATtiny9 ATtiny10
1964'STK600-RC008T-2'  'STK600-DIP'       ATtiny11 ATtiny12 ATtiny13
1965                                      ATtiny13A ATtiny25 ATtiny45
1966                                      ATtiny85
1967'STK600-RC008T-7'  'STK600-DIP'       ATtiny15
1968'STK600-RC014T-42' 'STK600-SOIC'      ATtiny20
1969'STK600-RC020T-1'  'STK600-DIP'       ATtiny2313 ATtiny2313A ATtiny4313
1970''                 'STK600-TinyX3U'   ATtiny43U
1971'STK600-RC014T-12' 'STK600-DIP'       ATtiny24 ATtiny44 ATtiny84
1972                                      ATtiny24A ATtiny44A
1973'STK600-RC020T-8'  'STK600-DIP'       ATtiny26 ATtiny261 ATtiny261A
1974                                      ATtiny461 ATtiny861 ATtiny861A
1975'STK600-RC020T-43' 'STK600-SOIC'      ATtiny261 ATtiny261A ATtiny461
1976                                      ATtiny461A ATtiny861 ATtiny861A
1977'STK600-RC020T-23' 'STK600-SOIC'      ATtiny87 ATtiny167
1978'STK600-RC028T-3'  'STK600-DIP'       ATtiny28
1979'STK600-RC028M-6'  'STK600-DIP'       ATtiny48 ATtiny88 ATmega8 ATmega8A
1980                                      ATmega48 ATmega88 ATmega168
1981                                      ATmega48P ATmega48PA ATmega88P
1982                                      ATmega88PA ATmega168P ATmega168PA
1983                                      ATmega328P
1984''                 'QT600-ATTINY88-QT8'ATtiny88
1985'STK600-RC040M-4'  'STK600-DIP'       ATmega8515 ATmega162
1986'STK600-RC044M-30' 'STK600-TQFP44'    ATmega8515 ATmega162
1987'STK600-RC040M-5'  'STK600-DIP'       ATmega8535 ATmega16 ATmega16A
1988                                      ATmega32 ATmega32A ATmega164P
1989                                      ATmega164PA ATmega324P ATmega324PA
1990                                      ATmega644 ATmega644P ATmega644PA
1991                                      ATmega1284P
1992'STK600-RC044M-31' 'STK600-TQFP44'    ATmega8535 ATmega16 ATmega16A
1993                                      ATmega32 ATmega32A ATmega164P
1994                                      ATmega164PA ATmega324P ATmega324PA
1995                                      ATmega644 ATmega644P ATmega644PA
1996                                      ATmega1284P
1997''                 'QT600-ATMEGA324-QM64'ATmega324PA
1998'STK600-RC032M-29' 'STK600-TQFP32'    ATmega8 ATmega8A ATmega48 ATmega88
1999                                      ATmega168 ATmega48P ATmega48PA
2000                                      ATmega88P ATmega88PA ATmega168P
2001                                      ATmega168PA ATmega328P
2002'STK600-RC064M-9'  'STK600-TQFP64'    ATmega64 ATmega64A ATmega128
2003                                      ATmega128A ATmega1281 ATmega2561
2004                                      AT90CAN32 AT90CAN64 AT90CAN128
2005'STK600-RC064M-10' 'STK600-TQFP64'    ATmega165 ATmega165P ATmega169
2006                                      ATmega169P ATmega169PA ATmega325
2007                                      ATmega325P ATmega329 ATmega329P
2008                                      ATmega645 ATmega649 ATmega649P
2009'STK600-RC100M-11' 'STK600-TQFP100'   ATmega640 ATmega1280 ATmega2560
2010''                 'STK600-ATMEGA2560'ATmega2560
2011'STK600-RC100M-18' 'STK600-TQFP100'   ATmega3250 ATmega3250P ATmega3290
2012                                      ATmega3290P ATmega6450 ATmega6490
2013'STK600-RC032U-20' 'STK600-TQFP32'    AT90USB82 AT90USB162 ATmega8U2
2014                                      ATmega16U2 ATmega32U2
2015'STK600-RC044U-25' 'STK600-TQFP44'    ATmega16U4 ATmega32U4
2016'STK600-RC064U-17' 'STK600-TQFP64'    ATmega32U6 AT90USB646 AT90USB1286
2017                                      AT90USB647 AT90USB1287
2018'STK600-RCPWM-22'  'STK600-TQFP32'    ATmega32C1 ATmega64C1 ATmega16M1
2019                                      ATmega32M1 ATmega64M1
2020'STK600-RCPWM-19'  'STK600-SOIC'      AT90PWM2 AT90PWM3 AT90PWM2B
2021                                      AT90PWM3B AT90PWM216 AT90PWM316
2022'STK600-RCPWM-26'  'STK600-SOIC'      AT90PWM81
2023'STK600-RC044M-24' 'STK600-TSSOP44'   ATmega16HVB ATmega32HVB
2024''                 'STK600-HVE2'      ATmega64HVE
2025''                 'STK600-ATMEGA128RFA1'ATmega128RFA1
2026'STK600-RC100X-13' 'STK600-TQFP100'   ATxmega64A1 ATxmega128A1
2027                                      ATxmega128A1_revD ATxmega128A1U
2028''                 'STK600-ATXMEGA1281A1'ATxmega128A1
2029''                 'QT600-ATXMEGA128A1-QT16'ATxmega128A1
2030'STK600-RC064X-14' 'STK600-TQFP64'    ATxmega64A3 ATxmega128A3
2031                                      ATxmega256A3 ATxmega64D3
2032                                      ATxmega128D3 ATxmega192D3
2033                                      ATxmega256D3
2034'STK600-RC064X-14' 'STK600-MLF64'     ATxmega256A3B
2035'STK600-RC044X-15' 'STK600-TQFP44'    ATxmega32A4 ATxmega16A4
2036                                      ATxmega16D4 ATxmega32D4
2037''                 'STK600-ATXMEGAT0' ATxmega32T0
2038''                 'STK600-uC3-144'   AT32UC3A0512 AT32UC3A0256
2039                                      AT32UC3A0128
2040'STK600-RCUC3A144-33''STK600-TQFP144' AT32UC3A0512 AT32UC3A0256
2041                                      AT32UC3A0128
2042'STK600-RCuC3A100-28''STK600-TQFP100' AT32UC3A1512 AT32UC3A1256
2043                                      AT32UC3A1128
2044'STK600-RCuC3B0-21''STK600-TQFP64-2'  AT32UC3B0256 AT32UC3B0512RevC
2045                                      AT32UC3B0512 AT32UC3B0128
2046                                      AT32UC3B064 AT32UC3D1128
2047'STK600-RCuC3B48-27''STK600-TQFP48'   AT32UC3B1256 AT32UC3B164
2048'STK600-RCUC3A144-32''STK600-TQFP144' AT32UC3A3512 AT32UC3A3256
2049                                      AT32UC3A3128 AT32UC3A364
2050                                      AT32UC3A3256S AT32UC3A3128S
2051                                      AT32UC3A364S
2052'STK600-RCUC3C0-36''STK600-TQFP144'   AT32UC3C0512 AT32UC3C0256
2053                                      AT32UC3C0128 AT32UC3C064
2054'STK600-RCUC3C1-38''STK600-TQFP100'   AT32UC3C1512 AT32UC3C1256
2055                                      AT32UC3C1128 AT32UC3C164
2056'STK600-RCUC3C2-40''STK600-TQFP64-2'  AT32UC3C2512 AT32UC3C2256
2057                                      AT32UC3C2128 AT32UC3C264
2058'STK600-RCUC3C0-37''STK600-TQFP144'   AT32UC3C0512 AT32UC3C0256
2059                                      AT32UC3C0128 AT32UC3C064
2060'STK600-RCUC3C1-39''STK600-TQFP100'   AT32UC3C1512 AT32UC3C1256
2061                                      AT32UC3C1128 AT32UC3C164
2062'STK600-RCUC3C2-41''STK600-TQFP64-2'  AT32UC3C2512 AT32UC3C2256
2063                                      AT32UC3C2128 AT32UC3C264
2064'STK600-RCUC3L0-34''STK600-TQFP48'    AT32UC3L064 AT32UC3L032
2065                                      AT32UC3L016
2066''                 'QT600-AT32UC3L-QM64'AT32UC3L064
2067
2068   Ensure the correct socket and routing card are mounted _before_
2069powering on the STK600.  While the STK600 firmware ensures the socket
2070and routing card mounted match each other (using a table stored
2071internally in nonvolatile memory), it cannot handle the case where a
2072wrong routing card is used, e.  g.  the routing card 'STK600-RC040M-5'
2073(which is meant for 40-pin DIP AVRs that have an ADC, with the power
2074supply pins in the center of the package) was used but an ATmega8515
2075inserted (which uses the "industry standard" pinout with Vcc and GND at
2076opposite corners).
2077
2078   Note that for devices that use the routing card 'STK600-RC008T-2', in
2079order to use ISP mode, the jumper for 'AREF0' must be removed as it
2080would otherwise block one of the ISP signals.  High-voltage serial
2081programming can be used even with that jumper installed.
2082
2083   The ISP system of the STK600 contains a detection against shortcuts
2084and other wiring errors.  AVRDUDE initiates a connection check before
2085trying to enter ISP programming mode, and display the result if the
2086target is not found ready to be ISP programmed.
2087
2088   High-voltage programming requires the target voltage to be set to at
2089least 4.5 V in order to work.  This can be done using _Terminal Mode_,
2090see *note Terminal Mode Operation::.
2091
2092
2093File: avrdude.info,  Node: Atmel DFU bootloader using FLIP version 1,  Prev: Atmel STK600,  Up: Programmer Specific Information
2094
20955.2 Atmel DFU bootloader using FLIP version 1
2096=============================================
2097
2098Bootloaders using the FLIP protocol version 1 experience some very
2099specific behaviour.
2100
2101   These bootloaders have no option to access memory areas other than
2102Flash and EEPROM.
2103
2104   When the bootloader is started, it enters a _security mode_ where the
2105only acceptable access is to query the device configuration parameters
2106(which are used for the signature on AVR devices).  The only way to
2107leave this mode is a _chip erase_.  As a chip erase is normally implied
2108by the '-U' option when reprogramming the flash, this peculiarity might
2109not be very obvious immediately.
2110
2111   Sometimes, a bootloader with security mode already disabled seems to
2112no longer respond with sensible configuration data, but only 0xFF for
2113all queries.  As these queries are used to obtain the equivalent of a
2114signature, AVRDUDE can only continue in that situation by forcing the
2115signature check to be overridden with the '-F' option.
2116
2117   A _chip erase_ might leave the EEPROM unerased, at least on some
2118versions of the bootloader.
2119
2120
2121File: avrdude.info,  Node: Platform Dependent Information,  Next: Troubleshooting,  Prev: Programmer Specific Information,  Up: Top
2122
2123Appendix A Platform Dependent Information
2124*****************************************
2125
2126* Menu:
2127
2128* Unix::
2129* Windows::
2130
2131
2132File: avrdude.info,  Node: Unix,  Next: Windows,  Prev: Platform Dependent Information,  Up: Platform Dependent Information
2133
2134A.1 Unix
2135========
2136
2137* Menu:
2138
2139* Unix Installation::
2140* Unix Configuration Files::
2141* Unix Port Names::
2142* Unix Documentation::
2143
2144
2145File: avrdude.info,  Node: Unix Installation,  Next: Unix Configuration Files,  Prev: Unix,  Up: Unix
2146
2147A.1.1 Unix Installation
2148-----------------------
2149
2150To build and install from the source tarball on Unix like systems:
2151
2152     $ gunzip -c avrdude-6.4.tar.gz | tar xf -
2153     $ cd avrdude-6.4
2154     $ ./configure
2155     $ make
2156     $ su root -c 'make install'
2157
2158   The default location of the install is into '/usr/local' so you will
2159need to be sure that '/usr/local/bin' is in your 'PATH' environment
2160variable.
2161
2162   If you do not have root access to your system, you can do the
2163following instead:
2164
2165     $ gunzip -c avrdude-6.4.tar.gz | tar xf -
2166     $ cd avrdude-6.4
2167     $ ./configure --prefix=$HOME/local
2168     $ make
2169     $ make install
2170
2171* Menu:
2172
2173* FreeBSD Installation::
2174* Linux Installation::
2175
2176
2177File: avrdude.info,  Node: FreeBSD Installation,  Next: Linux Installation,  Prev: Unix Installation,  Up: Unix Installation
2178
2179A.1.1.1 FreeBSD Installation
2180............................
2181
2182AVRDUDE is installed via the FreeBSD Ports Tree as follows:
2183
2184     % su - root
2185     # cd /usr/ports/devel/avrdude
2186     # make install
2187
2188   If you wish to install from a pre-built package instead of the
2189source, you can use the following instead:
2190
2191     % su - root
2192     # pkg_add -r avrdude
2193
2194   Of course, you must be connected to the Internet for these methods to
2195work, since that is where the source as well as the pre-built package is
2196obtained.
2197
2198
2199File: avrdude.info,  Node: Linux Installation,  Prev: FreeBSD Installation,  Up: Unix Installation
2200
2201A.1.1.2 Linux Installation
2202..........................
2203
2204On rpm based Linux systems (such as RedHat, SUSE, Mandrake, etc.), you
2205can build and install the rpm binaries directly from the tarball:
2206
2207     $ su - root
2208     # rpmbuild -tb avrdude-6.4.tar.gz
2209     # rpm -Uvh /usr/src/redhat/RPMS/i386/avrdude-6.4-1.i386.rpm
2210
2211   Note that the path to the resulting rpm package, differs from system
2212to system.  The above example is specific to RedHat.
2213
2214
2215File: avrdude.info,  Node: Unix Configuration Files,  Next: Unix Port Names,  Prev: Unix Installation,  Up: Unix
2216
2217A.1.2 Unix Configuration Files
2218------------------------------
2219
2220When AVRDUDE is build using the default '--prefix' configure option, the
2221default configuration file for a Unix system is located at
2222'/usr/local/etc/avrdude.conf'.  This can be overridden by using the '-C'
2223command line option.  Additionally, the user's home directory is
2224searched for a file named '.avrduderc', and if found, is used to augment
2225the system default configuration file.
2226
2227* Menu:
2228
2229* FreeBSD Configuration Files::
2230* Linux Configuration Files::
2231
2232
2233File: avrdude.info,  Node: FreeBSD Configuration Files,  Next: Linux Configuration Files,  Prev: Unix Configuration Files,  Up: Unix Configuration Files
2234
2235A.1.2.1 FreeBSD Configuration Files
2236...................................
2237
2238When AVRDUDE is installed using the FreeBSD ports system, the system
2239configuration file is always '/usr/local/etc/avrdude.conf'.
2240
2241
2242File: avrdude.info,  Node: Linux Configuration Files,  Prev: FreeBSD Configuration Files,  Up: Unix Configuration Files
2243
2244A.1.2.2 Linux Configuration Files
2245.................................
2246
2247When AVRDUDE is installed using from an rpm package, the system
2248configuration file will be always be '/etc/avrdude.conf'.
2249
2250
2251File: avrdude.info,  Node: Unix Port Names,  Next: Unix Documentation,  Prev: Unix Configuration Files,  Up: Unix
2252
2253A.1.3 Unix Port Names
2254---------------------
2255
2256The parallel and serial port device file names are system specific.  The
2257following table lists the default names for a given system.
2258
2259*System*               *Default Parallel      *Default Serial
2260                       Port*                  Port*
2261FreeBSD                '/dev/ppi0'            '/dev/cuad0'
2262Linux                  '/dev/parport0'        '/dev/ttyS0'
2263Solaris                '/dev/printers/0'      '/dev/term/a'
2264
2265   On FreeBSD systems, AVRDUDE uses the ppi(4) interface for accessing
2266the parallel port and the sio(4) driver for serial port access.
2267
2268   On Linux systems, AVRDUDE uses the ppdev interface for accessing the
2269parallel port and the tty driver for serial port access.
2270
2271   On Solaris systems, AVRDUDE uses the ecpp(7D) driver for accessing
2272the parallel port and the asy(7D) driver for serial port access.
2273
2274
2275File: avrdude.info,  Node: Unix Documentation,  Prev: Unix Port Names,  Up: Unix
2276
2277A.1.4 Unix Documentation
2278------------------------
2279
2280AVRDUDE installs a manual page as well as info, HTML and PDF
2281documentation.  The manual page is installed in '/usr/local/man/man1'
2282area, while the HTML and PDF documentation is installed in
2283'/usr/local/share/doc/avrdude' directory.  The info manual is installed
2284in '/usr/local/info/avrdude.info'.
2285
2286   Note that these locations can be altered by various configure options
2287such as '--prefix'.
2288
2289
2290File: avrdude.info,  Node: Windows,  Prev: Unix,  Up: Platform Dependent Information
2291
2292A.2 Windows
2293===========
2294
2295* Menu:
2296
2297* Windows Installation::
2298* Windows Configuration Files::
2299* Windows Port Names::
2300* Using the parallel port::
2301* Documentation::
2302* Credits.::
2303
2304
2305File: avrdude.info,  Node: Windows Installation,  Next: Windows Configuration Files,  Prev: Windows,  Up: Windows
2306
2307A.2.1 Installation
2308------------------
2309
2310A Windows executable of avrdude is included in WinAVR which can be found
2311at <http://sourceforge.net/projects/winavr>.  WinAVR is a suite of
2312executable, open source software development tools for the AVR for the
2313Windows platform.
2314
2315   There are two options to build avrdude from source under Windows.
2316The first one is to use Cygwin (<http://www.cygwin.com/>).
2317
2318   To build and install from the source tarball for Windows (using
2319Cygwin):
2320
2321     $ set PREFIX=<your install directory path>
2322     $ export PREFIX
2323     $ gunzip -c avrdude-6.4.tar.gz | tar xf -
2324     $ cd avrdude-6.4
2325     $ ./configure LDFLAGS="-static" --prefix=$PREFIX --datadir=$PREFIX
2326     --sysconfdir=$PREFIX/bin --enable-versioned-doc=no
2327     $ make
2328     $ make install
2329
2330   Note that recent versions of Cygwin (starting with 1.7) removed the
2331MinGW support from the compiler that is needed in order to build a
2332native Win32 API binary that does not require to install the Cygwin
2333library 'cygwin1.dll' at run-time.  Either try using an older compiler
2334version that still supports MinGW builds, or use MinGW
2335(<http://www.mingw.org/>) directly.
2336
2337
2338File: avrdude.info,  Node: Windows Configuration Files,  Next: Windows Port Names,  Prev: Windows Installation,  Up: Windows
2339
2340A.2.2 Configuration Files
2341-------------------------
2342
2343* Menu:
2344
2345* Configuration file names::
2346* How AVRDUDE finds the configuration files.::
2347
2348
2349File: avrdude.info,  Node: Configuration file names,  Next: How AVRDUDE finds the configuration files.,  Prev: Windows Configuration Files,  Up: Windows Configuration Files
2350
2351A.2.2.1 Configuration file names
2352................................
2353
2354AVRDUDE on Windows looks for a system configuration file name of
2355'avrdude.conf' and looks for a user override configuration file of
2356'avrdude.rc'.
2357
2358
2359File: avrdude.info,  Node: How AVRDUDE finds the configuration files.,  Prev: Configuration file names,  Up: Windows Configuration Files
2360
2361A.2.2.2 How AVRDUDE finds the configuration files.
2362..................................................
2363
2364AVRDUDE on Windows has a different way of searching for the system and
2365user configuration files.  Below is the search method for locating the
2366configuration files:
2367
2368  1. The directory from which the application loaded.
2369
2370  2. The current directory.
2371
2372  3. The Windows system directory.  On Windows NT, the name of this
2373     directory is 'SYSTEM32'.
2374
2375  4. Windows NT: The 16-bit Windows system directory.  The name of this
2376     directory is 'SYSTEM'.
2377
2378  5. The Windows directory.
2379
2380  6. The directories that are listed in the PATH environment variable.
2381
2382
2383File: avrdude.info,  Node: Windows Port Names,  Next: Using the parallel port,  Prev: Windows Configuration Files,  Up: Windows
2384
2385A.2.3 Port Names
2386----------------
2387
2388* Menu:
2389
2390* Serial Ports::
2391* Parallel Ports::
2392
2393
2394File: avrdude.info,  Node: Serial Ports,  Next: Parallel Ports,  Prev: Windows Port Names,  Up: Windows Port Names
2395
2396A.2.3.1 Serial Ports
2397....................
2398
2399When you select a serial port (i.e.  when using an STK500) use the
2400Windows serial port device names such as: com1, com2, etc.
2401
2402
2403File: avrdude.info,  Node: Parallel Ports,  Prev: Serial Ports,  Up: Windows Port Names
2404
2405A.2.3.2 Parallel Ports
2406......................
2407
2408AVRDUDE will accept 3 Windows parallel port names: lpt1, lpt2, or lpt3.
2409Each of these names corresponds to a fixed parallel port base address:
2410
2411'lpt1'
2412     0x378
2413
2414'lpt2'
2415     0x278
2416
2417'lpt3'
2418     0x3BC
2419
2420   On your desktop PC, lpt1 will be the most common choice.  If you are
2421using a laptop, you might have to use lpt3 instead of lpt1.  Select the
2422name of the port the corresponds to the base address of the parallel
2423port that you want.
2424
2425   If the parallel port can be accessed through a different address,
2426this address can be specified directly, using the common C language
2427notation (i.  e., hexadecimal values are prefixed by '0x').
2428
2429
2430File: avrdude.info,  Node: Using the parallel port,  Next: Documentation,  Prev: Windows Port Names,  Up: Windows
2431
2432A.2.4 Using the parallel port
2433-----------------------------
2434
2435* Menu:
2436
2437* Windows NT/2K/XP::
2438* Windows 95/98::
2439
2440
2441File: avrdude.info,  Node: Windows NT/2K/XP,  Next: Windows 95/98,  Prev: Using the parallel port,  Up: Using the parallel port
2442
2443A.2.4.1 Windows NT/2K/XP
2444........................
2445
2446On Windows NT, 2000, and XP user applications cannot directly access the
2447parallel port.  However, kernel mode drivers can access the parallel
2448port.  giveio.sys is a driver that can allow user applications to set
2449the state of the parallel port pins.
2450
2451   Before using AVRDUDE, the giveio.sys driver must be loaded.  The
2452accompanying command-line program, loaddrv.exe, can do just that.
2453
2454   To make things even easier there are 3 batch files that are also
2455included:
2456
2457  1. install_giveio.bat Install and start the giveio driver.
2458
2459  2. status_giveio.bat Check on the status of the giveio driver.
2460
2461  3. remove_giveio.bat Stop and remove the giveio driver from memory.
2462
2463   These 3 batch files calls the loaddrv program with various options to
2464install, start, stop, and remove the driver.
2465
2466   When you first execute install_giveio.bat, loaddrv.exe and giveio.sys
2467must be in the current directory.  When install_giveio.bat is executed
2468it will copy giveio.sys from your current directory to your Windows
2469directory.  It will then load the driver from the Windows directory.
2470This means that after the first time install_giveio is executed, you
2471should be able to subsequently execute the batch file from any directory
2472and have it successfully start the driver.
2473
2474   Note that you must have administrator privilege to load the giveio
2475driver.
2476
2477
2478File: avrdude.info,  Node: Windows 95/98,  Prev: Windows NT/2K/XP,  Up: Using the parallel port
2479
2480A.2.4.2 Windows 95/98
2481.....................
2482
2483On Windows 95 and 98 the giveio.sys driver is not needed.
2484
2485
2486File: avrdude.info,  Node: Documentation,  Next: Credits.,  Prev: Using the parallel port,  Up: Windows
2487
2488A.2.5 Documentation
2489-------------------
2490
2491AVRDUDE installs a manual page as well as info, HTML and PDF
2492documentation.  The manual page is installed in '/usr/local/man/man1'
2493area, while the HTML and PDF documentation is installed in
2494'/usr/local/share/doc/avrdude' directory.  The info manual is installed
2495in '/usr/local/info/avrdude.info'.
2496
2497   Note that these locations can be altered by various configure options
2498such as '--prefix' and '--datadir'.
2499
2500
2501File: avrdude.info,  Node: Credits.,  Prev: Documentation,  Up: Windows
2502
2503A.2.6 Credits.
2504--------------
2505
2506Thanks to:
2507
2508   * Dale Roberts for the giveio driver.
2509
2510   * Paula Tomlinson for the loaddrv sources.
2511
2512   * Chris Liechti <cliechti@gmx.net> for modifying loaddrv to be
2513     command line driven and for writing the batch files.
2514
2515
2516File: avrdude.info,  Node: Troubleshooting,  Prev: Platform Dependent Information,  Up: Top
2517
2518Appendix B Troubleshooting
2519**************************
2520
2521In general, please report any bugs encountered via
2522<http://savannah.nongnu.org/bugs/?group=avrdude>.
2523
2524   * Problem: I'm using a serial programmer under Windows and get the
2525     following error:
2526
2527     'avrdude: serial_open(): can't set attributes for device "com1"',
2528
2529     Solution: This problem seems to appear with certain versions of
2530     Cygwin.  Specifying '"/dev/com1"' instead of '"com1"' should help.
2531
2532   * Problem: I'm using Linux and my AVR910 programmer is really slow.
2533
2534     Solution (short): 'setserial PORT low_latency'
2535
2536     Solution (long): There are two problems here.  First, the system
2537     may wait some time before it passes data from the serial port to
2538     the program.  Under Linux the following command works around this
2539     (you may need root privileges for this).
2540
2541     'setserial PORT low_latency'
2542
2543     Secondly, the serial interface chip may delay the interrupt for
2544     some time.  This behaviour can be changed by setting the
2545     FIFO-threshold to one.  Under Linux this can only be done by
2546     changing the kernel source in 'drivers/char/serial.c'.  Search the
2547     file for 'UART_FCR_TRIGGER_8' and replace it with
2548     'UART_FCR_TRIGGER_1'.  Note that overall performance might suffer
2549     if there is high throughput on serial lines.  Also note that you
2550     are modifying the kernel at your own risk.
2551
2552   * Problem: I'm not using Linux and my AVR910 programmer is really
2553     slow.
2554
2555     Solutions: The reasons for this are the same as above.  If you know
2556     how to work around this on your OS, please let us know.
2557
2558   * Problem: Updating the flash ROM from terminal mode does not work
2559     with the JTAG ICEs.
2560
2561     Solution: None at this time.  Currently, the JTAG ICE code cannot
2562     write to the flash ROM one byte at a time.
2563
2564   * Problem: Page-mode programming the EEPROM (using the -U option)
2565     does not erase EEPROM cells before writing, and thus cannot
2566     overwrite any previous value != 0xff.
2567
2568     Solution: None.  This is an inherent feature of the way JTAG EEPROM
2569     programming works, and is documented that way in the Atmel AVR
2570     datasheets.  In order to successfully program the EEPROM that way,
2571     a prior chip erase (with the EESAVE fuse unprogrammed) is required.
2572     This also applies to the STK500 and STK600 in high-voltage
2573     programming mode.
2574
2575   * Problem: How do I turn off the DWEN fuse?
2576
2577     Solution: If the DWEN (debugWire enable) fuse is activated, the
2578     /RESET pin is not functional anymore, so normal ISP communication
2579     cannot be established.  There are two options to deactivate that
2580     fuse again: high-voltage programming, or getting the JTAG ICE mkII
2581     talk debugWire, and prepare the target AVR to accept normal ISP
2582     communication again.
2583
2584     The first option requires a programmer that is capable of
2585     high-voltage programming (either serial or parallel, depending on
2586     the AVR device), for example the STK500.  In high-voltage
2587     programming mode, the /RESET pin is activated initially using a 12
2588     V pulse (thus the name _high voltage_), so the target AVR can
2589     subsequently be reprogrammed, and the DWEN fuse can be cleared.
2590     Typically, this operation cannot be performed while the AVR is
2591     located in the target circuit though.
2592
2593     The second option requires a JTAG ICE mkII that can talk the
2594     debugWire protocol.  The ICE needs to be connected to the target
2595     using the JTAG-to-ISP adapter, so the JTAG ICE mkII can be used as
2596     a debugWire initiator as well as an ISP programmer.  AVRDUDE will
2597     then be activated using the JTAG2ISP programmer type.  The initial
2598     ISP communication attempt will fail, but AVRDUDE then tries to
2599     initiate a debugWire reset.  When successful, this will leave the
2600     target AVR in a state where it can accept standard ISP
2601     communication.  The ICE is then signed off (which will make it
2602     signing off from the USB as well), so AVRDUDE has to be called
2603     again afterwards.  This time, standard ISP communication can work,
2604     so the DWEN fuse can be cleared.
2605
2606     The pin mapping for the JTAG-to-ISP adapter is:
2607
2608     *JTAG pin*     *ISP pin*
2609     1              3
2610     2              6
2611     3              1
2612     4              2
2613     6              5
2614     9              4
2615
2616   * Problem: Multiple USBasp or USBtinyISP programmers connected
2617     simultaneously are not found.
2618
2619     Solution: The USBtinyISP code supports distinguishing multiple
2620     programmers based on their bus:device connection tuple that
2621     describes their place in the USB hierarchy on a specific host.
2622     This tuple can be added to the -P USB option, similar to adding a
2623     serial number on other USB-based programmers.
2624
2625     The actual naming convention for the bus and device names is
2626     operating-system dependent; AVRDUDE will print out what it found on
2627     the bus when running it with (at least) one -V option.  By
2628     specifying a string that cannot match any existing device (for
2629     example, -P USB:XXX), the scan will list all possible candidate
2630     devices found on the bus.
2631
2632     Examples:
2633          avrdude -c usbtiny -p atmega8 -P usb:003:025 (Linux)
2634          avrdude -c usbtiny -p atmega8 -P usb:/dev/usb:/dev/ugen1.3 (FreeBSD 8+)
2635          avrdude -c usbtiny -p atmega8 \
2636            -P usb:bus-0:\\.\libusb0-0001--0x1781-0x0c9f (Windows)
2637
2638   * Problem: I cannot do ... when the target is in debugWire mode.
2639
2640     Solution: debugWire mode imposes several limitations.
2641
2642     The debugWire protocol is Atmel's proprietary one-wire (plus
2643     ground) protocol to allow an in-circuit emulation of the smaller
2644     AVR devices, using the /RESET line.  DebugWire mode is initiated by
2645     activating the DWEN fuse, and then power-cycling the target.  While
2646     this mode is mainly intended for debugging/emulation, it also
2647     offers limited programming capabilities.  Effectively, the only
2648     memory areas that can be read or programmed in this mode are flash
2649     ROM and EEPROM. It is also possible to read out the signature.  All
2650     other memory areas cannot be accessed.  There is no _chip erase_
2651     functionality in debugWire mode; instead, while reprogramming the
2652     flash ROM, each flash ROM page is erased right before updating it.
2653     This is done transparently by the JTAG ICE mkII (or AVR Dragon).
2654     The only way back from debugWire mode is to initiate a special
2655     sequence of commands to the JTAG ICE mkII (or AVR Dragon), so the
2656     debugWire mode will be temporarily disabled, and the target can be
2657     accessed using normal ISP programming.  This sequence is
2658     automatically initiated by using the JTAG ICE mkII or AVR Dragon in
2659     ISP mode, when they detect that ISP mode cannot be entered.
2660
2661   * Problem: I want to use my JTAG ICE mkII to program an Xmega device
2662     through PDI. The documentation tells me to use the _XMEGA PDI
2663     adapter for JTAGICE mkII_ that is supposed to ship with the kit,
2664     yet I don't have it.
2665
2666     Solution: Use the following pin mapping:
2667
2668     *JTAGICE*      *Target*       *Squid cab-*   *PDI*
2669     *mkII probe*   *pins*         *le colors*    *header*
2670     1 (TCK)                       Black
2671     2 (GND)        GND            White          6
2672     3 (TDO)                       Grey
2673     4 (VTref)      VTref          Purple         2
2674     5 (TMS)                       Blue
2675     6 (nSRST)      PDI_CLK        Green          5
2676     7 (N.C.)                      Yellow
2677     8 (nTRST)                     Orange
2678     9 (TDI)        PDI_DATA       Red            1
2679     10 (GND)                      Brown
2680
2681   * Problem: I want to use my AVR Dragon to program an Xmega device
2682     through PDI.
2683
2684     Solution: Use the 6 pin ISP header on the Dragon and the following
2685     pin mapping:
2686
2687     *Dragon*       *Target*
2688     *ISP Header*   *pins*
2689     1 (MISO)       PDI_DATA
2690     2 (VCC)        VCC
2691     3 (SCK)
2692     4 (MOSI)
2693     5 (RESET)      PDI_CLK /
2694                    RST
2695     6 (GND)        GND
2696
2697   * Problem: I want to use my AVRISP mkII to program an ATtiny4/5/9/10
2698     device through TPI. How to connect the pins?
2699
2700     Solution: Use the following pin mapping:
2701
2702     *AVRISP*       *Target*       *ATtiny*
2703     *connector*    *pins*         *pin #*
2704     1 (MISO)       TPIDATA        1
2705     2 (VTref)      Vcc            5
2706     3 (SCK)        TPICLK         3
2707     4 (MOSI)
2708     5 (RESET)      /RESET         6
2709     6 (GND)        GND            2
2710
2711   * Problem: I want to program an ATtiny4/5/9/10 device using a
2712     serial/parallel bitbang programmer.  How to connect the pins?
2713
2714     Solution: Since TPI has only 1 pin for bi-directional data
2715     transfer, both MISO and MOSI pins should be connected to the
2716     TPIDATA pin on the ATtiny device.  However, a 1K resistor should be
2717     placed between the MOSI and TPIDATA.  The MISO pin connects to
2718     TPIDATA directly.  The SCK pin is connected to TPICLK.
2719
2720     In addition, the VCC, /RESET and GND pins should be connected to
2721     their respective ports on the ATtiny device.
2722
2723   * Problem: How can I use a FTDI FT232R USB-to-Serial device for
2724     bitbang programming?
2725
2726     Solution: When connecting the FT232 directly to the pins of the
2727     target Atmel device, the polarity of the pins defined in the
2728     'programmer' definition should be inverted by prefixing a tilde.
2729     For example, the DASA programmer would look like this when
2730     connected via a FT232R device (notice the tildes in front of pins
2731     7, 4, 3 and 8):
2732
2733          programmer
2734            id    = "dasa_ftdi";
2735            desc  = "serial port banging, reset=rts sck=dtr mosi=txd miso=cts";
2736            type  = serbb;
2737            reset = ~7;
2738            sck   = ~4;
2739            mosi  = ~3;
2740            miso  = ~8;
2741          ;
2742
2743     Note that this uses the FT232 device as a normal serial port, not
2744     using the FTDI drivers in the special bitbang mode.
2745
2746   * Problem: My ATtiny4/5/9/10 reads out fine, but any attempt to
2747     program it (through TPI) fails.  Instead, the memory retains the
2748     old contents.
2749
2750     Solution: Mind the limited programming supply voltage range of
2751     these devices.
2752
2753     In-circuit programming through TPI is only guaranteed by the
2754     datasheet at Vcc = 5 V.
2755
2756   * Problem: My ATxmega...A1/A2/A3 cannot be programmed through PDI
2757     with my AVR Dragon.  Programming through a JTAG ICE mkII works
2758     though, as does programming through JTAG.
2759
2760     Solution: None by this time (2010 Q1).
2761
2762     It is said that the AVR Dragon can only program devices from the A4
2763     Xmega sub-family.
2764
2765   * Problem: when programming with an AVRISPmkII or STK600, AVRDUDE
2766     hangs when programming files of a certain size (e.g.  246 bytes).
2767     Other (larger or smaller) sizes work though.
2768
2769     Solution: This is a bug caused by an incorrect handling of
2770     zero-length packets (ZLPs) in some versions of the libusb 0.1 API
2771     wrapper that ships with libusb 1.x in certain Linux distributions.
2772     All Linux systems with kernel versions < 2.6.31 and libusb >= 1.0.0
2773     < 1.0.3 are reported to be affected by this.
2774
2775     See also: <http://www.libusb.org/ticket/6>
2776
2777   * Problem: after flashing a firmware that reduces the target's clock
2778     speed (e.g.  through the 'CLKPR' register), further ISP connection
2779     attempts fail.
2780
2781     Solution: Even though ISP starts with pulling /RESET low, the
2782     target continues to run at the internal clock speed as defined by
2783     the firmware running before.  Therefore, the ISP clock speed must
2784     be reduced appropriately (to less than 1/4 of the internal clock
2785     speed) using the -B option before the ISP initialization sequence
2786     will succeed.
2787
2788     As that slows down the entire subsequent ISP session, it might make
2789     sense to just issue a _chip erase_ using the slow ISP clock (option
2790     '-e'), and then start a new session at higher speed.  Option '-D'
2791     might be used there, to prevent another unneeded erase cycle.
2792
2793
2794
2795Tag Table:
2796Node: Top1224
2797Node: Introduction1862
2798Node: History11242
2799Node: Command Line Options12476
2800Node: Option Descriptions12754
2801Node: Programmers accepting extended parameters44164
2802Node: Example Command Line Invocations51261
2803Node: Terminal Mode Operation55967
2804Node: Terminal Mode Commands56704
2805Node: Terminal Mode Examples59963
2806Node: Configuration File63148
2807Node: AVRDUDE Defaults64567
2808Node: Programmer Definitions65282
2809Node: Part Definitions70212
2810Node: Parent Part75266
2811Node: Instruction Format75906
2812Node: Other Notes77288
2813Node: Programmer Specific Information79488
2814Node: Atmel STK60079768
2815Node: Atmel DFU bootloader using FLIP version 187944
2816Node: Platform Dependent Information89170
2817Node: Unix89421
2818Node: Unix Installation89671
2819Node: FreeBSD Installation90463
2820Node: Linux Installation91095
2821Node: Unix Configuration Files91638
2822Node: FreeBSD Configuration Files92272
2823Node: Linux Configuration Files92631
2824Node: Unix Port Names92946
2825Node: Unix Documentation93937
2826Node: Windows94464
2827Node: Windows Installation94726
2828Node: Windows Configuration Files95986
2829Node: Configuration file names96253
2830Node: How AVRDUDE finds the configuration files.96643
2831Node: Windows Port Names97435
2832Node: Serial Ports97647
2833Node: Parallel Ports97935
2834Node: Using the parallel port98706
2835Node: Windows NT/2K/XP98933
2836Node: Windows 95/98100443
2837Node: Documentation100646
2838Node: Credits.101202
2839Node: Troubleshooting101534
2840
2841End Tag Table
2842
2843
2844Local Variables:
2845coding: utf-8
2846End:
2847