| |||
| Home > Configuring Custom Memory Maps, Registers and Peripherals > Setting up controlled memory blocks > Defining the memory rules | |||
Define the rules that control which memory map block is used:
Expand the Map_rule group.
The map rule defines which memory block to use. In this example, M_SlowROM is
activated if B_Remap is set to Enabled (one).
Otherwise M_FastRAM is used.
Rename the Default group of Map_rule to R_FastRAM.
Set the following values:
Set Register to Newreg (use
the context menu).
Set Mask to 0x0001 (to
check the value of the B_REMAP bit field only).
Set Value to 0 (M_FastRAM displayed
when B_REMAP bit field is set to Disabled).
Set On_equal to M_FastRAM.
Figure 4.29 shows an example:
Create the R_SlowROM rule:
Right-click on R_FastRAM to display
the context menu.
Select Make Copy... from
the context menu to display the Enter Name of New object dialog
box. The name R_FastRAM_1 is inserted.
If the name of a rule you are copying ends with a number, then RealView Debugger increments the number for the new rule.
Change the name to R_SlowROM.
Click Create.
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 Enabled.
Set the value of *On_equal to M_SlowROM. Figure 4.30 shows an
example:
All board file entries are now complete.
Select Save and Close from the File menu to save your changes and close the Connection Properties window.
Click the OK button to close the Connection Properties dialog box.