CMSIS-Pack
Version 1.5.0
Delivery Mechanism for Software Packs
|
The CPDSC format provides the XML elements for defining CMSIS software projects. The CPDSC file content is considered static, so you do not have to keep the projects synchronized.
The scope of the description includes:
The project format creates a basic project configuration and does not reflect tool-specific features or configurations. The import and conversion from the CPDSC format into a toolchain-specific format is the responsibility of the tool vendor.
A CMSIS software project is a collection of files in a directory structure. The CPDSC file is located in the base folder of the directory structure. Only one CPDSC file is allowed. A CPDSC file can describe one or more projects.
Example CMSIS Project Description File (*.cpdsc):
The CPDSC file format shares the schema file (PACK.xsd) with the PDSC and GPDSC format. However, a CPDSC file can only contain the top level elements listed in this table.
Parents | Element Chain | ||
---|---|---|---|
root | description root point for CPDSC | ||
Attributes | Description | Type | Use |
schemaVersion | Version of PACK.xsd the description is compatible with | VersionType | required |
Child Elements | Description | Type | Occurrence |
name | Name of the CPDSC Software Pack file. Could be displayed by an installer. | RestrictedString | 1..1 |
vendor | Creator or owner of the CPDSC file. | RestrictedString | 1..1 |
description | High level description of the projects. | xs:string | 1..1 |
url | File location if generated, link to the Pack this file belongs to. If left empty, the Pack cannot be updated automatically from a server location. | xs:anyURI | 1..1 |
supportContact | Email or web page for reporting errors or problems related to this project. | xs:string | 0..1 |
license | Reference to a license file relative to this CPDSC. | xs:string | 0..1 |
requirements | Specify required packs, compiler, and programming languages for the project. | RequirementsType | 1..1 |
create | Section capturing the project configuration. | CreateType | 1..1 |
releases | Release history and release notes for tracking changes to this project. The attributes <deprecated> and <replacement> are not supported in the context of CPDSC files. | ReleasesType | 1..1 |
You can refer to /package for more details.
This element groups one or more projects, which should be related. For example, the Secure and Non-secure part of an application, or a set of library projects and the final application project. We recommend to use different CPDSC files for each individual project.
Parents | Element Chain | ||
---|---|---|---|
package | /package | ||
Child Elements | Description | Type | Occurrence |
project | Grouping element to add project descriptions | ProjectType | 1..* |
This element bundles one project.
Example project section:
Parents | Element Chain | ||
---|---|---|---|
create | /package/create | ||
Attributes | Description | Type | Use |
name | Name of the project. Will be used as file name as well. If not specified, then the name on the package level is used. | RestrictedString | optional |
documentation | Path and file name of a document relative to the CPDSC file, or an url providing detailed information about the software project. | xs:string | 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 |
target | Section containing details, for example about the board, device, memory, debug, or algorithms. | TargetType | 1..1 |
select | Specify the software components selected in the Run-Time Environment (RTE). | SelectType | 0..1 |
files | List all files used for the project build, which are not configured using components. | ProjectFilesType | 0..1 |
This element describes the hardware target, including memory layout, debug probes, or flash programming algorithms.
Example target section:
Parents | Element Chain | ||
---|---|---|---|
project | /package/create/project | ||
Attributes | Description | Type | Use |
Bvendor | Board vendor name. Either a board vendor and board name with optional board revision, or a device vendor and a device name. | xs:string | optional |
Bname | SPecify the board name. Either a board vendor and board name with optional board revision, or a device vendor and a device name. | xs:string | optional |
Bversion | Board version. Either a board vendor and board name with optional board revision, or a device vendor and a device name. | xs:string | optional |
Dvendor | Device vendor name. Either a board vendor and board name with optional board revision, or a device vendor and a device name. | xs:string | optional |
Dname | Device name. Either a board vendor and board name with optional board revision, or a device vendor and a device name. | xs:string | optional |
Pname | Processor instance name. In case of multi-processor devices, this processor ID is required. | xs:string | optional |
Dfpu | Selects the floating point unit option that is active for the project. Note, even if the device implements an FPU, setting Dfpu=0 here, will disable FPU code generation. Use predefined values from the table Device FPU. | DfpuEnum | optional |
Dendian | Selects the endianness to be used for the project. Note that selecting an endianness that is not supported by the device, will result in a build that will not run on the device. Use predefined values from the table DendianEnum. | DendianEnum | optional |
Dmpu | Selects the memory protection unit to be enabled or disabled for the project. Use predefined values from the table Device MPU. | DmpuEnum | optional |
Child Elements | Description | Type | Occurrence |
output | Configure the build output name and type, and specify whether to include debug information. | OutputType | 1..1 |
memory | Specify the memory configuration for this application. Based on the memory layout, the linker script will be generated by the toolchain. | TargetMemoryType | 0..* |
stack | Specify the stack size in bytes allocated by the linker to the application. This element consists of one attribute named <size>. Set the value for this attribute. Only positive numbers are allowed. | StackType | 1..1 |
heap | Specify the heap size in bytes allocated by the linker to the application. This element consists of one attribute named <size>. Set the value for this attribute. Only positive numbers are allowed. | HeapType | 1 |
algorithm | Selects from the list of available flash programming algorithms specified for this device in the corresponding Device Family Pack. Target and RAM memory ranges can be reconfigured from the defaults specified in the device description. | TargetAlgorithmType | 0..* |
debugProbe | Selects and configures the debug probe to be used for this project. | DebugProbeType | 0..* |
Example algorithm element
Parents | Element Chain | ||
---|---|---|---|
target | /package/create/project/target | ||
Attributes | Description | Type | Use |
Pname | Processor name | xs:string | RestrictedString |
name | References the name (without path) of the flash programming algorithm as defined by the DFP. | xs:string | required |
start | Overrides the predefined programming start address of the flash programming algorithm as specified in the DFP. | NonNegativeInteger | optional |
size | Overrides the predefined programming size of the flash programming algorithm as specified in the DFP. | NonNegativeInteger | optional |
RAMstart | Overrides the predefined start address in RAM where the flash programming algorithm is loaded as specified in the DFP. | NonNegativeInteger | optional |
RAMsize | Overrides the predefined RAM size in RAM where the flash programming algorithm is loaded as specified in the DFP. | NonNegativeInteger | optional |
default | Sets this algorithm as the default algorithm for flash programming when the value is set to 1. The defualt value is 0 - false. | xs:boolean | optional |
style | Sets flash programming format. The default value is Keil. Use the predefinde values as listed in the table Algorithm Styles. | AlgorithmStyleType | optional |
parameter | Parameter string passed when invoking the algorithm. | xs:string | optional |
endian | Specify the endianness of the algorithm. Default value is Little-endian. Use the predefined values as listed in the table Endinaness. | DendianEnum | optional |
Specify the attributes of a debug probe.
Example debugProbe element
Parents | Element Chain | ||
---|---|---|---|
target | /package/create/project/target | ||
Attributes | Description | Type | Use |
name | Name of of the debug probe, for example JLink, ULink2, ULinkPro, CMSIS-DAP, or ST-Link. | xs:string | required |
protocol | Select the debug protocol, for example, swd. Use the predefined values listed in the table Debug Protocol Type. | xs:string | required |
coreClock | Clock frequency of the core once the system is initialized. | NonNegativeInteger | required |
tpiuClock | Clock frequency of the TPIU block of the CoreSight debug logic. Only relevant for tracing. | NonNegativeInteger | optional |
Specify the memory layout. The linker script file will be genereted according to these settings.
Example memory element
Parents | Element Chain | ||
---|---|---|---|
target | /package/create/project/target | ||
Attributes | Description | Type | Use |
Pname | Identifies the processor. | RestrictedString | optional |
id | Eunmerated ID of memory. Deprecated since version 1.4.4 | MemoryIDTypeEnum | optional |
name | Reference to the name of the memory as defined by the DFP. | xs:string | required |
start | Overrides the predefined memory start address. | NonNegativeInteger | optional |
size | Overrides the predefined memory size. | NonNegativeInteger | optional |
access | Overrides the predefined access permissions for the memory as specified in the DFP. The default value is r, for 'read' permission. Use the predefined values defined in the table MemoryAccessTypeString. | AccessType | optional |
alias | Reference by 'name' to another memory to express that the same physical memory is mapped at another address. | AccessType | optional |
init | Deprecated; do not use! Ignore!!!. | xs:boolean | optional |
default | Use to define the default memory for the linker. | xs:boolean | optional |
startup | Specify whether the memory is used by the linker for the startup. The default value is 0 - false. | xs:boolean | optional |
Specify the characteristics for the build output file.
Example output element
Parents | Element Chain | ||
---|---|---|---|
target | /package/create/project/target | ||
Attributes | Description | Type | Use |
name | Name of the build output file. | xs:string | required |
type | Select the build target to be lib - library or exe - executable. You can use the wildcard * for | CompilerOutputType | required |
debug | Select whether the output will contain debug information. Use the values 1;0 for true and false. | xs:boolean | required |
This element lists all software components that are selected within the Manage Run-Time Environment.
Example select section:
Parents | Element Chain | ||
---|---|---|---|
project | /package/create/project | ||
Child Elements | Description | Type | Occurrence |
component | Group element for defining the selected software components. | ComponentSelectType | 1..* |
Specify the software components.
Example component element
Parents | Element Chain | ||
---|---|---|---|
select | /package/create/project/select | ||
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. Predefined values can be used as listed in the table Component Classes. | xs:string | required |
Cgroup | Component group name following the taxonomy. Predefined values can be used as listed in the table Component Groups. | 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 |
Child Elements | Description | Type | Occurrence |
file | Specify configuration files from the selected component. | ComponentSelectType | 0..* |
Specify the configuration files for the selected component. These files must already exist in the project folder structure and contain a configuration setup specifically for the project.
Example file element
Parents | Element Chain | ||
---|---|---|---|
component | /package/create/project/select/component | ||
Attributes | Description | Type | Use |
condition | Condition id being used at the time of runtime configuration. | xs:string | optional |
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 Category. | FileAttributeType | optional |
name | File path and name within pack it originates from. | xs:string | required |
version | Version of the configuration file being used in the example. | VersionType | required |
The files section specifies files to be included into the project build that are not managed through software components. Files can be sorted into named groups.
Example files section:
Parents | Element Chain | ||
---|---|---|---|
project | /package/create/project | ||
Child Elements | Description | Type | Occurrence |
file | Specify a file. | ProjectFileType | 0..* |
group | Specify a group of files. | GroupType | 0..* |
Specify files that are not included through software components.
Parents | Element Chain | ||
---|---|---|---|
files | /package/create/project/files | ||
group | /package/create/project/files/.../group | ||
Attributes | Description | Type | Use |
name | Path and name of the file, relative to CPDSC location. | xs:string | required |
category | Type of file, for example, whether the file is a C or assembler file. Use the predefined values from the table File Categories. | FileCategoryType | required |
src | Folder specifying the source code location for a library. | xs:string | optional |
Nesting of groups is supported. It is tool dependent how grouping is represented in the tool, because the grouping of files has no impact on the build by default.
Example files section:
Parents | Element Chain | ||
---|---|---|---|
files | /package/create/project/files | ||
Attributes | Description | Type | Use |
name | name of the group of files | RestrictedString | required |
Child Elements | Description | Type | Occurrence |
file | Specify a file. | ProjectFileType | 0..* |
group | Specify a group (nesting). | GroupType | 0..* |