B.1.2. How do I set top_of_memory?

In RealView Debugger, top_of_memory is used to set the application stack base for a semihosted application running on a remote target.

If top_of_memory is not set, RealView Debugger sets it to a default value of 0x80000. A warning is displayed in the Cmd and Log tabs:

No stack/heap or top of memory defined - using defaults.

The value of top_of_memory can be overridden for a single debug session from the Debug or CycleCount tab in the Register pane (see Where do I find Debugger Internal variables?).

The value of top_of_memory can also be set for a particular target connection using the Connection Properties window:

  1. Ensure that you disconnect from the target before making these changes.

  2. Select Target ? Connect to Target... to open the Connection Control window.

  3. Right-click on the connection, for example RealView-ICE or Multi-ICE, and select Connection Properties... from the context menu.

    The appropriate branch in the Connection Properties window opens automatically.

  4. Expand the following entries in turn:

    • CONNECTION= (for the connection you are configuring)

    • Advanced_Information

    • Default

  5. Click ARM_config in the left pane.

  6. Right-click on the Top_memory entry in the right pane, select Edit Value... from the context menu.

  7. Specify the top of memory address, for example 0x2000000, and press Enter.

  8. Select File ? Save and Close.

Note

To use the new setting, you must now connect to the target.

If a Board/Chip definition file is selected for this connection, then this file might contain a value for top_of_memory that overrides the target connection setting.

Copyright © 2002-2005 ARM Limited. All rights reserved.ARM DUI 0181G
Non-Confidential