CrossStudio section placment files are structured using XML syntax to enable simple construction and parsing.

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

    <!DOCTYPE Linker_Placement_File>

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

    <Root name="Flash Placement" >

A Root element has a name attribute - every element in a section placement file has a name attribute. Names should be unique within a hierarchy level. Within a Root element there are MemorySegment elements. These correspond to memory regions that are defined in a memory map file that will be used in conjunction with the section placement file when linking a program.

    <Root name="Flash Placement" >
      <MemorySegment name="FLASH" >

A MemorySegment contains ProgramSection elements which represent program sections created by the C/C++ compiler and assembler. The order of ProgramSection elements within a MemorySegment element represents the order in which the sections will be placed when linking a program. The first ProgramSection will be placed first and the last ProgramSection will be placed last.

    <Root name="My Board" >
      <MemorySegment name="FLASH" >
        <ProgramSection name=".text" ... >

ProgramSection elements have the following attributes.

- alignment The required alignment of the program section - a decimal number.
- inputsections An expression describing the input sections to be placed in this section. This is typically the name of the section enclosed in `*(.name .name.*)`
- load If "Yes" then the section is loaded. If "No" then the section isn't loaded.
- runin This species the section to copy this section to.
- start The optional start address of the program section - a 0x prefixed hexadecimal number.
- size The optional size of the program section in bytes - a 0x prefixed hexadecimal number.