SEARCH
NEW RPMS
DIRECTORIES
ABOUT
FAQ
VARIOUS
BLOG
DONATE


YUM REPOSITORY

 
 

MAN page from openSUSE Leap 42 avrdude-6.3-1.1.x86_64.rpm

AVRDUDE

Section: User Commands (1)
Index
BSD mandoc
 

NAME

avrdude - driver program for ``simple'' Atmel AVR MCU programmer 

SYNOPSIS

-p partno[-b baudrate][-B bitclock][-c programmer-id][-C config-file][-D][-e][-E exitspec [, exitspec]][-F][-i delay][-n logfile][-n][-O][-P port][-q][-s][-t][-u][-U memtype:op:filename:filefmt][-v][-x extended_param][-V] 

DESCRIPTION

Avrdudeis a program for downloading code and data to Atmel AVRmicrocontrollers.Avrdudesupports Atmel's STK500 programmer,Atmel's AVRISP and AVRISP mkII devices,Atmel's STK600,Atmel's JTAG ICE (mkI, mkII and 3, the latter two also in ISP mode),programmers complying to AppNote AVR910 and AVR109 (including the Butterfly),as well as a simple hard-wiredprogrammer connected directly to appi(4)orparport(4)parallel port, or to a standard serial port.In the simplest case, the hardware consists just of acable connecting the respective AVR signal lines to the parallel port.

