4.15. Creating memory map rules

Memory map rules enable you to control how memory map blocks are displayed. Typically, map rules are required when multiple memory map blocks are defined that occupy the same area of memory, but only one of the blocks is to be active at a time. For example, when a target supports memory remapping. These memory map blocks are referred to as controlled memory map blocks.

The active memory map block is determined by examining the value of a custom register or peripheral register. There must be a map rule for each memory map block that is to be controlled by that register. Each map rule associates a unique register value with a specific memory map block.

Before you create map rules:

To create the rules that control which memory block is used:

  1. Select Connection Properties... from the Target menu to display the Connection Properties window.

  2. Expand the (*.bcd) Board/Chip Definitions group.

  3. Expand ...\MP3.bcd in the definitions list.

  4. Expand the following groups in turn:

    1. *BOARD=MP3

    2. *Advanced_Information

    3. *ARM

    4. Map_rule.

  5. Select the Default group.

  6. Rename the Default group of Map_rule to R_FastRAM.

  7. Set the following values:

    1. Set Register to Newreg (use the context menu).

    2. Set Mask to 0x0001 (to check the value of the B_REMAP bit field only).

    3. Set Value to 0 (M_FastRAM displayed when B_REMAP bit field is set to Disable).

    4. Set On_equal to M_FastRAM.

    Figure 4.27 shows an example:

    Figure 4.27. Settings for the R_FastRAM map rule

    Settings for the R_FastRAM map rule

  8. Create the R_SlowROM rule:

    1. Right-click on R_FastRAM to display the context menu.

    2. Select Make Copy... from the context menu to display the Enter Name of New object dialog box. The name R_FastRAM_1 is inserted.

      Note

      If the name of a rule you are copying ends with a number, then RealView Debugger increments the number for the new rule.

    3. Change the name to R_SlowROM.

    4. Click Create.

  9. Select R_SlowROM and set Value to 1. That is, display the M_SlowROM memory block when the B_REMAP bit field is set to Enable.

  10. Set the value of *On_equal to M_SlowROM.

    Figure 4.28 shows an example:

    Figure 4.28. Settings for the R_SlowROM map rule

    Settings for the R_SlowROM map rule

    All board file entries are now complete.

  11. Select Save and Close from the File menu to save your changes and close the Connection Properties window.

See also:

Copyright © 2002-2010 ARM Limited. All rights reserved.ARM DUI 0182M
Non-ConfidentialID102410