[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

3.1 Terminal Mode Commands

The following commands are implemented for all programmers:

dump memtype addr nbytes

Read nbytes from the specified memory area, and display them in the usual hexadecimal and ASCII form.

dump memtype addr

Start reading from addr, all the way to the last memory address.

dump memtype addr

Read 256 bytes from the specified memory area, and display them.

dump memtype

Read all bytes from the specified memory, and display them.

dump memtype

Continue dumping the memory contents for another nbytes where the previous dump command left off.

read

Can be used as an alias for dump.

write memtype addr data[,] {data[,]}

Manually program the respective memory cells, starting at address addr, using the data items provided. The terminal implements reading from and writing to flash and EEPROM type memories normally through a cache and paged access functions. All other memories are directly written to without use of a cache. Some older parts without paged access will also have flash and EEPROM directly accessed without cache.

Items data can have the following formats:

TypeExampleSize (bytes)
String"Hello, world\n"varying
Character'A'1
Decimal integer123451, 2, 4, or 8
Octal integer0123451, 2, 4, or 8
Hexadecimal integer0x123451, 2, 4, or 8
Float3.14159264
Double3.141592653589793D8

data can be hexadecimal, octal or decimal integers, floating point numbers or C-style strings and characters. For integers, an optional case-insensitive suffix specifies the data size as in the table below:

LL

8 bytes / 64 bits

L

4 bytes / 32 bits

H or S

2 bytes / 16 bits

HH

1 byte / 8 bits

Suffix D indicates a 64-bit double, F a 32-bit float, whilst a floating point number without suffix defaults to 32-bit float. Hexadecimal floating point notation is supported. An ambiguous trailing suffix, e.g., 0x1.8D, is read as no-suffix float where D is part of the mantissa; use a zero exponent 0x1.8p0D to clarify.

An optional U suffix makes integers unsigned. Ordinary 0x hex integers are always treated as unsigned. +0x or -0x hex numbers are treated as signed unless they have a U suffix. Unsigned integers cannot be larger than 2^64-1. If n is an unsigned integer then -n is also a valid unsigned integer as in C. Signed integers must fall into the [-2^63, 2^63-1] range or a correspondingly smaller range when a suffix specifies a smaller type.

Ordinary 0x hex integers with n hex digits (counting leading zeros) use the smallest size of one, two, four and eight bytes that can accommodate any n-digit hex integer. If an integer suffix specifies a size explicitly the corresponding number of least significant bytes are written, and a warning shown if the number does not fit into the desired representation. Otherwise, unsigned integers occupy the smallest of one, two, four or eight bytes needed. Signed numbers are allowed to fit into the smallest signed or smallest unsigned representation: For example, 255 is stored as one byte as 255U would fit in one byte, though as a signed number it would not fit into a one-byte interval [-128, 127]. The number -1 is stored in one byte whilst -1U needs eight bytes as it is the same as 0xFFFFffffFFFFffffU.

One trailing comma at the end of data items is ignored to facilitate copy and paste of lists.

write memtype addr length data[,] {data[,]} …

The ellipses form … of write is similar to above, but length byte of the memory are written. For that purpose, after writing the initial items, the last data item is replicated as many times as needed.

flush

Synchronise with the device all pending cached writes to EEPROM or flash. With some programmer and part combinations, flash (and sometimes EEPROM, too) looks like a NOR memory, ie, one can only write 0 bits, not 1 bits. When this is detected, either page erase is deployed (e.g., with parts that have PDI/UPDI interfaces), or if that is not available, both EEPROM and flash caches are fully read in, a chip erase command is issued and both EEPROM and flash are written back to the device. Hence, it can take minutes to ensure that a single previously cleared bit is set and, therefore, this command should be used sparingly.

abort

Normally, caches are only ever actually written to the device when using flush, at the end of the terminal session after typing quit, or after EOF on input is encountered. The abort command resets the cache discarding all previous writes to the flash and EEPROM cache.

erase

Perform a chip erase and discard all pending writes to EEPROM and flash.

sig

Display the device signature bytes.

part

Display the current part settings and parameters. Includes chip specific information including all memory types supported by the device, read/write timing, etc.

verbose [level]

Change (when level is provided), or display the verbosity level. The initial verbosity level is controlled by the number of -v options given on the command line.

quell [level]

Change (when level is provided), or display the quell level. 1 is used to suppress progress reports. 2 or higher yields progressively quieter operations. The initial quell level is controlled by the number of -q options given on the command line.

?
help

Give a short on-line summary of the available commands.

quit

Leave terminal mode and thus AVRDUDE.

In addition, the following commands are supported on some programmers:

pgerase memory addr

Erase one page of the memory specified.

send b1 b2 b3 b4

Send raw instruction codes to the AVR device. If you need access to a feature of an AVR part that is not directly supported by AVRDUDE, this command allows you to use it, even though AVRDUDE does not implement the command. When using direct SPI mode, up to 3 bytes can be omitted.

spi

Enter direct SPI mode. The pgmled pin acts as chip select. Only supported on parallel bitbang programmers, and partially by USBtiny. Chip Select must be externally held low for direct SPI when using USBtinyISP, and send must be a multiple of four bytes.

pgm

Return to programming mode (from direct SPI mode).

vtarg voltage

Set the target’s supply voltage to voltage Volts.

varef [channel] voltage

Set the adjustable voltage source to voltage Volts. This voltage is normally used to drive the target’s Aref input on the STK500 and STK600. The STK600 offers two reference voltages, which can be selected by the optional parameter channel (either 0 or 1).

fosc freq[M|k]

Set the programming oscillator to freq Hz. An optional trailing letter M multiplies by 1E6, a trailing letter k by 1E3.

fosc off

Turn the programming oscillator off.

sck period

STK500 and STK600 only: Set the SCK clock period to period microseconds. JTAG ICE only: Set the JTAG ICE bit clock period to period microseconds. Note that unlike STK500 settings, this setting will be reverted to its default value (approximately 1 microsecond) when the programming software signs off from the JTAG ICE. This parameter can also be used on the JTAG ICE mkII/3 to specify the ISP clock period when operating the ICE in ISP mode.

parms

STK500 and STK600 only: Display the current voltage and programming oscillator parameters. JTAG ICE only: Display the current target supply voltage and JTAG bit clock rate/period.


[ < ] [ > ]   [ << ] [ Up ] [ >> ]         [Top] [Contents] [Index] [ ? ]

This document was generated on March 11, 2023 using texi2html 1.82.