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