The commands dump, append, and restore are used
for copying data between target memory and a file. Data is written
into a file using dump or append, and restored from a
file into memory by using restore. Files may be binary, srec,
intel hex, or tekhex (but only binary files can be appended).
dump binary memory filename start_addr end_addrappend binary memory filename start_addr end_addrdump binary value filename expressionappend binary memory filename expressiondump ihex memory filename start_addr end_addrdump ihex value filename expressiondump srec memory filename start_addr end_addrdump srec value filename expressiondump tekhex memory filename start_addr end_addrdump tekhex value filename expressionrestore filename [binary] bias start endrestore
command can automatically recognize any known bfd file format, except for
raw binary. To restore a raw binary file you must use the optional argument
binary after the filename.
If bias is non-zero, its value will be added to the addresses contained in the file. Binary files always start at address zero, so they will be restored at address bias. Other bfd files have a built-in location; they will be restored at offset bias from that location.
If start and/or end are non-zero, then only data between file offset start and file offset end will be restored. These offsets are relative to the addresses in the file, before the bias argument is applied.