SEGGER Embedded Studio project files are held in text files with the .emProject extension. Because you may want to edit project files, and perhaps generate them, they are structured using XML syntax to enable simple construction and parsing.

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

<!DOCTYPE CrossStudio_Project_File>

The next entry is the solution element; there can only be one solution element in a project file. This specifies the solution name displayed in the Project Explorer and has a version attribute that defines the file-format version of the project file. Solutions can contain projects, projects can contain folders and files, and folders can contain folders and files. This hierarchy is reflected in the XML nesting—for example:

<solution version="1" Name="solutionname">
  <project Name="projectname">
    <file Name="filename" />
    <folder Name="foldername">
      <file Name="filename2" />
    </folder>
  </project>
</solution>

Note that each entry has a Name attribute. Names of project elements must be unique to the solution, and names of folder elements must be unique to the project, but names of files do not need to unique.

Each file element must have a file_name attribute that is unique to the project. Ideally, the file_name is a file path relative to the project (or solution directory), but you can also specify a full file path, if you want to. File paths are case-sensitive and use "/" as the directory separator. They may contain macro instantiations, so file paths cannot contain the "$" character. For example…

<file file_name="$(StudioDir)/source/crt0.s" Name="crt0.s" />

…will be expanded using the value of $(StudioDir) when the file is referenced from SEGGER Embedded Studio.

Project properties are held in configuration elements with the Name attribute of the configuration element corresponding to the configuration name, e.g., "Debug". At a given project level (i.e., solution, project, folder), there can only be one named configuration element—i.e., all properties defined for a configuration are in single configuration element.

<project Name="projectname"><configuration project_type="Library" Name="Common" />
  <configuration Name="Release" build_debug_information="No" /></project>

You can use the import element to link projects:

<import file_name="target/libc.emProject" />