The MCU is programmed inserial programming mode so, for theppi(4)based programmer, the MCU signals`/RESET',`SCK',`MISO'and`MOSI'need to be connected to the parallel port. Optionally, some otherwiseunused output pins of the parallel port can be used to supply powerfor the MCU part, so it is also possible to construct a passivestand-alone programming device. Some status LEDs indicating thecurrent operating state of the programmer can be connected, and asignal is available to control a buffer/driver IC 74LS367 (or74HCT367). The latter can be useful to decouple the parallel portfrom the MCU when in-system programming is used.

A number of equally simple bit-bang programming adapters that connectto a serial port are supported as well, among them the popularPonyprog serial adapter, and the DASA and DASA3 adapters that used tobe supported by uisp(1).Note that these adapters are meant to be attached to a physical serialport.Connecting to a serial port emulated on top of USB is likely to notwork at all, or to work abysmally slow.

If you happen to have a Linux system with at least 4 hardware GPIOs available (like almost all embedded Linux boards) you can do without any additional hardware - just connect them to the MOSI, MISO, RESET and SCK pins on the AVR and use the linuxgpio programmer type. It bitbangsthe lines using the Linux sysfs GPIO interface. Of course, care shouldbe taken about voltage level compatibility. Also, although not strictrly required, it is strongly advisable to protect the GPIO pins from overcurrent situations in some way. The simplest would be to just putsome resistors in series or better yet use a 3-state buffer driver likethe 74HC244. Have a look at http://kolev.info/avrdude-linuxgpio for a moredetailed tutorial about using this programmer type.

Atmel's STK500 programmer is also supported and connects to a serialport.Both, firmware versions 1.x and 2.x can be handled, but require adifferent programmer type specification (by now).Using firmware version 2, high-voltage programming is also supported,both parallel and serial(programmer types stk500pp and stk500hvsp).

Wiring boards are supported, utilizing STK500 V2.x protocol, buta simple DTR/RTS toggle is used to set the boards into programming mode.The programmer type is ``wiring''.

The Arduino (which is very similar to the STK500 1.x) is supported viaits own programmer type specification ``arduino''.

The BusPirate is a versatile tool that can also be used as an AVR programmer.A single BusPirate can be connected to up to 3 independent AVRs. Seethe section onextended parametersbelow for details.

Atmel's STK600 programmer is supported in ISP and high-voltageprogramming modes, and connects through the USB.For ATxmega devices, the STK600 is supported in PDI mode.For ATtiny4/5/9/10 devices, the STK600 and AVRISP mkII are supported in TPI mode.

The simple serial programmer described in Atmel's application noteAVR910, and the bootloader described in Atmel's application noteAVR109 (which is also used by the AVR Butterfly evaluation board), aresupported on a serial port.

Atmel's JTAG ICE (mkI, mkII, and 3) is supported as well to up- or download memoryareas from/to an AVR target (no support for on-chip debugging).For the JTAG ICE mkII, JTAG, debugWire and ISP mode are supported, providedit has a firmware revision of at least 4.14 (decimal).JTAGICE3 also supports all of JTAG, debugWIRE, and ISP mode.See below for the limitations of debugWire.For ATxmega devices, the JTAG ICE mkII is supported in PDI mode, provided ithas a revision 1 hardware and firmware version of at least 5.37 (decimal).For ATxmega devices, the JTAGICE3 is supported in PDI mode.

Atmel-ICE (ARM/AVR) is supported in all modes (JTAG, PDI for Xmega, debugWIRE,ISP).

Atmel's XplainedPro boards, using the EDBG protocol (CMSIS-DAP compatible),are supported using the "jtag3" programmer type.

Atmel's XplainedMini boards, using the mEDBG protocol,are also supported using the "jtag3" programmer type.

The AVR Dragon is supported in all modes (ISP, JTAG, HVSP, PP, debugWire).When used in JTAG and debugWire mode, the AVR Dragon behaves similar to aJTAG ICE mkII, so all device-specific comments for that devicewill apply as well.When used in ISP mode, the AVR Dragon behaves similar to anAVRISP mkII (or JTAG ICE mkII in ISP mode), so all device-specificcomments will apply there.In particular, the Dragon starts out with a rather fast ISP clockfrequency, so the-B bitclockoption might be required to achieve a stable ISP communication.For ATxmega devices, the AVR Dragon is supported in PDI mode, provided ithas a firmware version of at least 6.11 (decimal).

The avrftdi, USBasp ISP and USBtinyISP adapters are also supported, providedavrdudehas been compiled with libusb support.USBasp ISP and USBtinyISP both feature simple firmware-only USB implementations, running on an ATmega8 (or ATmega88), or ATtiny2313, respectively. If libftdi has has been compiled in avrdude the avrftdi device adds support for many programmers using FTDI's 2232C/D/H and 4232H parts running in MPSSE mode, which hard-codes (in the chip) SCK to bit 1, MOSI to bit 2, and MISO to bit 3. Reset is usually bit 4.

The Atmel DFU bootloader is supported in both, FLIP protocol version 1(AT90USB* and ATmega*U* devices), as well as version 2 (Xmega devices).See below for some hints about FLIP version 1 protocol behaviour.

Input files can be provided, and output files can be written indifferent file formats, such as raw binary files containing the datato download to the chip, Intel hex format, or Motorola S-recordformat. There are a number of tools available to produce those files,likeasl(1)as a standalone assembler, oravr-objcopy1for the final stage of the GNU toolchain for the AVR microcontroller.

Providedlibelf(3)was present when compilingavrdude the input file can also be the final ELF file as produced by the linker.The appropriate ELF section(s) will be examined, according to the memoryarea to write to.

Avrdudecan program the EEPROM and flash ROM memory cells of supported AVRparts. Where supported by the serial instruction set, fuse bits andlock bits can be programmed as well. These are implemented withinas separate memory types and can be programmed using data from a file(see the-moption) or from terminal mode (see thedumpandwritecommands). It is also possible to read the chip (provided it has notbeen code-protected previously, of course) and store the data in afile. Finally, a ``terminal'' mode is available that allows one tointeractively communicate with the MCU, and to display or programindividual memory cells.On the STK500 and STK600 programmer, several operational parameters (target supplyvoltage, target Aref voltage, master clock) can be examined and changedfrom within terminal mode as well. 

Options

In order to control all the different operation modi, a number of optionsneed to be specified toavrdude

-p partno
This is the only option that is mandatory for every invocation ofavrdude It specifies the type of the MCU connected to the programmer. These are read from the config file.For currently supported MCU types use ? as partno, this will print a list of partno ids and official part names on the terminal. (Both can be used with the -p option.)

Following parts need special attention:

"AT90S1200"
The ISP programming protocol of the AT90S1200 differs in subtle waysfrom that of other AVRs. Thus, not all programmers support thisdevice. Known to work are all direct bitbang programmers, and allprogrammers talking the STK500v2 protocol.
"AT90S2343"
The AT90S2323 and ATtiny22 use the same algorithm.
"ATmega2560, ATmega2561"
Flash addressing above 128 KB is not supported by allprogramming hardware. Known to work are jtag2, stk500v2,and bit-bang programmers.
"ATtiny11"
The ATtiny11 can only beprogrammed in high-voltage serial mode.

-b baudrate
Override the RS-232 connection baud rate specified in the respectiveprogrammer's entry of the configuration file.
-B bitclock
Specify the bit clock period for the JTAG interface or the ISP clock (JTAG ICE only).The value is a floating-point number in microseconds.Alternatively, the value might be suffixed with "Hz", "kHz", or "MHz",in order to specify the bit clock frequency, rather than a period.The default value of the JTAG ICE results in about 1 microsecond bitclock period, suitable for target MCUs running at 4 MHz clock andabove.Unlike certain parameters in the STK500, the JTAG ICE resets all itsparameters to default values when the programming software signsoff from the ICE, so for MCUs running at lower clock speeds, thisparameter must be specified on the command-line.You can use the 'default_bitclock' keyword in your${HOME}/.avrdudercfile to assign a default value to keep from having to specify thisoption on every invocation.
-c programmer-id
Use the programmer specified by the argument. Programmers and their pinconfigurations are read from the config file (see the-Coption). New pin configurations can be easily added or modifiedthrough the use of a config file to makeavrdudework with different programmers as long as the programmer supports theAtmel AVR serial program method. You can use the 'default_programmer'keyword in your${HOME}/.avrdudercfile to assign a default programmer to keep from having to specifythis option on every invocation.A full list of all supported programmers is output to the terminal by using ? as programmer-id.
-C config-file
Use the specified config file to load configuration data. This filecontains all programmer and part definitions thatavrdudeknows about.See the config file, located at${PREFIX}/etc/avrdude.conf which contains a description of the format.

If config-fileis written as+filenamethen this file is read after the system wide and user configurationfiles. This can be used to add entries to the configurationwithout patching your system wide configuration file. It can be usedseveral times, the files are read in same order as given on the commandline.

-D
Disable auto erase for flash. When the-Uoption with flash memory is specified,will perform a chip erase before starting any of the programmingoperations, since it generally is a mistake to program the flashwithout performing an erase first. This option disables that.Auto erase is not used for ATxmega devices as these devices canuse page erase before writing each page so no explicit chip eraseis required.Note however that any page not affected by the current operationwill retain its previous contents.
-e
Causes a chip erase to be executed. This will reset the contents of theflash ROM and EEPROM to the value`0xff',and clear all lock bits.Except for ATxmega devices which can use page erase,it is basically a prerequisite command before the flash ROM can bereprogrammed again. The only exception would be if the newcontents would exclusively cause bits to be programmed from the value`1'to`0'Note that in order to reprogram EERPOM cells, no explicit prior chiperase is required since the MCU provides an auto-erase cycle in thatcase before programming the cell.
-E exitspec [, exitspec]
By default,leaves the parallel port in the same state at exit as it has beenfound at startup. This option modifies the state of the`/RESET'and`Vcc'lines the parallel port is left at, according to theexitspecarguments provided, as follows:

