CMSIS-Build: /cprj/components

| CMSIS-Build Version 0.9.0 (beta) Tools, software frameworks, and work flows for productivity with CMSIS based projects

- Main Page
- Usage and Description

All Pages
/cprj/components

This element lists all software components that are selected within the Manage Run-Time Environment.

Example components section:

<cprj xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd"/>
...
<components>
<component Cvendor="ARM" Cclass="CMSIS" Cgroup="CORE"/>
<component Cvendor="ARM" Cclass="Device" Cgroup="Startup" Cvariant="C Startup">
<file category="sourceC" name="Device/ARM/ARMCM0/Source/startup_ARMCM0.c" attr="config" version="2.0.0"/>
<file category="sourceC" name="Device/ARM/ARMCM0/Source/system_ARMCM0.c" attr="config" version="2.0.0"/>
<file category="linkerScript" name="Device/ARM/ARMCM0/Source/ARM/ARMCM0_ac6.sct" attr="config" version="1.0.0"/> <component Cclass="CMSIS" Cgroup="Core" Cvendor="ARM" Cversion="5.6.0"/>
</component>
</components>
...
</cprj>

Parents | Element Chain
--- | ---
cprj | /cprj
Child Elements | Description | Type | Occurrence
component | identify a selected software component and configuration files as well as commandline options specific to this component. | ComponentType | 1..*

# /cprj/components/component

Identify a software component.

Example component element

...
<components>
<component Cvendor="ARM" Cclass="CMSIS" Cgroup="CORE"/>
<component Cvendor="ARM" Cclass="Device" Cgroup="Startup" Cvariant="C Startup">
<file category="sourceC" name="Device/ARM/ARMCM0/Source/startup_ARMCM0.c" attr="config" version="2.0.0"/>
<file category="sourceC" name="Device/ARM/ARMCM0/Source/system_ARMCM0.c" attr="config" version="2.0.0"/>
<file category="linkerScript" name="Device/ARM/ARMCM0/Source/ARM/ARMCM0_ac6.sct" attr="config" version="1.0.0"/> <component Cclass="CMSIS" Cgroup="Core" Cvendor="ARM" Cversion="5.6.0"/>
</component>
</components>
...

Parents | Element Chain
--- | ---
components | /cprj/components
Attributes | Description | Type | Use
Cvendor | Vendor name of the component. | xs:string | optional
Cbundle | Name of bundle to which the selected component belongs. | xs:string | optional
Cclass | Component class name. | xs:string | required
Cgroup | Component group name. | xs:string | required
Csub | Component sub group name following the taxonomy (string may be empty) | CsubType | optional
Cvariant | Name of the variant of the selected component. | CvariantType | optional
Cversion | Version of the selected component. Note, a higher version number can be entered in case the matching version is not available. | ComponentVersionType | optional
Capiversion | Implemented api version defined for the corresponding Cclass:Cgroup:Csub. Set the value only for components that have an associated <api>. | ComponentVersionType | optional
instances | Number of instances created for the component. Set the value only for components that are multi-instance capable. Defaults to 1 if not set. | InstancesType | optional
layer | Reference to a layer name as specfied by the layers section indicating that this component belongs to the named layer. | xs:string | optional
Child Elements | Description | Type | Occurrence
cflags | Specify compiler flags for C-modules contained in this component | ToolOptionType | 0..1
cxxflags | Specify compiler flags for C++-modules contained in this component | ToolOptionType | 0..1
asflags | Specify assembler flags for Assembler-modules contained in this component | ToolOptionType | 0..1
file | Specify configuration files from the selected component including version information. The ID for a configuration file is the relative path in the pack it originates from. | ComponentFileType | 0..*

# /cprj/components/component/file

Specify the configuration files for the selected component. These files must already exist in the project folder structure (RTE/<Cclass>[/<Device>]/...) and contain a configuration setup specifically adopted for the project. Providing the version number of the orignal file is mandatory.

Example file element

...
<components>
<component Cvendor="ARM" Cclass="Device" Cgroup="Startup" Cvariant="C Startup">
<file category="sourceC" name="Device/ARM/ARMCM0/Source/startup_ARMCM0.c" attr="config" version="2.0.0"/>
<file category="sourceC" name="Device/ARM/ARMCM0/Source/system_ARMCM0.c" attr="config" version="2.0.0"/>
<file category="linkerScript" name="Device/ARM/ARMCM0/Source/ARM/ARMCM0_ac6.sct" attr="config" version="1.0.0"/>
</component>
<component Cclass="CMSIS" Cgroup="Core" Cvendor="ARM" Cversion="5.6.0"/>
...
</components>
...

