|
|
@@ -438,12 +438,14 @@ The high level structure of a project is constructed from:
|
|
|
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:
|
|
|
-- \ref element_output "output" : Build output options
|
|
|
+- \ref element_output "output" : Build output options
|
|
|
+- \ref element_includes "includes" : List of include paths
|
|
|
+- \ref element_defines "defines" : List of preprocessor definitions
|
|
|
- \ref element_target_cflags "cflags" : C compiler options applied to C modules (category="sourceC").
|
|
|
- \ref element_target_cxxflags "cxxflags" : C++ compiler options applied to C++ modules (category="sourceCpp").
|
|
|
- \ref element_target_asflags "asflags" : Assembler options applied to Assembler modules (category="sourceAsm").
|
|
|
-- \ref element_ldflags "ldflags" : Linker options applied when output attribute type="exe".
|
|
|
-- \ref element_arflags "arflags" : Archiver options applied to Librarian when output attribute type="lib".
|
|
|
+- \ref element_ldflags "ldflags" : Linker options applied when output attribute type="exe".
|
|
|
+- \ref element_arflags "arflags" : Archiver options applied to Librarian when output attribute type="lib".
|
|
|
|
|
|
Note: The compiler referenced by the above command line flags is required to be listed in the \<compilers> section.
|
|
|
|
|
|
@@ -458,6 +460,8 @@ Note: The compiler referenced by the above command line flags is required to be
|
|
|
...
|
|
|
<target Dname="ARMCM0" Dvendor="ARM:82" Dendian="Little-endian">
|
|
|
<output name="Blinky" type="exe" outdir="./Objects intdir="./Listings"/>
|
|
|
+ <includes>./path/to/header/files</includes>
|
|
|
+ <defines>DEF1=1;DEF2=2</defines>
|
|
|
<cflags compiler="AC5" add="-Osize"/>
|
|
|
...
|
|
|
<ldflags compiler="AC5" file="./RTE/Device/ARMCM0/gcc_arm.ld"/>
|
|
|
@@ -566,18 +570,30 @@ Note: The compiler referenced by the above command line flags is required to be
|
|
|
<td>OutputType</td>
|
|
|
<td>1..1</td>
|
|
|
</tr>
|
|
|
+ <tr>
|
|
|
+ <td>\ref element_includes "includes"</td>
|
|
|
+ <td>List of include paths</td>
|
|
|
+ <td>xs:string</td>
|
|
|
+ <td>0..1</td>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>\ref element_defines "defines"</td>
|
|
|
+ <td>List of preprocessor definitions</td>
|
|
|
+ <td>xs:string</td>
|
|
|
+ <td>0..1</td>
|
|
|
+ </tr>
|
|
|
<tr>
|
|
|
<td>\ref element_ldflags "ldflags"</td>
|
|
|
<td>Linker flags used for constructing the effective linker command line</td>
|
|
|
<td>LinkerFlagsType</td>
|
|
|
<td>0..1</td>
|
|
|
+ </tr>
|
|
|
<tr>
|
|
|
<td>\ref element_arflags "arflags"</td>
|
|
|
<td>Archiver command line flags for the toolchain selected by 'compiler' attribute.</td>
|
|
|
<td>ArchiverFlagsType</td>
|
|
|
<td>0..1</td>
|
|
|
</tr>
|
|
|
- </tr>
|
|
|
<tr>
|
|
|
<td>\ref type_toolOptionType "cflags"</td>
|
|
|
<td>Compiler flags for C-modules used for constructing the effective compiler command line</td>
|
|
|
@@ -667,6 +683,63 @@ Specify the build output directories, output file and type (executable vs. libra
|
|
|
|
|
|
\delim
|
|
|
|
|
|
+\section element_includes /cprj/target/includes
|
|
|
+This element specifies a semicolon separated list of include paths that are valid for the compilation of all modules in the project.
|
|
|
+
|
|
|
+\b Example <em>includes</em> element
|
|
|
+\code
|
|
|
+<cprj ...>
|
|
|
+ ...
|
|
|
+ <target Ddsp="NO_DSP" Dendian="Little-endian" Dfpu="NO_FPU" Dmve="NO_MVE" Dname="LPC4357" Dtz="NO_TZ" Dvendor="NXP:11" Pname="Cortex-M4">
|
|
|
+ <output intdir="./Debug/" name="BSD_Client" outdir="./Debug/" type="exe"/>
|
|
|
+ <includes>./path/to/header/files</includes>
|
|
|
+ </target>
|
|
|
+ ...
|
|
|
+</cprj>
|
|
|
+\endcode
|
|
|
+
|
|
|
+<table class="cmtable" summary="Element: includes">
|
|
|
+ <tr>
|
|
|
+ <th>Parents</th>
|
|
|
+ <th colspan="3">Element Chain</th>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>\ref element_target "target"</td>
|
|
|
+ <td colspan="3">\ref element_target</td>
|
|
|
+ </tr>
|
|
|
+</table>
|
|
|
+
|
|
|
+\delim
|
|
|
+
|
|
|
+\section element_defines /cprj/target/defines
|
|
|
+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.
|
|
|
+
|
|
|
+\b Example <em>defines</em> element
|
|
|
+\code
|
|
|
+<cprj ...>
|
|
|
+ ...
|
|
|
+ <target Ddsp="NO_DSP" Dendian="Little-endian" Dfpu="NO_FPU" Dmve="NO_MVE" Dname="LPC4357" Dtz="NO_TZ" Dvendor="NXP:11" Pname="Cortex-M4">
|
|
|
+ <output intdir="./Debug/" name="BSD_Client" outdir="./Debug/" type="exe"/>
|
|
|
+ <defines>DEF1=1;DEF2=2</defines>
|
|
|
+ </target>
|
|
|
+ ...
|
|
|
+</cprj>
|
|
|
+\endcode
|
|
|
+
|
|
|
+<table class="cmtable" summary="Element: defines">
|
|
|
+ <tr>
|
|
|
+ <th>Parents</th>
|
|
|
+ <th colspan="3">Element Chain</th>
|
|
|
+ </tr>
|
|
|
+ <tr>
|
|
|
+ <td>\ref element_target "target"</td>
|
|
|
+ <td colspan="3">\ref element_target</td>
|
|
|
+ </tr>
|
|
|
+</table>
|
|
|
+
|
|
|
+\delim
|
|
|
+
|
|
|
\section element_ldflags /cprj/target/ldflags
|
|
|
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
|