8.5.3. Downloading memory to a file

To download a memory range into a file:

  1. Select File → Reload Image to Target to reload the image dhrystone.axf.

  2. Click on the Src tab to view the source file dhry_1.c.

  3. Set a simple breakpoint by double-clicking on line 150.

  4. Click Go to start execution.

  5. Enter 5000 when asked for the number of runs.

    The program starts and then stops when execution reaches the breakpoint at line 150. The red box marks the location of the PC when execution stops.

  6. Select View → Pane Views → Memory to display the Memory pane.

  7. Select Debug → Memory/Register Operations → Upload/Download Memory file... from the Code window main menu to display the Upload/Download file from/to Memory dialog box, shown in Figure 8.4.

    Figure 8.4. Upload/Download file from/to Memory dialog box

    Upload/Download file from/to Memory dialog box
  8. Set up the required memory settings:

    Load File into Memory

    Select to load a file to memory. This enables RealView Debugger to access the specified file, read the contents, and write them to the given memory location.

    Save Memory into File

    Select to save memory to a file. This enables RealView Debugger to access the specified memory block, read the contents, and write them to the given file.

    Verify Memory and File

    Select to compare the contents of a memory block with a specified file. The results of the comparison are reported in the Cmd tab in the Output pane.


    Enter here the full pathname of the file to use to read/write memory values.

    Type of File:

    Enter the data type to be used in the specified file where:

    • OBJ specifies an object file in the standard executable target format, for example ARM-ELF for ARM architecture-based targets

    • raw specifies a data file as a stream of 8-bit values

    • ascii specifies a space-separated file of hexadecimal values.


    Define the start location of the memory block.

    When writing memory, specify a range as an address range or as a start address and length, for example:

    0x88A0 ..0x8980

    0x88A0 ..+0x14

    If required, use the drop-down arrow to select a previously used location from the stored list.


    If you are reading from a file to memory, you must specify a start location. The range can be left blank where the data type is not binary.

    If you are writing to a file from memory, you must specify a start location and a range.


    Click this button to create and write the specified file, if this is a new file, or to open and read the contents of a file to the specified memory location(s).


    Click this button to close the Upload/Download file to/from Memory dialog box.


If you are writing memory to a file and the specified file already exists, RealView Debugger warns of this and asks for confirmation before overwriting the file contents.

RealView Debugger warns you if the memory transfer is going to take a long time to complete. When reading or writing memory contents, you must be aware that:

Copyright © 2003, 2004 ARM Limited. All rights reserved.ARM DUI 0234B