Package-description files are XML files used by SEGGER Embedded Studio to describe a support package, its contents, and any dependencies it has on other packages.
Each package file must contain one package element that describes the package. Optionally, the package element can contain a collection of file, history, and documentation elements to be used by SEGGER Embedded Studio for documentation purposes.
The filename of the package-description file should match that of the package and end in "_package.xml".
Below is an example of two package-description files. The first is for a base chip-support package for the LPC2000; the second is for a board-support package dependent on the first:
<!DOCTYPE CrossStudio_Package_Description_File> <package cpu_manufacturer="Philips" cpu_family="LPC2000" version="1.1" ses_versions="8:1-" author="SEGGER" > <file file_name="$(TargetsDir)/Philips_LPC210X/arm_target_Philips_LPC210X.htm" title="LPC2000 Support Package Documentation" /> <file file_name="$(TargetsDir)/Philips_LPC210X/Loader.emProject" title="LPC2000 Loader Application Solution" /> <group title="System Files"> <file file_name="$(TargetsDir)/Philips_LPC210X/Philips_LPC210X_Startup.s" title="LPC2000 Startup Code" /> <file file_name="$(TargetsDir)/Philips_LPC210X/Philips_LPC210X_Target.js" title="LPC2000 Target Script" /> </group> <history> <version name="1.1" > <description>Corrected LPC21xx header files and memory maps to include GPIO ports 2 and 3.</description> <description>Modified loader memory map so that .libmem sections will be placed correctly.</description> </version> <version name="1.0" > <description>Initial Release.</description> </version> </history> <documentation> <section name="Supported Targets"> <p>This CPU support package supports the following LPC2000 targets: <ul> <li>LPC2103</li> <li>LPC2104</li> <li>LPC2105</li> <li>LPC2106</li> <li>LPC2131</li> <li>LPC2132</li> <li>LPC2134</li> <li>LPC2136</li> <li>LPC2138</li> </ul> </p> </section> </documentation> </package>
<!DOCTYPE CrossStudio_Package_Description_File> <package cpu_manufacturer="Philips" cpu_family="LPC2000" cpu_name="LPC2138" board_manufacturer="Rowley Associates" board_name="CrossFire LPC2138" dependencies="Philips_LPC2000" version="1.0"> <file file_name="$(SamplesDir)/CrossFire_LPC2138/CrossFire_LPC2138.emProject" title="CrossFire LPC2138 Samples Solution" /> <file file_name="$(SamplesDir)/CrossFire_LPC2138/ctl/ctl.emProject" title="CrossFire LPC2138 CTL Samples Solution" /> </package>
The package element describes the support package, its contents, and any dependencies it has on other packages. Valid attributes for this element are:
Attribute | Description |
author | The author of the package. |
board_manufacturer | The manufacturer of the board supported by the package (if omitted, CPU manufacturer will be used). |
board_name | The name of the specific board supported by the package (only required for board-support packages). |
company_name | The name of the company to group the package under in the package dialogs. (if omitted, the Board/CPU manufacturer will be used). |
cpu_family | The family name of the CPU supported by the package (optional). |
cpu_manufacturer | The manufacturer of the CPU supported by the package. |
cpu_name | The name of the specific CPU supported by the package (may be omitted if the CPU family is specified). |
description | A description of the package (optional). |
dependencies | A semicolon-separated list of packages the package requires to be installed in order to work (optional). |
installation_directory | The directory in which the package should be installed (optional - if undefined, defaults to "$(PackagesDir)"). |
replaces | A semicolon-separated list of package names listing the packages that this package replaces. The replaced packages are marked as legacy packages and are only visible in the package manager if the if the Include Legacy Packages option is selected (optional). |
deprecated | If set to true, indicates that the package has been deprecated. Deprecated packages are marked as legacy packages and are only visible in the package manager if the if the Include Legacy Packages option is selected (optional). |
ses_versions | A string describing which version of SEGGER Embedded Studio supports the package. The format of the string is target_id_number:version_range_string. |
title | A short description of the package (optional). |
uninstalls | A semicolon-separated list of packages names listing the packages to be uninstalled if this package is installed (optional). |
version | The package version number. |
The file element is used by SEGGER Embedded Studio for documentation purposes by adding links to files of interest within the package such as example project files and documentation.
Attribute | Description |
file_name | The file path of the file. |
title | A description of the file. |
Optionally, file elements can be grouped into categories using the group element.
The group element is used for categorizing files described by file elements into a particular group.
Attribute | Description |
title | Title of the group. |
The history element is used to hold a description of the package's version history.
The history element should contain a collection of version elements.
The version element is used to hold the description of a particular version of the package.
Attribute | Description |
name | The name of the version being described. |
The version element should contain a collection of description elements.
Each description element contains text that describes a feature of the package version.
The documentation element is used to provide arbitrary documentation for the package.
The documentation element should contain a collection of one or more section elements.
The section element contains package documentation in XHTML format.
Attribute | Description |
name | The title of the documentation section. |
The following table lists the possible target ID numbers:
Target | ID |
ARM | 8 |
RISC-V | 20 |
The version_range_string can be any of the following: