ARM Technical Support Knowledge Articles

How do I control memory access size when using RVD / RVI?

Applies to: RealView Development Suite (RVDS), RealView ICE and Trace (RVI / RVT)

Answer

By default, RealView Debugger and RealView ICE will use word (4 byte) size memory accesses. This may cause problems when attempting to view or modify areas of your memory map which only support sub-word accesses, for example peripheral registers.

It is possible to force an explicit access size in RVD by using a memory map to describe the access sizes that should be used for different regions of your memory.

Note that the RVD memory pane Size option only affects the display size, and will not influence the way that the debug tools access physical memory.

Setting a Memory Map Manually
Manually setting a memory map is a simple way to control the access size for a block of memory.

Example:
If there is a peripheral at 0x10000000 that has a block of 0x1000 bytes of half-word size registers that are read-only:

  • In the Process Control pane, select the Map tab
  • Right-click within the white space in the pane and select Toggle Memory Mapping to enable memory mapping.
  • Right-click in the white space in the pane, and select Reset Map (Delete All)
  • Right-click in the white space in the pane, and select Add or Copy Map Entry
  • Set Start Addr to 0x10000000
  • Set Size to 0x1000
  • Set Access to ROM
  • Set Access Size to 2 byte (forcing RVI to perform 16-bit accesses to this area of memory)
  • Set Description to Peripheral RO Registers
  • Click OK


Add/Copy/Edit Memory Map dialog

RVD will then automatically split the Auto region that spanned the entire memory range into 2 chunks, split by the 4KB region defined above:

Map tab regions

Note that the CLI commands for the operations above will be echoed in the RVD Output pane Cmd tab:

RVD Cmb Tab

These can be used to create a script that can be executed automatically on connection to a target. See the FAQ: RVD Scripting & Automation for more information on scripting with RVD.

See RVD User Guide Chapter Mapping Target Memory for additional information on memory maps.

Setting a Memory Map using a BCD File
Explicit access size settings for different Memory Blocks can also be specified in a Board Chip Definition (BCD) file.

To set the access size for a region, add Attributes.access_size=<num_bytes>, where num_bytes is the access size in bytes - 1, 2, 4 or 8.

For information on writing BCD files, see the FAQ: How do I create a custom BCD file for my hardware? .

Attachments: img16940.jpg , img16942.jpg , img16941.jpg

Article last edited on: 2011-08-16 15:44:45

Rate this article

[Bad]
|
|
[Good]
Disagree? Move your mouse over the bar and click

Did you find this article helpful? Yes No

How can we improve this article?

Link to this article
Copyright © 2011 ARM Limited. All rights reserved. External (Open), Non-Confidential