| |||
| Home > Configuring Custom Memory Maps, Registers and Peripherals > Creating a concatenated register | |||
The example used in this procedure creates a concatenated
register C_R8_R9_concat for the RVISS Debug
Configuration as follows:
the high 16 bits of register R8 forms the low 16 bits of R8_R9_concat
the low 16 bits of register R9 forms the high 16 bits of R8_R9_concat.
The example uses the blank BCD file created in Creating a BCD file to use as a template.
If you want to use an enumeration to set the values of your concatenated register, then you must create it before you create the register.
To create a concatenated register:
Select Target → Connect to Target... from the Code window main menu to open the Connect to Target window.
Locate the RVISS_1 Debug Configuration:
Select Configuration from the Grouped By list.
Expand the required Debug Interface. For this example,
expand RealView Instruction Set Simulator (RVISS).
Expand the RVISS Debug Configuration.
Make sure that the ARM926EJ-S target
is disconnected on the Debug Configuration.
Right-click on the RVISS_1 Debug
Configuration to display the context menu.
Select Properties... from the context menu to open the Connection Properties dialog box.
Click the Advanced button
to open the Connection Properties window. The settings group for
the Debug Configuration is selected (in this example, CONNECTION=RVISS_1).
If you have followed the examples in previous sections, then
you might already have the MP3 BoardChip definition
assigned. If so, then skip the next step.
Assign the required BoardChip definition to the connection:
Right-click on the BoardChip_name setting
in the right pane to display the context menu.
Select MP3 from the context menu.
Locate the board/chip definition where you want to define the custom memory mapped registers:
Right-click on the *BoardChip_name MP3 setting
in the right pane to display the context menu.
Select Jump to Definition from the context menu.
The BOARD=MP3 group is selected in the
BCD file.
Expand the following board/chip definition groups in turn:
*BOARD=MP3
*Advanced_Information
*ARM (or the corresponding name
specified in your board/chip definition)
Concat_Register
Create the concatenated register as follows:
Rename the Default block to C_R8_R9_concat.
This specifies the concatenated register symbol name, which
you can reference using @.
For example, namecexpression @C_R8_R9_concat.
Double-click on C_R8_R9_concat in
the right pane.
The settings for the concatenated register are displayed.
Change the C_R8_R9_concat settings
to the values shown in Table 4.3.
If you enter the Low_mask and High_mask values
in decimal, then they are displayed as hexadecimal.
Table 4.3. C_R8_R9_concat settings
| Setting | Value |
|---|---|
Low_name | R8 |
Low_shift | 16 |
Low_mask | 0xFFFF |
High_name | R9 |
High_shift | -16 (left shift) |
High_mask | 0xFFFF0000 |
Gui_name | R8 and R9 combined |
If you have followed the examples in previous sections, then
you might already have the MP3_REGS block in
the Register_Window group. If so, then use the MP3_REGS block
instead of Default for the next step.
Create the Registers view tab to view the concatenated register:
Double-click on the Register_Window group
in the left pane.
Rename the Default block to Concat_regs.
Select Concat_regs to display
the related settings.
Right-click on Line to display
the context menu.
Select Edit Value... from the context menu.
Enter C_R8_R9_concat. Remember to press Enter to complete the entry.
Select File → Save and Close from the menu to save your changes and close the Connection Properties window.
Click the OK button to close the Connection Properties dialog box.
See also: