CMSIS-Build
Tools, software frameworks, and work flows for productivity with CMSIS based projects
|
This element describes the hardware target, build output and command line options for a specific compiler tool-chain. These settings are applied to all modules of the project. The C/C++ and assembler flags can be refined for components, files. The following elements are available:
Note: The compiler referenced by the above command line flags is required to be listed in the <compilers> section.
Example target section:
Parents | Element Chain | ||
---|---|---|---|
cprj | /cprj | ||
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 |
Dsecure | Selects the software model for code generation on arm TrustZone-M enabled devices. Use predefined values from the table Dsecure | DsecureEnum | optional |
Dmve | Selects the code generation to utilize the Corex-M Vector Extensions (MVE) on devices with this features Use predefined values from the table Dmve | DmveEnum | optional |
Child Elements | Description | Type | Occurrence |
output | Configure the build output name and type, and specify whether to include debug information. Required if type="exe". | OutputType | 1..1 |
includes | List of include paths | xs:string | 0..1 |
defines | List of preprocessor definitions | xs:string | 0..1 |
ldflags | Linker flags used for constructing the effective linker command line | LinkerFlagsType | 0..1 |
arflags | Archiver command line flags for the toolchain selected by 'compiler' attribute. | ArchiverFlagsType | 0..1 |
cflags | Compiler flags for C-modules used for constructing the effective compiler command line | ToolOptionType | 0..1 |
cxxflags | Compiler flags for C++ modules used for constructing the effective compiler command line | ToolOptionType | 0..1 |
asflags | Assembler flags for assembler modules used for constructing the effective assembler command line | ToolOptionType | 0..1 |
arflags | Archiver flags for the archiver which creates library files. Constructing the effective assembler command line | ToolOptionType | 0..1 |
Specify the build output directories, output file and type (executable vs. library).
Example output element
Parents | Element Chain | ||
---|---|---|---|
/cprj/target target | /cprj/target | ||
Attributes | Description | Type | Use |
name | Name of the build output file to be generated. | xs:string | required |
type | Select the build target to be lib - library or exe - executable | CompilerOutputType | required |
intdir | Relative path of the folder containing intermediate files (such as object files). | xs:string | optional |
outdir | Relative path of the output folder containing the executable binaries. | xs:string | optional |
This element specifies a semicolon separated list of include paths that are valid for the compilation of all modules in the project.
Example includes element
Parents | Element Chain | ||
---|---|---|---|
target | /cprj/target |
This element specifies a semicolon separated list of preprocessor definitions that are valid for all project modules undergoing preprocessing. Key/value pairs are separated by the equal sign.
Example defines element
Parents | Element Chain | ||
---|---|---|---|
target | /cprj/target |
This element specifies strings of commandline options for the linker of the tool-chain selected by the attribute 'compiler'. A linker script file shall be specified using the attribute 'file'. Note that this option only takes effect if the type specified in the output tag is set to "exe".
Example ldflags element
Parents | Element Chain | ||
---|---|---|---|
target | /cprj/target | ||
Attributes | Description | Type | Use |
compiler | selects the compiler the contained information is targeted at. Choose from available list: GCC, AC5, AC6, IAR, Tasking, GHS, Cosmic, G++ | CompilerEnumType | required |
add | commandline options to be added to the command line of the respective tool. | xs:string | optional |
This element specifies a string of commandline options for the archiver of the tool-chain selected by the attribute 'compiler'. Note that this option only takes effect if the type specified in the output tag is set to "lib".
Example arflags element
Parents | Element Chain | ||
---|---|---|---|
target | /cprj/target | ||
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 command line of the archiver of the selected compiler tool-chain. | xs:string | required |
These additional compiler options affect all C modules contained in the project description unless particular settings are 'removed' on a lower level (component, group, file).
Example cflags element
Parents | Element Chain | ||
---|---|---|---|
target | /cprj/target | ||
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 command line of the compiler invoked for C-modules specific the selected compiler tool-chain. | xs:string | required |
These additional compiler options affect all C++ modules contained in the project description unless particular settings are 'removed' on a lower level (component, group, file).
Example cxxflags element
Parents | Element Chain | ||
---|---|---|---|
target | /cprj/target | ||
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 command line of the compiler invoked for C++-modules specific the selected compiler tool-chain. | xs:string | required |
These additional assembler options affect all Assembler modules contained in the project description unless particular settings are 'removed' on a lower level (component, group, file).
Example asflags element
Parents | Element Chain | ||
---|---|---|---|
target | /cprj/target | ||
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 command line of the assembler invoked for Assembler-modules specific the selected compiler tool-chain. | xs:string | required |
use | selects legacy assembler to be invoked in place of the default assembler for a given tool-chain. Currently supported values: armasm (AC6), gas (GCC) | xs:string | optional |