8.5.1. Setting memory

To set memory contents:

  1. Connect to your target and load an image, for example 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, Proc_4();.

  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.

    Start addresses can be set using in-place editing or using the context menu.

  7. Right-click in the first address in the window to display the context menu.

  8. Select Set New Start Address... and enter 0x000088A0 as the new start address.

  9. Highlight the first byte at this address, that is 0xBF.

  10. Right-click and select Set Memory Interactive... from the context menu to display the Interactive Memory Setting dialog box, shown in Figure 8.3.

    Figure 8.3. Interactive Memory Setting dialog box

    Interactive Memory Setting dialog box
  11. Enter the required memory settings:

    Type:

    Select the display format. See Formatting options for details of the memory formats.

    Addr:

    The address where the memory setting starts. Depending on the method used to display this dialog box, this field is already populated, as in this example.

    The address must be entered in hexadecimal format, for example 0x000088A0.

    Value:

    This read-only data field shows the current value, in hexadecimal and decimal formats, at the specified memory location.

    Enter New Value:

    Enter the value to be set at the current location, for example 0x08 or 8 (decimal).

    If the Memory pane is configured to update automatically, clicking Set immediately updates the memory contents. This is the default setting in the Pane menu.

    If you press Enter with no value in the Value data field, RealView Debugger moves automatically to the next, or previous, location.

    Next Addr

    Moves the target address to the next location by adding 1 to the address displayed in the Addr data field. This depends on the size of the current type.

    Prev Addr

    Moves the target address to a new location by subtracting 1 from the address displayed in the Addr data field. This depends on the size of the current type.

    Clear New

    Automatically clears any value entered in the Enter New Value data field ready to accept another value. By default, this feature is enabled.

    Auto Inc Addr

    If selected, this radio button instructs RealView Debugger to increment the target address automatically ready to accept a new setting.

    Auto Dec Addr

    If selected, this radio button instructs RealView Debugger to decrement the target address automatically ready to accept a new setting.

    Log:

    Displays a log of the changes you have made. This log is shown when you next display the dialog box.

  12. Click Close to close the Interactive Memory Setting dialog box.

Changed values are displayed in the Memory pane in the usual way. That is, updated values are displayed in dark blue or light blue, depending on when they last changed.

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