reset
The`/RESET'signal will be left activated at program exit, that is it will be heldlow in order to keep the MCU in reset state afterwards. Note in particularthat the programming algorithm for the AT90S1200 device mandates thatthe`/RESET'signal is activebeforepowering up the MCU, so in case an external power supply is used for thisMCU type, a previous invocation ofwith this option specified is one of the possible ways to guarantee thiscondition.
noreset
The`/RESET'line will be deactivated at program exit, thus allowing the MCU targetprogram to run while the programming hardware remains connected.
vcc
This option will leave those parallel port pins active(i. e. high)that can be used to supply`Vcc'power to the MCU.
novcc
This option will pull the`Vcc'pins of the parallel port down at program exit.
d_high
This option will leave the 8 data pins on the parallel port active.(i. e. high)
d_low
This option will leave the 8 data pins on the parallel port inactive.(i. e. low)

Multipleexitspecarguments can be separated with commas.

-F
Normally,tries to verify that the device signature read from the part isreasonable before continuing. Since it can happen from time to timethat a device has a broken (erased or overwritten) device signaturebut is otherwise operating normally, this options is provided tooverride the check.Also, for programmers like the Atmel STK500 and STK600 which canadjust parameters local to the programming tool (independent of anactual connection to a target controller), this option can be usedtogether with-tto continue in terminal mode.
-i delay
For bitbang-type programmers, delay for approximatelydelaymicroseconds between each bit state change.If the host system is very fast, or the target runs off a slow clock(like a 32 kHz crystal, or the 128 kHz internal RC oscillator), thiscan become necessary to satisfy the requirement that the ISP clockfrequency must not be higher than 1/4 of the CPU clock frequency.This is implemented as a spin-loop delay to allow even for veryshort delays.On Unix-style operating systems, the spin loop is initially calibratedagainst a system timer, so the number of microseconds might be ratherrealistic, assuming a constant system load whileis running.On Win32 operating systems, a preconfigured number of cycles permicrosecond is assumed that might be off a bit for very fast or veryslow machines.
-l logfile
Uselogfilerather thanstderrfor diagnostics output.Note that initial diagnostic messages (during option parsing) are stillwritten tostderranyway.
-n
No-write - disables actually writing data to the MCU (useful for debuggingavrdude).
-O
Perform a RC oscillator run-time calibration according to Atmelapplication note AVR053.This is only supported on the STK500v2, AVRISP mkII, and JTAG ICE mkIIhardware.Note that the result will be stored in the EEPROM cell at address 0.
-P port
Useportto identify the device to which the programmer is attached. Bydefault the/dev/ppi0port is used, but if the programmer type normally connects to theserial port, the/dev/cuaa0port is the default. If you need to use a different parallel orserial port, use this option to specify the alternate port name.

On Win32 operating systems, the parallel ports are referred to as lpt1through lpt3, referring to the addresses 0x378, 0x278, and 0x3BC,respectively. If the parallel port can be accessed through a differentaddress, this address can be specified directly, using the common Clanguage notation (i. e., hexadecimal values are prefixed by`0x').

