CMSIS Packs  Version 0.10
Mechanism to install software, device support, APIs, and example projects
 All Pages
/package/conditions level

The grouping element /package/conditions contains all conditions defined for the Software Pack.

A condition describes dependencies on device, processor, and tool attributes as well as the presence of other components. The conditions are used to define AND and OR rules used to make components conditional and therefore only available under certain circumstances, e.g. for specific devices or processors. The conditions are also used to express dependencies between components.

Each condition has an id that is unique within the scope of a the description. An id can be referenced in the condition attribute of components, apis, examples, files and other conditions to become conditional. If a condition resolves to false during the processing of the description, the respective element will be ignored.

Example:

<conditions>
<condition id="CM4"> <!-- defines the condition with the ID "CM4" -->
<description>True if the active device has a Cortex-M4 processor</description>
<require Dcore="Cortex-M4"/> <!-- device has a Cortex-M4 processor -->
</condition>
<condition id="Cortex-M"> <!-- defines the condition with the ID "Cortex-M" -->
<description>True if the active device has a Cortex-M0 or Cortex-M0+ or Cortex-M3 or Cortex-M4 or SC000 or SC3000 processor </description>
<accept Dcore="Cortex-M0"/> <!-- any of the following cores will make the condition resolve to true -->
<accept Dcore="Cortex-M0+"/>
<accept Dcore="Cortex-M3"/>
<accept Dcore="Cortex-M4"/>
<accept Dcore="SC000"/>
<accept Dcore="SC300"/>
</condition>
<condition id="CMSIS-CORE"> <!-- defines the condition with the ID "CMSIS-CORE" -->
<description>True if the component Device Startup is selected and the device has a Cortex-M processor</description>
<require Cclass="Device" Cgroup="Startup"/> <!-- needs a software component Device Startup AND ... -->
<require condition="Cortex-M"/> <!-- ... needs that condition with ID=Cortex-M to be true. -->
</condition>
<condition id="CMSIS-DSP"> <!-- defines the condition with the ID "CMSIS-DSP" -->
<description>True if CMSIS-CORE == TRUE and either GCC or ARMCC and device running in little-endian byte ordering</description>
<require condition="CMSIS-CORE"/> <!-- needs a software component Device Startup AND ... -->
<accept Tcompiler="GCC"/> <!-- ... works either with the GCC compiler OR ... -->
<accept Tcompiler="ARMCC"/> <!-- ... the ARMCC compiler AND ... -->
<require Dendian="Little-endian"/> <!-- ... requires a device running in little-endian byte ordering -->
</condition>
<condition id="No STM32"> <!-- defines the condition with ID "No STM32" -->
<description>False if the device is from ST and the device name starts with "STM32"</description>
<deny Dvendor="STMicroelectronics:13" Dname="STM32*"/> <!-- device name must not start with STM32 and be from vendor ST-->
</condition>
</conditions>

 


/package/conditions

This element /package/conditions is a Grouping element for all conditions used in the Software Pack.

Parent Chain    
package /package    
Child Elements Description Type Occurrence
condition Contains all conditions in a Software Pack. xs:string 1..*

 


/package/conditions/condition

Conditions are dependency rules that can apply to elements such as a /package/components/.../component or /package/.../files/file. Other elements refer with the attribute condition to the attribute id in the condition.

Parent Chain
conditions /package/conditions
Attributes Description Type Occurrence
id Condition identifier which is unique within a Software Pack. The condition identifier is referenced by other elements with the attribute condition. xs:string 1..1
Child Elements Description Type Occurrence
description Descriptive (comment) text that explains the condition in an human readable way. xs:string 0..1
accept1 At least one accept must be true to signal a true for the complete condition (/b OR-Rule) FilterType 0..*
require1 All require must be true to signal a true for the complete condition (/b AND-Rule). FilterType 0..*
deny1 If one deny is true the complete condition becomes false. This element overrules require and accept (/b AND-NOT-Rule). FilterType 0..*
Note
1: At least one of these elements must be present in any condition.

 


/package/conditions/condition/accept

/package/conditions/condition/require

/package/conditions/condition/deny

All attributes set in a accept, require, or deny must resolve to true for the element to become true. A condition becomes true when:

  • At least one accept element is true, AND
  • all require elements are true, AND
  • no deny element is true.
Parent Chain
accept /package/conditions/condition/accept
require /package/conditions/condition/require
deny /package/conditions/condition/deny
Attributes Description Type Occurrence
Dfamily Specifies the device family name (e.g. STM32F2 Series). xs:string 0..1
DsubFamily Specifies the device sub family name (e.g. STM32F205 Series). xs:string 0..1
Dvariant Specifies the variant name of a device (e.g. Step A). xs:string 0..1
Dcore Specifies a processor core. DcoreEnum 0..1
Dvendor Specifies the silicon vendor of the device. DeviceVendorEnum 0..1
Dname Specifies the device name. Wild-cards ('*' or '?') can be used to match many devices names. xs:string 0..1
Dfpu Specifies whether a Floating Point Unit (FPU) must be present or not. DfpuEnum 0..1
Dmpu Specifies whether a Memory Protection Unit (MPU) must be present or not. DmpuEnum 0..1
Dendian Specifies whether a Floating Point Unit (FPU) must be present or not. DendianEnum 0..1
Cbundle Specifies a component class bundle name. xs:string 0..1
Cclass Specifies a component class name. CclassType 0..1
Cgroup Specifies a software component group name. The string has restrictions specified by the CgroupType CgroupType 0..1
Csub Specifies a software component sub-group name. CsubType 0..1
Cvariant Specifies a software component version. The condition is true when the version is identical or higher. xs:string 0..1
Cversion Specifies a software component version. The condition is true when the version is identical or higher. VersionType 0..1
Capiversion Specifies a API version. The condition is true when the version is identical or higher. VersionType 0..1
Tcompiler Specifies a compiler tool chain (ARMCC, GCC, IAR, Tasking, ...). CompilerEnumType 0..1
condition Refers to another condition attribute id. xs:string 0..1