8.5.2. Setting registers

To set register contents:

  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 → Registers to display the Register pane.

  7. Select Debug → Memory/Register Operations → Set Register... from the Code window main menu to display the Interactive Register Setting dialog box.

    This dialog contains almost the same controls as the Interactive Memory Setting dialog box described in Setting memory.

  8. Set up the required register settings:


    Enter the register to change, for example @R4. Press Enter to confirm your choice.

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


    This read-only data field shows the current value, in hexadecimal and decimal formats, for the specified register.

    Enter New Value:

    Enter the value to be set, in hex or decimal, for example 0xCC4.

    All changed registers are displayed in blue.

  9. Click Close to close the Interactive Register Setting dialog box.

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