There are multiple ways how to dump the device memory to a file. This is very useful to inspect content offline, to compare dumps or as well to later restore the dumps on the device. You can save the device memory to a file by:
- Using Memory view
- Using Target Task
- Using Debugger Shell
To export memory using Memory view:
- Click the Export button from the Memory view toolbar.
The Export Memory dialog box appears.
Figure 1.
Exporting Memory using Memory View

- Select SRecord from the Format drop-down list.
- Specify the start address, end address and the s19 file where you want the memory to be saved in the Start address, End address and the File name textboxes respectively.
- Click OK.
The memory is saved in the specified file.
You can import the memory again for later use by using Import button.
To export memory using Target Task view:
- Open the Target Task view.
- Click the green plus button from the Target Task view toolbar.
The Create New Target Task dialog box appears.
- Specify a name in the Task Name textbox, and select Import/Export/Fill Memory from the Task Type drop-down list.
Figure 2.
Target Task View - Create New Target Task Dialog Box

- Click Finish.
The newly created target task appears in the view stack.
Figure 3.
Newly Created Target Task

- Specify the following details in the newly created target task:
- Select Export memory in the Action Type Group.
- Select Memory space and address option and specify the start address in the Memory Access group.
- Specify the file where you want to dump the memory in the Select file textbox, and select Motorola S-Record from the File Type drop-down list in the Input / Output group.
- Specify the desired number of elements in the Number of elements textbox.
- Press Ctrl+S to save the settings.
- Click the Export button from the Target Task view toolbar.
Figure 4.
Executing the Target Task to Save the Memory

The device memory is saved to the file specified. You can import the saved memory format later again by using the Import memory feature from the Action type group.
To export memory using Debugger Shell view:
You can use save command to dump the device memory to a file for later use. The following image shows the help for save command:
Figure 5.
Debugger Shell - save Command

For example:
save -h 0x0..0x8000 c:\\tmp\\myDump.txt -o
The -h option specifies the Hex Format.
You can import the saved memory easily with the restore command.