-U memtype:op:filename[:format] Perform a memory operation. Multiple ‘-U’ options can be specified in order to operate on multiple memories on the same command-line invocation. The memtype field specifies the memory type to operate on. Use the ‘-v’ option on the command line or the part command from terminal mode to display all the memory types supported by a particular device. Typically, a device’s memory configuration at least contains the memory types flash and eeprom. 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).
fuseN The fuse bytes of ATxmega devices, N is an integer number for 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.
The op field specifies what operation to perform:
r read the specified device memory and write to the specified file
w read the specified file and write it to the specified device memory
v read the specified device memory and the specified file and perform a verify operation
The filename field indicates the name of the file to read or write. The format field is optional and contains the format of the file to read or write. Possible values are:
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), the final output file from the linker; currently only accepted as an input file
m immediate mode; actual byte values specified on the command line, separated by commas or spaces in place of the filename field of the ‘-U’ option. This is useful for programming fuse bytes without having to create a single-byte file or enter terminal mode. If the number specified begins with 0x, it is treated as a hex value. If the number otherwise begins with a leading zero (0) it is treated as octal. Otherwise, the value is treated as decimal.
a auto detect; valid for input only, and only if the input is not provided at stdin.
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 for fuse bit settings.
h hexadecimal; each value will get the string 0x prepended.
o octal; each value will get a 0 prepended unless it is less than 8 in which case it gets no prefix.
b binary; each value will get the string 0b prepended.
The default is to use auto detection for input files, and raw binary format for output files.
Note that if filename contains a colon, the format field is no longer optional since the filename part following the colon would otherwise be misinterpreted as format.
As an abbreviation, the form -U filename is equivalent to specifying -U flash:w:filename:a. This will only work if filename does not have a colon in it. |