5.1 Test Files dry:...
A filename in the form
dry:[part]_[memlist]{_feature}[.hex] signifies
a virtual, read-only test file. The optional part name must be first, and
if so, it must coincide with the chosen ‘-p’ part. The
autogenerated test files are multimemory files containing, by default, all
writable memories and the signature memory. The optional
memlist must be in second position, if part was given, or
otherwise in first position. The memory list has the same syntax and
semantics as one specified for the ‘-U’ memory operation option,
see memory list.
The underscore-separated feature list, eg, dry:random=1_holes
determines the test file contents. The following table lists possible
features:
init | Initialise memories with human-readable patterns |
init=n | Shortcut for init_seed=n |
random | Initialise memories with random code/values |
random=n | Shortcut for random_seed=n |
holes | Put holes into the code of flash, eeprom, userrow and bootrow |
seed=n | Seed random number generator with n > 0, default time(NULL) |
save=myfile.hex | Save test file with chosen name |
save | Save test contents to file with canonical file name |
help | Show this help message and return |
Notes. Init and random randomly configure flash wrt
code, data and boot sections, which also changes the corresponding fuse
settings in the multimemory test file. Generated Flash code will be
benign, ie, its opcodes will not acceess I/O, SRAM or flash. Choose, eg,
seed=1 for reproducible flash configuration and output. The default
memlist comprises of all writeable memories and signature.
Test files, if saved on the file system, are per default written as Intel
Hex format with comments. It is possible to write them as Motorola
S-Record files using, eg, save=myfile.srec:s. A save=
filename of - writes the autogenerated file to stdout.
Essentially, the contents of the test files are the same as if generated
by the ‘-c dryrun’ programmer with corresponding ‘-x’
parameters. For details, see dryrun.
The following example writes a non-trivial random test file to the flash
of an ATtiny13A:
| |
$ avrdude -cdryrun -pt13a -U dry:random=1_holes
Reading 317 bytes for flash from input file dry:random=1_holes
Writing 317 bytes to flash
Writing | ################################################## | 100% 0.00 s
Reading | ################################################## | 100% 0.00 s
317 bytes of flash verified
Avrdude done. Thank you.
|
|
Although the dry:random=1_holes test file contains all writable
memories, only flash is written in above example as this is the default
for simple ‘-U’ programming. The contents of the test file can be
written to stdout with the save=- feature as the following
example shows, while programming a multi-memory file with only eeprom
does nothing:
| |
$ avrdude -qq -cdryrun -pt13a -U sig:w:dry:random=1_holes_save=- | cut -c1-85
:02000004008179
:170008004020202040204020402020404020204020404020402040A1 // 810008
:02000004008179
:04002200402020401A // 810022
:02000004008179
:0B002E004040202040204020402020C7 // 81002e
:020000040000FA
:2000BF00404C717E51511B486B84633A4194E4313A9016323E576FEEEA9BF4BC4625360849 // 000bf>
:2000DF0042E95B5E2C606FD06C857EFAF5D80935376671824A65F270285A728A2829134417 // 000df>
:0100FF007090 // 000ff>
:020000040000FA
:01017F00403F // 0017f>
:020000040000FA
:01024000407D // 00240>
:020000040000FA
:2002FD00CFFFCFF241FB1E46E1C2625408F8271B23E8E98D43760F5A2563729A0766FB3246 // 002fd>
:20031D005D0D5058E4A3302561E95AC6E09B765424821D74F821F587F0701AE1F867230179 // 0031d>
:20033D005F972ADC4A96775C582A4EEC42B07CFB06181BDB7F02F91A48FE78FB40FA26D13A // 0033d>
:20035D00EDE63F05F07565D80FBE15F9E9BB26993C9540B157EB35F1E4B350057EEF5DF7B2 // 0035d>
:20037D000BA1EAE50A0B70CB4AD07F48316447BD961F12235D1E3F1C477BEEC5FD142B7337 // 0037d>
:20039D007B5A3E4B23632F64EE24069E700911DC59AAE0D45BF2111B5E10213B70337ECDC5 // 0039d>
:2003BD00E7E30E5C01BB4F6F011901BA249B577D300B37E11E1C01F85A2970F818A4341396 // 003bd>
:1703DD0077B555CA2A4EE7981232F6E0E84D5C3DEA341ABC5D86CF39 // 003dd>
:020000040000FA
:0303FD00CFFFCF60 // 003fd>
:02000004008278
:010000006A95 // 820000
:02000004008278
:01000100FFFF // 820001
:02000004008377
:01000000FF00 // 830000
:02000004008476
:030000001E900748 // 840000
:00000001FF
$ avrdude -cdryrun -pt13a -U dry:eeprom_random=1
Avrdude done. Thank you.
|
|
As expected, the ‘-U all:w:’file writes the writable memories from
the multi-memory file:
| |
$ avrdude -q -cdryrun -pt13a -U all:w:dry:random=1_holes
Reading 361 bytes for multiple memories from input file dry:random=1_holes
Writing 38 bytes to eeprom, 38 bytes written, 38 verified
Writing 317 bytes to flash, 317 bytes written, 317 verified
Writing 1 byte (0x6A) to lfuse, 1 byte written, 1 verified
Writing 1 byte (0xFF) to hfuse, 1 byte written, 1 verified
Writing 1 byte (0xFF) to lock, 1 byte written, 1 verified
Avrdude done. Thank you.
|
|
This document was generated on September 11, 2026 using texi2html 1.82.