memory-map files are tree-structured descriptions of the target memory map. They are used by the compiler to ensure correct placement of program sections, and by the debugger so it knows which addresses are valid on the target and which program sections to load. You can also use them files to direct the debugger to display memory-mapped peripherals. Usually, you don't need to modify memory-map files—they will be set up for the particular targets CrossStudio supports—but it is useful to view them with the memory-map editor.

To open memory-map files, choose File > Open and select the XML file that contains the memory map or, alternatively, use the View Memory Map option on the shortcut menu of the Project Explorer.

The memory-map editor provides a tree-structured view of the memory space of a target. The memory map consists of a set of different node types arranged in a hierarchy. These nodes have properties that can be modified using the Properties window when the node is selected. These properties and the placement of nodes within the memory map are used as input to the program-building process so the linker knows where sections should be placed. Additionally, the debugger uses the information in memory-map files to enable register and memory displays.

The memory-map editor supports the following node types:

Root
The top node of the memory map.
Memory Segment
A range of addresses that represents a region in target memory.
Program Section
Represents a program section of your application.
Register Group
Represents an area in memory that contains a group of related registers.
Register
Represents a memory-mapped register.
Bit Field
Part of a memory-mapped register.

The following statements hold regarding the creation and movement of nodes within a memory:

All nodes have both mandatory and optional properties. The value of the mandatory Name property should be unique within the memory map.

Memory-segment and register-group properties

Start Address
A hexadecimal number stating where memory begins (lowest address).
Start Address Symbol</b>
The name of a linker symbol to generate with the value of the Start Address.
Size
A hexadecimal number specifying the size in bytes of the memory segment.
Size Symbol
The name of a linker symbol to generate with the value of the Size.
Access Type
Specifies whether the memory segment is read only or read/write.

Program section properties

Start Address
An optional hexadecimal value representing the absolute load position of the section. If this isn't set, the relative placement of the program section within the memory segment will determine the load position of the section.
Size
An optional decimal value specifying the size in bytes of the program section.
Load
Specifies whether the section should be loaded by the debugger.
Alignment
An optional decimal value specifying the alignment requirements of the section.
Section To Run In
An optional name of another program section to which this program section will be copied.
Input Section Names
The optional names of the files that will be placed in this section.

Register properties

Start Address
A hexadecimal value specifying where the register is placed.
Start Address Symbol
The name of a linker symbol to generate with the value of the Start Address.
Register Type
Optional, a C type specifying how you want to display the register. This defaults to the word length of the target processor.
Endian
Optional, specifies the byte order of a multibyte register. This defaults to the byte order of the target processor.

Bitfield properties

Bit Offset
A decimal value that sets the starting bit position of the bit field. Bit 0 is the first bit position.
Bit Length
A decimal value that defines the number of bits in the field.

The memory-map editor shares many of the attributes of the text editor, and the same key-bindings—for example, cut, copy and paste—are accessible from the Edit menu. But in addition to the standard editor capabilities, the memory-map editor supports moving nodes up and down within a hierarchy. This enables adjusting the sequence of program sections.