For the JTAG ICE mkII and JTAGICE3, ifhas been configured with libusb support,portcan alternatively be specified asusb [: serialno] This will causeto search the programmer on USB.Ifserialnois also specified, it will be matched against the serial number readfrom any JTAG ICE mkII found on USB.The match is done after stripping any existing colons from the givenserial number, and right-to-left, so only the least significant bytesfrom the serial number need to be given.

As the AVRISP mkII device can only be talked to over USB, the verysame method of specifying the port is required there.

For the USB programmer "AVR-Doper" running in HID mode, the port mustbe specified asavrdoper.Libusb support is required on Unix but not on Windows. For moreinformation about AVR-Doper see http://www.obdev.at/avrusb/avrdoper.html.

For the USBtinyISP, which is a simplicistic device not implementingserial numbers, multiple devices can be distinguished by theirlocation in the USB hierarchy. See the the respectiveTroubleshootingentry in the detailed documentation for examples.

For programmers that attach to a serial port using some kind ofhigher level protocol (as opposed to bit-bang style programmers),portcan be specified asnet : host : port In this case, instead of trying to open a local device, a TCPnetwork connection to (TCP)portonhostis established.The remote endpoint is assumed to be a terminal or console serverthat connects the network stream to a local serial port where theactual programmer has been attached to.The port is assumed to be properly configured, for example using atransparent 8-bit data connection without parity at 115200 Baudfor a STK500.

-q
Disable (or quell) output of the progress bar while reading or writingto the device. Specify it a second time for even quieter operation.
-s
Disable safemode prompting. When safemode discovers that one or morefuse bits have unintentionally changed, it will prompt forconfirmation regarding whether or not it should attempt to recover thefuse bit(s). Specifying this flag disables the prompt and assumesthat the fuse bit(s) should be recovered without asking forconfirmation first.
-t
Tellsto enter the interactive ``terminal'' mode instead of up- or downloadingfiles. See below for a detailed description of the terminal mode.
-u
Disable the safemode fuse bit checks. Safemode is enabled by defaultand is intended to prevent unintentional fuse bit changes. Whenenabled, safemode will issue a warning if the any fuse bits are foundto be different at program exit than they were whenwas invoked. Safemode won't alter fuse bits itself, but rather willprompt for instructions, unless the terminal is non-interactive, inwhich case safemode is disabled. See the-soption to disable safemode prompting.

