SEGGER Embedded Studio memory-map files are structured using XML syntax for its simple construction and parsing.

The first entry of the project file defines the XML document type used to validate the file format.

<!DOCTYPE Board_Memory_Definition_File>

The next entry is the Root element. There can only be one Root element in a memory map file:

<Root name="My Board">

A Root element has a name attribute — every element in a memory map file has a name attribute. Names should be unique within a hierarchy level. Within a Root element, there are MemorySegment elements that represent regions within the memory map.

<Root name="My Board">
  <MemorySegment name="Flash" start="0x1000" size="0x200" access="ReadOnly">

MemorySegment elements have the following attributes:

RegisterGroup elements are used to organize registers into groups. Register elements are used to define peripheral registers:

 <Root name="My Board" >
  <MemorySegment name="System" start="0x2000" size="0x200" >
    <RegisterGroup name="Peripheral1" start="0x2100" size="0x10" >
      <Register name="Register1" start="+0x8" size="4" >

RegisterGroup elements have the same attributes as MemorySegment elements. Register elements have the following attributes:

A Register element can contain BitField elements that represent the bits in a peripheral register:

 <Root name="My Board" >
  <MemorySegment name="System" start="0x2000" size="0x200" >
    <RegisterGroup name="Peripheral1" start="0x2100" size="0x10" >
      <Register name="Register1" start="+0x8" size="4" >
        <BitField name="Bits_0_to_3" start="0" size="4" />

BitField elements have the following attributes:

A Bitfield element can contain Enum elements:

<Root name="My Board" >  
  <RegisterGroup name="Peripheral1" start="0x2100" size="0x10" >
    <Register name="Register1" start="+0x8" size="4" >
      <BitField name="Bits_0_to_3" start="0" size="4" />
        <Enum name="Enum3" start="3" />
        <Enum name="Enum5" start="5" />

You can import CMSIS SVD files (see http://www.onarm.com/) into a memory map using the ImportSVD element:

<ImportSVD filename="$(TargetsDir)/targets/Manufacturer1/Processor1.svd.xml">

The filename attribute is an absolute filename which is macro-expanded using SEGGER Embedded Studio system macros.

When a memory map file is loaded either for the memory map viewer or to be used for linking or debugging, it is preprocessed using the (as yet undocumented) SEGGER Embedded Studio XML preprocessor.