The SEGGER Embedded Studio New Project dialog works from a file called project_templates.xml in the targets subdirectory of the SEGGER Embedded Studio installation directory. Because you may want to add your own new project types, 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 Project_Templates_File>
The next entry is the projects element, which is used to group a set of new project entries into an XML hierarchy.
<projects> <project> … </projects>
Each entry has a project element that contains the class of the project (attribute caption), the name of the project (attribute name), its type (attribute type) and a description (attribute description). For example:
<project caption="ARM Evaluator7T" name="Executable" description="An executable for an ARM Evaluator7T." type="Executable"/>
The project type can be one of these:
The configurations to be created for the project are defined using the configuration element, which must have a name attribute:
<configuration name="ARM RAM Release"/>
The property values to be created for the project are defined using the property element. If you have a defined value, you can specify this using the value attribute and, optionally, set the property in a defined configuration, such as:
<property name="target_reset_script" configuration="RAM" value="Evaluator7T_ResetWithRamAtZero()" />
Alternatively, you can include a property that will be shown to the user, prompting them to supply a value as part of the new-project process.
<property name="linker_output_format"/>
The folders to be created are defined using the folder element. The folder element must have a name attribute and can also have a filter attribute. For example:
<folder name="Source Files" filter="c;cpp;cxx;cc;h;s;asm;inc" />
The files to be in the project are specified using the file element. You can use build-system macros (see Project macros) to specify files located in the SEGGER Embedded Studio installation directory. Files will be copied to the project directory or just left as references, depending on the value of the source attribute:
<file name="main.c" source="$(StudioDir)/samples/Shared/main.c"/> <file name="$(StudioDir)/source/thumb_crt0.s"/>
You can define the set of configurations that can be referred to in the top-level configurations element:
<configurations> <configuration> … </configurations>
This contains the set of all configurations that can be created when a project is created. Each configuration is defined using a configuration element, which can define the property values for that configuration. For example:
<configuration name="Debug"> <property name="build_debug_information" value="Yes">