If one of the configuration files has a line

"default_safemode = no;"
safemode is disabled by default.The-uoption's effect is negated in that case, i. e. itenablessafemode.

Safemode is always disabled for AVR32, Xmega and TPI devices.

-U memtype : op : filename [: format]
Perform a memory operation as indicated. Thememtypefield specifies the memory type to operate on.The available memory types are device-dependent, the actualconfiguration can be viewed with thepartcommand in terminal mode.Typically, a device's memory configuration at least containsthe memory typesflashandeeprom All memory types currently known are:

calibration
One or more bytes of RC oscillator calibration data.
eeprom
The EEPROM of the device.
efuse
The extended fuse byte.
flash
The flash ROM of the device.
fuse
The fuse byte in devices that have only a single fuse byte.
hfuse
The high fuse byte.
lfuse
The low fuse byte.
lock
The lock byte.
signature
The three device signature bytes (device ID).
fuse N
The fuse bytes of ATxmega devices,Nis an integer numberfor each fuse supported by the device.
application
The application flash area of ATxmega devices.
apptable
The application table flash area of ATxmega devices.
boot
The boot flash area of ATxmega devices.
prodsig
The production signature (calibration) area of ATxmega devices.
usersig
The user signature area of ATxmega devices.

Theopfield specifies what operation to perform:

r
read device memory and write to the specified file
w
read data from the specified file and write to the device memory
v
read data from both the device and the specified file and perform a verify

Thefilenamefield indicates the name of the file to read or write.Theformatfield is optional and contains the format of the file to read orwrite.Formatcan be one of:

i
Intel Hex
s
Motorola S-record
r
raw binary; little-endian byte order, in the case of the flash ROM data
e
ELF (Executable and Linkable Format)
m
immediate; actual byte values specified on the command line, separatedby commas or spaces. This is good for programming fuse bytes withouthaving to create a single-byte file or enter terminal mode.
a
auto detect; valid for input only, and only if the input is notprovided atstdin
d
decimal; this and the following formats are only valid on output.They generate one line of output for the respective memory section,forming a comma-separated list of the values.This can be particularly useful for subsequent processing, like forfuse bit settings.
h
hexadecimal; each value will get the string0xprepended.
o
octal; each value will get a0prepended unless it is less than 8 in which case it gets no prefix.
b
binary; each value will get the string0bprepended.

The default is to use auto detection for input files, and raw binaryformat for output files.Note that iffilenamecontains a colon, theformatfield is no longer optional since the filename part following the colonwould otherwise be misinterpreted asformat

When reading any kind of flash memory area (including the various sub-areasin Xmega devices), the resulting output file will be truncated to not containtrailing 0xFF bytes which indicate unprogrammed (erased) memory.Thus, if the entire memory is unprogrammed, this will result in an outputfile that has no contents at all.

As an abbreviation, the form-U filenameis equivalent to specifying-U flash:w: filename :a This will only work iffilenamedoes not have a colon in it.

-v
Enable verbose output.More-voptions increase verbosity level.
-V
Disable automatic verify check when uploading data.
-x extended_param
Passextended_paramto the chosen programmer implementation as an extended parameter.The interpretation of the extended parameter depends on theprogrammer itself.See below for a list of programmers accepting extended parameters.

 

Terminal mode

In this mode,only initializes communication with the MCU, and then awaits usercommands on standard input. Commands and parameters may beabbreviated to the shortest unambiguous form. Terminal mode providesa command history usingreadline(3),so previously entered command lines can be recalled and edited. Thefollowing commands are currently implemented:

