CMSIS-Pack  Version 1.5.0
Delivery Mechanism for Software Packs
 All Pages
Project Description (*.cpdsc) Format

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:

  • CMSIS Run-Time Environment configuration (RTE)
  • Project build, including linker script generation
  • Flash programming
  • Basic configuration of debug probs

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.

Definition of CMSIS project

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):

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PACK.xsd">
<vendor>Keil</vendor>
<name>STM32F407_Flash</name>
<description>CMSIS RTOS Blinky for STM32F407 microcontroller using Keil 'MCBSTM32F400 Evaluation Board.</description>
<url>www.keil.com/pack/Keil.STM32F4xx_DFP.pdsc</url>
<releases>
<release version="5.25.1">Generated 2018-02-20T09:10:26</release>
</releases>
<requirements>
<packages>
<package name="CMSIS" vendor="ARM"/>
<package name="MDK-Middleware" vendor="Keil"/>
<package name="STM32F4xx_DFP" vendor="Keil"/>
</packages>
</requirements>
<create>
<project>
<target Ddsp="NO_DSP" Dendian="Little-endian" Dfpu="SP_FPU" Dname="STM32F407IGHx" Dtz="NO_TZ" Dvendor="STMicroelectronics:13">
<output debug="1" name="Blinky" type="exe"/>
<debugProbe coreClock="10000000" name="ULINK2" protocol="swd"/>
<memory access="rx" default="1" name="IROM1" size="0x100000" start="0x8000000" startup="1"/>
<memory access="rw" default="1" init="1" name="IRAM1" size="0x20000" start="0x20000000"/>
<memory access="rw" default="0" init="1" name="IRAM2" size="0x10000" start="0x10000000"/>
</target>
<select>
<component Cclass="CMSIS" Cgroup="CORE" Cvendor="ARM"/>
<component Cclass="CMSIS" Cgroup="RTOS" Csub="Keil RTX" Cvendor="ARM">
<file attr="config" category="source" name="CMSIS/RTOS/RTX/Templates/RTX_Conf_CM.c" version="4.70.1"/>
</component>
<component Cbundle="MCBSTM32F400" Cclass="Board Support" Cgroup="A/D Converter" Cvendor="Keil"/>
<component Cbundle="MCBSTM32F400" Cclass="Board Support" Cgroup="Buttons" Cvendor="Keil"/>
<component Cbundle="MCBSTM32F400" Cclass="Board Support" Cgroup="LED" Cvendor="Keil"/>
<component Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil">
<file attr="config" category="header" name="CMSIS/Driver/Config/RTE_Device.h" version="2.4.4"/>
<file attr="config" category="header" name="MDK/Templates/Inc/stm32f4xx_hal_conf.h" version="1.6.0"/>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="ADC" Cvendor="Keil"/>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="Common" Cvendor="Keil"/>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="Cortex" Cvendor="Keil"/>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="DMA" Cvendor="Keil"/>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="GPIO" Cvendor="Keil"/>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="PWR" Cvendor="Keil"/>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="RCC" Cvendor="Keil"/>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil">
<file attr="config" category="source" condition="STM32F407xx_ARMCC" name="Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/arm/startup_stm32f407xx.s" version="2.6.0"/>
<file attr="config" category="source" name="Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c" version="2.6.0"/>
</component>
</select>
<files>
<group name="Source Files">
<file category="sourceC" name="./Blinky.c"/>
<file category="sourceC" name="./Thread_LED.c"/>
<file category="sourceC" name="./Thread_ADC.c"/>
</group>
<group name="Documentation">
<file category="doc" name="./Abstract.txt"/>
</group>
</files>
</project>
</create>
</package>

CPDSC top level structure

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.

/package (for CPDSC)

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.

 


/package/create

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..*

 


/package/create/project

This element bundles one project.

Example project section:

<?xml version="1.0" encoding="UTF-8" standalone="no" ?>
<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PACK.xsd">
...
<create>
<project name="STM32F429_Flash" documentation="./Abstract.txt">
<target Dendian="Little-endian" Dfpu="SP_FPU" Dname="STM32F429ZITx" Dvendor="STMicroelectronics:13">
...
</target>
<select>
...
</select>
<files>
...
</files>
</project>
</create>
</package>


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

 


/package/create/project/target

This element describes the hardware target, including memory layout, debug probes, or flash programming algorithms.

Example target section:

<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PACK.xsd"/>
...
<create>
<project>
...
<target Dendian="Little-endian" Dfpu="SP_FPU" Dname="STM32F429ZITx" Dvendor="STMicroelectronics:13">
<output debug="1" name="Blinky" type="exe"/>
<debugProbe coreClock="10000000" name="ST-Link" protocol="swd"/>
<memory access="rx" default="1" name="IROM1" size="0x200000" start="0x8000000" startup="1"/>
<memory access="rw" default="1" init="1" name="IRAM1" size="0x30000" start="0x20000000"/>
<memory access="rw" default="0" init="1" name="IRAM2" size="0x10000" start="0x10000000"/>
</target>
...
</project>
</create>
</package>


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..*

 


/package/create/project/target/algorithm

Example algorithm element

...
<project name="STM32F429_Flash" documentation="./Abstract.txt">
<target Dendian="Little-endian" Dfpu="SP_FPU" Dname="STM32F429ZITx" Dvendor="STMicroelectronics:13">
...
<algorithm name="CMSIS/Flash/STM32F4xx_1024.FLM" start="0x08000000" size="0x100000" RAMstart=0x20000000 RAMsize=0x1000/>
...
</target>
</project>
...


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

 


/package/create/project/target/debugProbe

