CMSIS-Pack  Version 1.6.0
Delivery Mechanism for Software Packs
 All Pages
/package/examples element

The element /package/examples/example describes fully defined examples contained in the Pack. An example lists the files that belong to an example. The example itself and each individual file may refer to a condition that must resolve to true; if it is false the example or file will be ignored. The board element is used to reference to one or more board descriptions using the board vendor and name an example is targeted for. Each example can specify attributes listing related components using Class (Cclass=), Group (Cgroup=), Subgroup (Csub) and a Version (Cversion=)

Example

<examples>
<example name="Blinky" folder="Boards/MCBSTM32F200/Blinky" doc="Abstract.txt" version="1.0">
<description>This is a basic example demonstrating the development flow and letting the LED on the board blink</description>
<board vendor="STMicroelectronics" name="32F429IDISCOVERY"/>
<project>
<environment name="uv" load="ARM/Blinky.uvproj"/>
<environment name="iar" load="IAR/Blinky.ewarm" />
</project>
<attributes>
<component Cclass="CMSIS" Cgroup="Core"/>
<component Cclass="Device" Cgroup="Startup"/>
<keyword>Blinky</keyword>
<keyword>Getting Started</keyword>
</attributes>
</example>
</examples>

 


/package/examples

Grouping element for examples. No more than one such group can exist in a Pack.

Parent Chain
package /package
Child Elements Description Type Occurrence
example Description of fully specified project ExampleType 1..*

 


/package/examples/example

An example section is used to provide the required information for accessing an example project contained in a Pack. All examples contained in the installed packs can be listed including a brief description. A selected example will get copied into a user selected destination folder. Based on the user selected environment the respective project file will be loaded. The ID of an example is the combination of the Pack vendor, the board information and the example name and version. Examples with the same ID are treated as a single example.

Parent Chain
examples /package/examples
Attributes Description Type Use
name Name of the example xs:string required
folder Relative path to the example base folder within the package. If selected, then the directory including all sub-folders and files will be copied, unless the archive attribute gets set. xs:string required
archive Filename and extension of the archive file containing all files and sub-folders of the example. The archive is located in the path specified by the attribute folder. If selected, then the whole archive will be extracted. xs:string optional
doc Document that describes the example. xs:string required
version Example version number. The version format is described in Version Type. VersionType optional
public Set publishing permissions for the documentation. If <public> is true, then the vendor gives permission to extract the documentation from the pack and publish it on a web-page. Links to web pages are assumed to be public. The default value is false. xs:boolean optional
Child Elements Description Type Occurrence
description Briefly documents the purpose and scope of the example. The test can be displayed in an example selector. xs:string 1
board Complex type providing a reference to a board description using board name and vendor.. BoardReferenceType 1
project Complex type describing the project files for different environments ExampleProjectType 1..*
attributes Group element for project attributes, which list required components, define example categories, and set keywords to filter and search for examples. ExampleAttributesType 1

 


/package/examples/example/board

This element specifies the board that can be used with the example project.

Example:

<board name="MV1000A" vendor="MyVendor"/>

 

Parent Chain
example /package/examples/example
Attributes Description Type Use
vendor Vendor name of the board. xs:string required
name Commercial name of the board. xs:string required
Dvendor Vendor name of the device used on the board. Use predefined values as listed in the table Device Vendor. DeviceVendorEnum optional
Dfamily Name of the target device family used on the board. This attribute is optional if either DsubFamily or Dname is already specified.
Deprecated since version 1.1
xs:string optional
DsubFamily Name of the target device sub-family used on the board. This attribute is optional if either Dfamily or Dname is already specified.
Deprecated since version 1.1
xs:string optional
Dname Name of the target device used on the board. This attribute is optional if either Dfamily or DsubFamily is already specified.
Deprecated since version 1.1.
xs:string optional
Note
Values for deprecated attributes are read from the board description element /package/boards/board/mountedDevice.

 


/package/examples/project

A project element is a sequence of environment elements that describe the name of the environment and the project file to be loaded.

Example:

<project>
<environment ... />
<environment ... />
</project>

 

Parent Chain
example /package/examples/example
Element Description Type Occurrence
environment Specifies the environment and project file with extension. xs:complexType 1..*

 


/package/examples/project/environment

The environment element describes the name of the environment and the project file to be loaded.

Example:

<project>
<environment name="uv" load="ARM/Blinky.uvproj"/>
<environment name="iar" load="IAR/Blinky.ewarm" />
</project>

 

Parent Chain
project /package/examples/project
Attributes Description Type Use
name Name of the required tool-chain (for example: uv, iar, etc.) xs:string required
load Specifies the project file with extension. A path relative to folder attribute of the element /package/examples/example can be appended. xs:string required

 


/package/examples/example/attributes

Example:

<example>
<attributes>
<category>Example Project</category>
<category>For a specific board</category>
...
<component Cclass="CMSIS" Cgroup="Core"/>
<component Cclass="Device" Cgroup="Startup"/>
...
<keyword>Blinky</keyword>
<keyword>Getting Started</keyword>
</attributes>
</example>

 

Parent Chain
example /package/examples/example
Child Elements Description Type Occurrence
category Free form string defining an example category. A category can be used to filter examples in an example browser. xs:string 0..*
component Group for defining the components used in the example. ComponentCategoryType 0..*
keyword Free form string defining a keyword that relates to the example. A keyword can be used to search for examples. xs:string 0..*

 


/package/examples/example/attributes/component

The component element specifies the Cclass to which the example belongs. This can be used to list all related components within an example.

Example:

<attributes>
...
<component Cclass="CMSIS" Cgroup="Core"/>
<component Cclass="Device" Cgroup="Startup"/>
...
</attributes>

 

Parent Chain
attribute /package/examples/example/attributes
Attribute Description Type Use
Cclass Free form string defining an example class. Predefined values can be used as listed in the table Component Classes. CclassType required
Cgroup Free form string defining an example group. Predefined values can be used as listed in the table Component Groups. CgroupType optional
Csub Free form string defining an example subgroup. The type is described in Component Subgroups. CsubType optional
Cversion Free form string defining an example version. The version format is described in Version Type. VersionType optional
Cvendor Free form string defining the vendor of the example. xs:string optional