dump memtype addr nbytes
Readnbytesbytes from the specified memory area, and display them in the usualhexadecimal and ASCII form.
dump
Continue dumping the memory contents for anothernbyteswhere the previousdumpcommand left off.
write memtype addr byte1 ... byteN
Manually program the respective memory cells, starting at addressaddr using the valuesbyte1throughbyteN This feature is not implemented for bank-addressed memories such asthe flash memory of ATMega devices.
erase
Perform a chip erase.
send b1 b2 b3 b4
Send raw instruction codes to the AVR device. If you need access to afeature of an AVR part that is not directly supported by,this command allows you to use it, even thoughdoes not implement the command. When using direct SPI mode, up to 3 bytescan be omitted.
sig
Display the device signature bytes.
spi
Enter direct SPI mode. Thepgmledpin acts as slave select.Only supported on parallel bitbang programmers.
part
Display the current part settings and parameters. Includes chipspecific information including all memory types supported by thedevice, read/write timing, etc.
pgm
Return to programming mode (from direct SPI mode).
vtarg voltage
Set the target's supply voltage tovoltageVolts.Only supported on the STK500 and STK600 programmer.
varef [channel voltage]
Set the adjustable voltage source tovoltageVolts.This voltage is normally used to drive the target'sArefinput on the STK500.On the Atmel STK600, two reference voltages are available, whichcan be selected by the optionalchannelargument (either 0 or 1).Only supported on the STK500 and STK600 programmer.
fosc freq [M | k]
Set the master oscillator tofreqHz.An optional trailing letterMmultiplies by 1E6, a trailing letterkby 1E3.Only supported on the STK500 and STK600 programmer.
fosc off
Turn the master oscillator off.Only supported on the STK500 and STK600 programmer.
sck period
STK500 and STK600 programmer only:Set the SCK clock period toperiodmicroseconds.

JTAG ICE only:Set the JTAG ICE bit clock period toperiodmicroseconds.Note that unlike STK500 settings, this setting will be reverted toits default value (approximately 1 microsecond) when the programmingsoftware signs off from the JTAG ICE.This parameter can also be used on the JTAG ICE mkII, JTAGICE3, and Atmel-ICE to specify theISP clock period when operating the ICE in ISP mode.

parms
STK500 and STK600 programmer only:Display the current voltage and master oscillator parameters.

JTAG ICE only:Display the current target supply voltage and JTAG bit clock rate/period.

verbose [level]
Change (whenlevelis provided), or display the verbosity level.The initial verbosity level is controlled by the number of-voptions given on the commandline.
?
help
Give a short on-line summary of the available commands.
quit
Leave terminal mode and thusavrdude

 

Default Parallel port pin connections

(these can be changed, see the-coption)
Pin numberFunction
2-5Vcc (optional power supply to MCU)
7/RESET (to MCU)
8SCK (to MCU)
9MOSI (to MCU)
10MISO (from MCU)
18-25GND
 

debugWire limitations