Parents | Element Chain
--- | ---
component | /cprj/components/component
Attributes | Description | Type | Use
category | File type, for example header. Use predefined values from the table File Category. | FileCategoryType | required
attr | File action attribute, for example copy. Use predefined values from the table File Attribute. | FileAttributeType | optional
name | File path and name within pack the file originates from (configuration file ID) | xs:string | required
version | Version of the configuration file being present in the example. | VersionType | required

# /cprj/components/component/cflags

These compiler options are either added or removed from the inherited command line and affect all C modules that belong to the component. This flag can also be added to file groups and individual files within the description.

Example cflags element for component

<cprj ...>
...
<components>
...
<component Cbundle="ARM Compiler" Cclass="Compiler" Cgroup="Event Recorder" Cvariant="DAP" Cvendor="Keil">
<file attr="config" category="header" name="Config/EventRecorderConf.h" version="1.1.0"/>
<cflags add="-D_DISABLE_EVR_"/>
</component>
...
</components>
...
</cprj>

Parents | Element Chain
--- | ---
component | /cprj/components/component
Attributes | Description | Type | Use
compiler | selects the compiler the command line option string is targeted at. Choose from available list: GCC, AC5, AC6, IAR, Tasking, GHS, Cosmic, G++ | CompilerEnumType | required
add | commandline string to be added to the inherited command line for the compiler invoked for C-modules specific to the tool-chain selected by the 'compiler' attribute. | xs:string | required
remove | option tokens to be removed from the inherited command line for the compiler invoked for C-modules specific to the tool-chain selected by the 'compiler' attribute. | xs:string | required

# /cprj/components/component/cxxflags

These compiler options are either added or removed from the inherited command line and affect all C++ modules that belong to the component. This flag can also be added to file groups and individual files within the description.

Example cxxflags element for component

<cprj ...>
...
<components>
...
<component Cbundle="ARM Compiler" Cclass="Compiler" Cgroup="Event Recorder" Cvariant="DAP" Cvendor="Keil">
<file attr="config" category="header" name="Config/EventRecorderConf.h" version="1.1.0"/>
<cxxflags add="-D_DISABLE_EVR_"/>
</component>
...
</components>
...
</cprj>

Parents | Element Chain
--- | ---
component | /cprj/components/component
Attributes | Description | Type | Use
compiler | selects the compiler the command line option string is targeted at. Choose from available list: GCC, AC5, AC6, IAR, Tasking, GHS, Cosmic, G++ | CompilerEnumType | required
add | commandline string to be added to the inherited command line for the compiler invoked for C++-modules specific to the tool-chain selected by the 'compiler' attribute. | xs:string | required
remove | option tokens to be removed from the inherited command line for the compiler invoked for C++-modules specific to the tool-chain selected by the 'compiler' attribute. | xs:string | required

# /cprj/components/component/asflags

These assembler options are either added or removed from the inherited command line and affect all Assembler modules that belong to the component. This flag can also be added to file groups and individual files within the description.

Example asflags element for component

<cprj ...>
...
<components>
...
<component Cbundle="ARM Compiler" Cclass="Compiler" Cgroup="Event Recorder" Cvariant="DAP" Cvendor="Keil">
<file attr="config" category="header" name="Config/EventRecorderConf.h" version="1.1.0"/>
<asflags remove="-xref"/>
</component>
...
</components>
...
</cprj>

Parents | Element Chain
--- | ---
component | /cprj/components/component
Attributes | Description | Type | Use
compiler | selects the compiler the command line option string is targeted at. Choose from available list: GCC, AC5, AC6, IAR, Tasking, GHS, Cosmic, G++ | CompilerEnumType | required
add | commandline string to be added to the inherited command line for the compiler invoked for C++-modules specific to the tool-chain selected by the 'compiler' attribute. | xs:string | required
remove | option tokens to be removed from the inherited command line for the compiler invoked for C++-modules specific to the tool-chain selected by the 'compiler' attribute. | xs:string | required