Specify the attributes of a debug probe.

Example debugProbe element

...
<project name="STM32F429_Flash" documentation="./Abstract.txt">
<target Dendian="Little-endian" Dfpu="SP_FPU" Dname="STM32F429ZITx" Dvendor="STMicroelectronics:13">
...
<debugProbe coreClock="10000000" name="ST-Link" protocol="swd"/>
...
</target>
</project>
...


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

 


/package/create/project/target/memory

Specify the memory layout. The linker script file will be genereted according to these settings.

Example memory element

...
<project name="STM32F429_Flash" documentation="./Abstract.txt">
<target Dendian="Little-endian" Dfpu="SP_FPU" Dname="STM32F429ZITx" Dvendor="STMicroelectronics:13">
...
<memory access="rx" default="1" name="IROM1" size="0x200000" start="0x8000000" startup="1"/>
<memory access="rw" default="1" init="1" name="IRAM1" size="0x30000" start="0x20000000"/>
<memory access="rw" default="0" init="1" name="IRAM2" size="0x10000" start="0x10000000"/>
...
</target>
</project>
...


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

 


/package/create/project/target/output

Specify the characteristics for the build output file.

Example output element

<project name="STM32F429_Flash" documentation="./Abstract.txt">
<target Dendian="Little-endian" Dfpu="SP_FPU" Dname="STM32F429ZITx" Dvendor="STMicroelectronics:13">
<output debug="1" name="Blinky" type="exe"/>
...
</target>
...
</project>


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

 


/package/create/project/select

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

Example select section:

<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PACK.xsd"/>
...
<create>
<project>
...
<select>
<component Cclass="CMSIS" Cgroup="Core" Cvendor="ARM" Cversion="4.1.0"/>
<component Cclass="CMSIS" Cgroup="RTOS" Csub="Keil RTX" Cvendor="ARM" Cversion="4.78.0">
<file attr="config" category="source" name="CMSIS/RTOS/RTX/Templates/RTX_Conf_CM.c" version="4.70.1"/>
</component>
<component Cbundle="STM32F429I-Discovery" Cclass="Board Support" Cgroup="Buttons" Cvendor="Keil" Cversion="1.0.0"/>
<component Cbundle="STM32F429I-Discovery" Cclass="Board Support" Cgroup="LED" Cvendor="Keil" Cversion="1.0.0"/>
<component Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.4.0">
<file attr="config" category="header" name="CMSIS/Driver/Config/RTE_Device.h" version="2.3.1"/>
<file attr="config" category="header" name="MDK/Templates/Inc/stm32f4xx_hal_conf.h" version="1.4.2"/>
</component>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="Common" Cvendor="Keil" Cversion="1.4.0"/>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="Cortex" Cvendor="Keil" Cversion="1.4.0"/>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="GPIO" Cvendor="Keil" Cversion="1.4.0"/>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="PWR" Cvendor="Keil" Cversion="1.4.0"/>
<component Cclass="Device" Cgroup="STM32Cube HAL" Csub="RCC" Cvendor="Keil" Cversion="1.4.0"/>
<component Cclass="Device" Cgroup="Startup" Cvendor="Keil" Cversion="2.4.0">
<file attr="config" category="source" condition="STM32F429xx_ARMCC" name="Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/arm/startup_stm32f429xx.s" version="2.4.2"/>
<file attr="config" category="source" name="Drivers/CMSIS/Device/ST/STM32F4xx/Source/Templates/system_stm32f4xx.c" version="2.4.2"/>
</component>
</select>
...
</project>
</create>
</package>


Parents Element Chain
project /package/create/project
Child Elements Description Type Occurrence
component Group element for defining the selected software components. ComponentSelectType 1..*

 


/package/create/project/select/component

Specify the software components.

Example component element

...
<select>
<component Cclass="CMSIS" Cgroup="Core" Cvendor="ARM" Cversion="4.1.0"/>
<component Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.4.0">
<file attr="config" category="header" name="CMSIS/Driver/Config/RTE_Device.h" version="2.3.1"/>
<file attr="config" category="header" name="MDK/Templates/Inc/stm32f4xx_hal_conf.h" version="1.4.2"/>
</component>
</select>
...


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..*

 


/package/create/project/select/component/file

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

...
<component Cclass="Device" Cgroup="STM32Cube Framework" Csub="Classic" Cvendor="Keil" Cversion="1.4.0">
<file attr="config" category="header" name="CMSIS/Driver/Config/RTE_Device.h" version="2.3.1"/>
<file attr="config" category="header" name="MDK/Templates/Inc/stm32f4xx_hal_conf.h" version="1.4.2"/>
</component>
...


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

 


/package/create/project/files

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:

<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PACK.xsd"/>
...
<create>
<project>
<files>
<group name="Source Files">
<file category="sourceC" name="./Blinky.c"/>
<file category="sourceC" name="./Thread_LED.c"/>
</group>
<group name="Documentation">
<file category="doc" name="./Abstract.txt"/>
</group>
</files>
</project>
</create>
</package>


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..*

 


/package/project/create/files/.../file

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

 


/package/create/project/files/.../group

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:

<package xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="PACK.xsd"/>
...
<create>
<project>
<files>
<group name="Source">
<group name="C">
<file category="sourceC" name="./Blinky.c"/>
<file category="sourceC" name="./Thread_LED.c"/>
</group>
<group name="ASM">
<file category="sourceAsm" name="./startup_add.s"/>
</group>
</group>
<group name="Documentation">
<file category="doc" name="./Abstract.txt"/>
</group>
</files>
</project>
</create>
</package>


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..*