The debugWire protocol is Atmel's proprietary one-wire (plus ground)protocol to allow an in-circuit emulation of the smaller AVR devices,using the`/RESET'line.DebugWire mode is initiated by activating the`DWEN'fuse, and then power-cycling the target.While this mode is mainly intended for debugging/emulation, italso offers limited programming capabilities.Effectively, the only memory areas that can be read or programmedin this mode are flash ROM and EEPROM.It is also possible to read out the signature.All other memory areas cannot be accessed.There is nochip erasefunctionality in debugWire mode; instead, while reprogramming theflash ROM, each flash ROM page is erased right before updating it.This is done transparently by the JTAG ICE mkII (or AVR Dragon).The only way back from debugWire mode is to initiate a specialsequence of commands to the JTAG ICE mkII (or AVR Dragon), so thedebugWire mode will be temporarily disabled, and the target canbe accessed using normal ISP programming.This sequence is automatically initiated by using the JTAG ICE mkIIor AVR Dragon in ISP mode, when they detect that ISP mode cannot beentered. 

FLIP version 1 idiosyncrasies

Bootloaders using the FLIP protocol version 1 experience some veryspecific behaviour.

These bootloaders have no option to access memory areas other thanFlash and EEPROM.

When the bootloader is started, it enters asecurity modewhere the only acceptable access is to query the device configurationparameters (which are used for the signature on AVR devices).The only way to leave this mode is achip erase As a chip erase is normally implied by the-Uoption when reprogramming the flash, this peculiarity might not bevery obvious immediately.

Sometimes, a bootloader with security mode already disabled seems tono longer respond with sensible configuration data, but only 0xFF forall queries.As these queries are used to obtain the equivalent of a signature,can only continue in that situation by forcing the signature checkto be overridden with the-Foption.

Achip erasemight leave the EEPROM unerased, at least on someversions of the bootloader. 

Programmers accepting extended parameters

JTAG ICE mkII
JTAGICE3
Atmel-ICE
AVR Dragon
When using the JTAG ICE mkII, JTAGICE3, Atmel-ICE or AVR Dragon in JTAG mode, thefollowing extended parameter is accepted:

jtagchain=UB,UA,BB,BA
Setup the JTAG scan chain forUBunits before,UAunits after,BBbits before, andBAbits after the target AVR, respectively.Each AVR unit within the chain shifts by 4 bits.Other JTAG units might require a different bit shift count.

AVR910

devcode=VALUE
Override the device code selection by usingVALUEas the device code.The programmer is not queried for the list of supporteddevice codes, and the specifiedVALUEis not verified but used directly within the`T'command sent to the programmer.VALUEcan be specified using the conventional number notation of theC programming language.

no_blockmode
Disables the default checking for block transfer capability.Use no_blockmodeonly if yourAVR910programmer creates errors during initial sequence.

buspirate

reset={cs,aux,aux2}
The default setup assumes the BusPirate's CS output pin connected to the RESET pin on AVR side. It is however possible to have multiple AVRsconnected to the same BP with MISO, MOSI and SCK lines common for all of them.In such a case one AVR should have its RESET connected to BusPirate'sCSpin, second AVR's RESET connected to BusPirate'sAUXpin and if your BusPirate has anAUX2pin (only available on BusPirate version v1a with firmware 3.0 or newer)use that to activate RESET on the third AVR.

It may be a good idea to decouple the BusPirate and the AVR's SPI buses from each other using a 3-state bus buffer. For example 74HC125 or 74HC244 are somegood candidates with the latches driven by the appropriate reset pin (cs, aux or aux2). Otherwise the SPI traffic in one active circuit may interferewith programming the AVR in the other design.

spifreq=<0..7>
The SPI speed for the Bus Pirate's binary SPI mode:
0 ..  30 kHz   (default)1 .. 125 kHz2 .. 250 kHz3 ..   1 MHz4 ..   2 MHz5 ..   2.6 MHz6 ..   4 MHz7 ..   8 MHz
rawfreq=<0..3>
Sets the SPI speed and uses the Bus Pirate's binary "raw-wire" mode:
0 ..   5 kHz1 ..  50 kHz2 .. 100 kHz   (Firmware v4.2+ only)3 .. 400 kHz   (v4.2+)

The only advantage of the "raw-wire" mode is the different SPI frequenciesavailable. Paged writing is not implemented in this mode.

ascii
Attempt to use ASCII mode even when the firmware supports BinMode (binarymode). BinMode is supported in firmware 2.7 and newer, older FW's either don'thave BinMode or their BinMode is buggy. ASCII mode is slower and makes the abovereset= , spifreq=and rawfreq=parameters unavailable. Be aware that ASCII mode is not guaranteed to workwith newer firmware versions, and is retained only to maintain compatibilitywith older firmware versions.
nopagedwrite
Firmware versions 5.10 and newer support a binary mode SPI command that enableswhole pages to be written to AVR flash memory at once, resulting in asignificant write speed increase. If use of this mode is not desirable for somereason, this option disables it.
nopagedread
Newer firmware versions support in binary mode SPI command some AVR Extended Commands. Using the "Bulk Memory Read from Flash" results in asignificant read speed increase. If use of this mode is not desirable for somereason, this option disables it.
cpufreq=<125..4000>
This sets the AUX pin to output a frequency of nkHz. Connectingthe AUX pin to the XTAL1 pin of your MCU, you can provide it a clock, for example when it needs an external clock because of wrong fuses settings.Make sure the CPU frequency is at least four times the SPI frequency.
serial_recv_timeout=<1...>
This sets the serial receive timeout to the given value. The timeout happens every time avrdude waits for the BusPirate prompt. Especially in ascii mode this happens very often, so setting a smaller value can speed up programming a lot. The default value is 100ms. Using 10ms might work in most cases.

