CMSIS-Build: /cprj/files

| 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/files

The files section specifies files to be included into the project build that are not managed through software components. Files can be associated with a named group. Grouping is mainly for better visualization in a graphical tool, however commandline flags can also be applied on a group level.

Example files section:

<cprj xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd"/>
...
<components>
...
</components>
<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>
</cprj>

Parents | Element Chain
--- | ---
cprj | /cprj
Child Elements | Description | Type | Occurrence
file | Specify a file. | FileType | 0..*
group | Specify a group name and list member files in subelements. | GroupType | 0..*

# /cprj/files/.../group

The description format allows the nesting of groups. It is up to the tool's implementation how grouping is represented in the user interface. The grouping of files only impacts the build, if the assignment of command line options on a group level is supported.

Example files section:

<cprj xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:noNamespaceSchemaLocation="CPRJ.xsd"/>
...
<files>
<group name="Source">
<group name="C">
<cflags add="-D_MY_DEFINE"/>
<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>
</cprj>

Parents | Element Chain
--- | ---
files | /cprj/files
Attributes | Description | Type | Use
name | name of the group of files | RestrictedString | required
Child Elements | Description | Type | Occurrence
file | Specify a file. | FileType | 0..*
group | Specify a group (nesting). | GroupType | 0..*

# /cprj/files/group/.../cflags

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

See: /cprj/components/component/cflags

# /cprj/files/group/.../cxxflags

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

See: /cprj/components/component/cxxflags

# /cprj/files/group/.../asflags

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

See: /cprj/components/component/asflags

# /cprj/files/.../file

Specify files that are not included through software components.

Parents | Element Chain
--- | ---
files | /cprj/files
group | /cprj/files/.../group
Attributes | Description | Type | Use
name | Path and name of the file, relative to location of the project file. | 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 if included in a subdirectory. | xs:string | optional

# /cprj/files/.../file/cflags

These compiler options are either added or removed from the inherited command line and affect the C-modules that is referenced by the file. This flag can also be added to components and file groups within the description. Note: if the file category attribute is anything but 'sourceC' or 'source' and the file's extension is *.c, the element will be ignored.

See: /cprj/components/component/cflags

# /cprj/files/.../file/cxxflags

These compiler options are either added or removed from the inherited command line and affect the C++-modules that is referenced by the file. This flag can also be added to components and file groups within the description. Note: if the file category attribute is anything but 'sourceCpp' or 'source' and the file extension is *.cpp, the flag will be ignored.

See: /cprj/components/component/cxxflags

# /cprj/files/.../file/asflags

These assembler options are either added or removed from the inherited command line and affect the Assembler module that is referenced by the file. This flag can also be added to components and file groups within the description. Note: if the file category attribute is anything but 'sourceAsm' or 'source' and the file extension is *.s, the flag will be ignored.

See: /cprj/components/component/asflags