Wiring
When using the Wiring programmer type, thefollowing optional extended parameter is accepted:

snooze=<0..32767>
After performing the port open phase, AVRDUDE will wait/snooze forsnoozemilliseconds before continuing to the protocol sync phase.No toggling of DTR/RTS is performed ifsnoozeis greater than 0.

PICkit2
Connection to the PICkit2 programmer:
(AVR)    (PICkit2)RST  -   VPP/MCLR (1) VDD  -   VDD Target (2) -- possibly optional if AVR self powered GND  -   GND (3) MISO -   PGD (4) SCLK -   PDC (5) MOSI -   AUX (6) 
Extended commandline parameters:

clockrate=<rate>
Sets the SPI clocking rate in Hz (default is 100kHz). Alternately the -B or -i options can be used to set the period.
timeout=<usb-transaction-timeout>
Sets the timeout for USB reads and writes in milliseconds (default is 1500 ms).

 

FILES

/dev/ppi0
default device to be used for communication with the programminghardware
${PREFIX}/etc/avrdude.conf
programmer and parts configuration file
${HOME}/.avrduderc
programmer and parts configuration file (per-user overrides)
~/.inputrc
Initialization file for thereadline(3)library
${PREFIX}/share/doc/avrdude/avrdude.pdf
Schematic of programming hardware

 

DIAGNOSTICS

avrdude: jtagmkII_setparm(): bad response to set parameter command: RSP_FAILEDavrdude: jtagmkII_getsync(): ISP activation failed, trying debugWireavrdude: Target prepared for ISP, signed off.avrdude: Please restart avrdude without power-cycling the target.

If the target AVR has been set up for debugWire mode (i. e. theDWENfuse is programmed), normal ISP connection attempts will fail asthe/RESETpin is not available.When using the JTAG ICE mkII in ISP mode, the message shown indicatesthathas guessed this condition, and tried to initiate a debugWire resetto the target.When successful, this will leave the target AVR in a state where itcan respond to normal ISP communication again (until the next powercycle).Typically, the same command is going to be retried again immediatelyafterwards, and will then succeed connecting to the target usingnormal ISP communication. 

SEE ALSO

avr-objcopy1,ppi(4),libelf(3),readline(3)

The AVR microcontroller product description can be found at

"http://www.atmel.com/products/AVR/"
 

AUTHORS

Avrdudewas written by Brian S. Dean <bsdAATTbsdhome.com>.

This man page byJoerg Wunsch. 

BUGS

Please report bugs via
"http://savannah.nongnu.org/bugs/?group=avrdude"

The JTAG ICE programmers currently cannot write to the flash ROMone byte at a time.For that reason, updating the flash ROM from terminal mode does notwork.

Page-mode programming the EEPROM through JTAG (i.e. through an-Uoption) requires a prior chip erase.This is an inherent feature of the way JTAG EEPROM programming works.This also applies to the STK500 and STK600 in parallel programming mode.

The USBasp and USBtinyISP drivers do not offer any option to distinguish multipledevices connected simultaneously, so effectively only a single deviceis supported.

The avrftdi driver allows one to select specific devices using any combination of vid,pidserial number (usbsn) vendor description (usbvendoror part description (usbproduct)as seen with lsusb or whatever tool used to view USB device information. Multiple devices can be on the bus at the same time. For the H parts, which have multiple MPSSEinterfaces, the interface can also be selected. It defaults to interface 'A'.


 

Index

NAME
SYNOPSIS
DESCRIPTION
Options
Terminal mode
Default Parallel port pin connections
debugWire limitations
FLIP version 1 idiosyncrasies
Programmers accepting extended parameters
FILES
DIAGNOSTICS
SEE ALSO
AUTHORS
BUGS

This document was created byman2html,using the manual pages.