The Standard S32DS C Compiler and Standard S32DS C++ Compiler pages allow you to configure C and C++ compiler options for your project.
| Option | Description |
|---|---|
| Command | Command that will be used to run the compiler. Standard S32DS C Compiler default: ${cross_prefix}${cross_c}${cross_suffix}Standard S32DS C++ Compiler default: ${cross_prefix}${cross_cpp}${cross_suffix} |
| All options | Expanded command line options the compiler will be called with. Shows actual values of variables and options according to Command line pattern. Default for Standard S32DS C Compiler: -std=c99 -D__GNU__ -DGNUARM -DCV220X_ -D__LINUX__ -DOSDIR=linux -DARM -D__arm__ -D__ARMV8 -DS32DS_BUILD -DVSDK_UMAT_USE_OPENCV -Ulinux-I"<project_dir>/APU_kernels" -I"<project_dir>/A53_gen/inc" -I"<project_dir>/A53_inc" -I"<project_dir>/APU_gen/src" -I"<project_dir>/graphs" -I"<VSDK_dir>/3rdparty/ocv/linux-arm64/include" -I"<VSDK_dir>/include" -I"<VSDK_dir>/libs/utils/common/include" -I"<VSDK_dir>/libs/utils/umat/include" -I"<VSDK_dir>/libs/utils/sumat/include" -I"<VSDK_dir>/kernels/apu" -I"<VSDK_dir>/libs/utils/oal/user/include" -I"<VSDK_dir>/libs/utils/oal/kernel/include" -I"<VSDK_dir>/libs/io/frame_io/include" -I"<VSDK_dir>/libs/io/dcu/include" -I"<VSDK_dir>/libs/apex/icp/include" -I"<VSDK_dir>/libs/apex/acf/include" -I"<VSDK_dir>/libs/apex/drivers/user/include" -I"<VSDK_dir>/platform/s32_v234" -I"<VSDK_dir>/isp/inc" -I"<VSDK_dir>/libs/isp/cam_generic/kernel/include" -I"<VSDK_dir>/libs/isp/csi/kernel/include" -I"<VSDK_dir>/libs/isp/fdma/kernel/include" -I"<VSDK_dir>/libs/isp/h264dec/kernel/common/include" -I"<VSDK_dir>/libs/isp/h264enc/kernel/include" -I"<VSDK_dir>/libs/isp/jpegdec/kernel/common/include" -I"<VSDK_dir>/libs/isp/sequencer/kernel/include" -I"<VSDK_dir>/libs/isp/viu/user/include" -I"<VSDK_dir>/libs/io/sdi/include" -I"<VSDK_dir>/libs/io/gdi/include" -I"<VSDK_dir>/libs/io/uartlinflex_io/include" -I"<VSDK_dir>/libs/io/framebuffer/user/include/linux" -I"<VSDK_dir>/libs/io/image_camera_io/include" -I"<VSDK_dir>/isp/firmware/inc" -O0 -g3 -pedantic -Wall -c -fmessage-length=0 -ffunction-sections -fdata-sections -fno-builtin -Wno-narrowing -mcpu=cortex-a53 The Standard S32DS C++ Compiler default options differ only in the Dialect part: -std=gnu++11 |
| Command line pattern |
Command line to call the compiler. Default: ${COMMAND} ${FLAGS} ${OUTPUT_FLAG} ${OUTPUT_PREFIX}${OUTPUT} ${INPUTS} |
The Dialect page allows you to configure the compiler to verify your code against the specific standard of C or C++ language when compiling your project.
| Option | Description |
|---|---|
| Language standard | Select the programming language or standard to which the compiler should conform. The following options are possible for Standard S32DS C Compiler:
The following options are possible for Standard S32DS C++ Compiler:
Default: this field is empty Default for Standard S32DS C Compiler in projects with APEX and/or ISP support: ISO C99 (-std=c99) |
| Other dialect flags |
Specify additional command line options.
|
The Preprocessor page allows you to configure the C or C++ preprocessor, that is run on each source file before actual compilation.
| Option | Description |
|---|---|
| Do not search system directories (-nostdinc) |
Skip standard system locations of header files. Select the check box if you do not want the compiler to search the system locations for header files. Only the locations specified on the Includes page will be used to search for the header files. If this check box is not selected, the compiler performs a full search that includes the system locations. By default this check box is not selected. |
| Preprocess only (-E) |
Select the check box if you only want to preprocess source files without running
the compiler. Nothing is done except preprocessing.
Attention: Selecting this option will cause a linker error when you build the
project,because the linker expects an available object file. However, because no
compilation is done when this option is enabled, compiler does not create an
object file.
By default, this check box is not selected. |
| Defined symbols (-D) | Predefined name as a macro. Allows you to specify the substitution strings that the compiler applies to all the assembly-language modules in the build target. Enter just the string portion of a substitution string. The Vision Extension Package prepends the -D token to each string that you enter. For example, entering opt1 x produces this result on the command line: -Dopt1 x. This option is similar to the #define directive, but applies to all assembly-language modules in a build target. Note: Added names are processed in the top-down
order.
Default: __GNU__ GNUARM CV220X_ __LINUX__ OSDIR=linux ARM __arm__ __ARMV8 S32DS_BUILD VSDK_UMAT_USE_OPENCV |
| Undefined symbols (-U) |
Remove definition for a previously defined name. Allows you to cancel any previous definition of name, either built-in or provided with a -D option Default: linux |
The Includes page allows you to specify locations where the compiler should look for include files.
| Option | Description |
|---|---|
| Include paths (-I) |
This option adds the directory to the list of directories to be searched for header files. Directories named by -I are searched before the standard system include directories. If the directory is a standard system include directory, the option is ignored to ensure that the default search order for system directories and the special treatment of system headers are not defeated. This option changes the build target's search order of access paths to start with
the system paths list. The compiler can search #include files in several
different ways. You can also set the search order as follows:
Default: "${ProjDirPath}/APU_kernels" "${ProjDirPath}/A53_gen/inc" "${ProjDirPath}/A53_inc" "${ProjDirPath}/APU_gen/src" "${ProjDirPath}/graphs" "${OPENCV_A53_LINUX_1.3.0_PATH}/ocv/linux-arm64/include" "${VSDK_A53_LINUX_1.3.0_PATH}/include" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/utils/common/include" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/utils/umat/include" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/utils/sumat/include" "${VSDK_A53_LINUX_1.3.0_PATH}/kernels/apu" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/utils/oal/user/include" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/utils/oal/kernel/include" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/io/frame_io/include" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/io/dcu/include" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/apex/icp/include" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/apex/acf/include" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/apex/drivers/user/include" "${VSDK_A53_LINUX_1.3.0_PATH}/platform/s32_v234" "${VSDK_A53_LINUX_1.3.0_PATH}/isp/inc" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/isp/cam_generic/kernel/include" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/isp/csi/kernel/include" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/isp/fdma/kernel/include" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/isp/h264dec/kernel/common/include" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/isp/h264enc/kernel/include" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/isp/jpegdec/kernel/common/include" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/isp/sequencer/kernel/include" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/isp/viu/user/include" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/io/sdi/include" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/io/gdi/include" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/io/uartlinflex_io/include" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/io/framebuffer/user/include/linux" "${VSDK_A53_LINUX_1.3.0_PATH}/libs/io/image_camera_io/include" "${VSDK_A53_LINUX_1.3.0_PATH}/isp/firmware/inc" |
| Include files (-include) |
Use this option to specify the include file search path. Process file as if #include "file"appeared as the first line of the primary source file. However, the first directory searched for file is the preprocessor's working directory instead of the directory containing the main source file. If not found there, it is searched for in the remainder of the #include "..." search chain as normal. If multiple -include options are given, the files are included in the order they appear on the command line. By default this field is empty. |
The Optimization page allows you to configure optimizations run by the compiler during the compilation of your project. Compiler optimization can be applied in either global or non-global optimization mode. You can apply global optimization at the end of the development cycle, after compiling and optimizing all source files individually or in groups.
| Option | Description |
|---|---|
| Optimization level |
Specify the optimizations that you want the C/C++ compiler to apply to the generated object code:
Default: None (-O0) |
| Other optimization flags |
Specifies additional command line options and individual optimization flag. By default, this field is empty. |
|
'char' is signed (-fsigned-char) |
Select to treat char declarations as signed char declarations. This setting is equivalent to -fsigned-char command-line option. By default, this check box is not selected. |
| 'bitfield' is unsigned (-funsigned-bitfields) |
Select to treat bit field as unsigned. By default, a bit field is signed (basic integer types are signed). Select this check box to treat the bit fields as unsigned when they are not explicitly qualified as either unsigned or signed. By default, this check box is not selected. |
| Function sections
(-ffunction-sections) |
Select to place each function into its own section in the binary artifact. Place each function into its own section in the output file if the target supports arbitrary sections. The name of the function determines the section's name in the output file. Use these options on systems where the linker can perform optimizations to improve locality of reference in the instruction space. Most systems using the ELF object format have linkers with such optimizations. By default, this check box is selected. |
| Data sections
(-fdata-sections) |
Select to use short data sections. Place each data item into its own section in the output file if the target supports arbitrary sections. The name of the data item determines the section's name in the output file. Use these options on systems where the linker can perform optimizations to improve locality of reference in the instruction space. Most systems using the ELF object format have linkers with such optimizations. Only use these options when there are significant benefits from doing so. When you specify these options, the assembler and linker create larger object and executable files and are also slower. You cannot use gprof on all systems if you specify this option, and you may have problems with debugging if you specify both this option and -g. By default, this check box is selected. |
| No common uninitialized (-fno-common) |
Select to place uninitialized global variables in the data section of the object file. The -fno-common option specifies that the compiler should place uninitialized global variables in the data section of the object file, rather than generating them as common blocks. This has the effect that if the same variable is declared (without extern) in two different compilations, you get a multiple-definition error when you link them. In this case, you must compile with -fcommon instead. Compiling with -fno-common is useful on targets for which it provides better performance, or if you wish to verify that the program will work on other systems that always treat uninitialized variable declarations this way. By default, this check box is not selected. |
| Do not inline functions
(-fno-inline-functions) |
Select to not consider any functions for inlining, even if they are not declared inline. By default, this check box is not selected. |
| Assume freestanding environment
(-ffreestanding) |
Select to assert that compilation targets a freestanding environment. This implies -fno-builtin. A freestanding environment is one in which the standard library may not exist, and program startup may not necessarily be at main. By default, this check box is not selected. |
| Disable builtin
(-fno-builtin) |
Select to not recognize built-in functions that do not begin with __builtin_ as prefix. By default, this check box is selected. |
| Single precision constants (-fsingle-precision-constant) |
Select to enable single precision constants. Treat floating-point constants as single precision instead of implicitly converting them to double-precision constants. By default, this check box is not selected. |
| Link-time optimizer
(-flto) |
Select to run the standard link-time optimizer. When invoked with source code, it generates GIMPLE (one of GCC's internal representations) and writes it to special ELF sections in the object file. When the object files are linked together, all the function bodies are read from these ELF sections and instantiated as if they had been part of the same translation unit. By default, this check box is not selected. |
| Disable loop invariant move
(-fno-move-loop-invariants) |
Select to disable the loop invariant motion pass in the RTL loop optimizer. Enabled at level -O1. By default, this check box is not selected. |
The Debugging page allows you to configure debugging parameters used by the compiler during the compilation of your project. The specified parameters affect the debugging information that will be available in the resulting build target.
The following table describes the options available on the Debugging page.
| Option | Description |
|---|---|
| Debug Level |
Specify the debug levels:
Default: Maximum (-g3) |
| Other debugging flags |
Specify additional command line options. By default, this field is empty. |
| Generate gcov information
(-ftest-coverage -fprofile-arcs) |
This option tells the compiler to generate additional information needed by gcov (basically a flow graph of the program) and also includes additional code in the object files for generating the extra profiling information needed by gcov. These additional files are placed in the directory where the source code is located. By default, this check box is not selected. |
| Debug format |
Specify the debug formats for the compiler. Use it if you want to control for certain whether to generate the extra information.
Default: Toolchain default. |
The Warnings page allows you to configure warning parameters used by the compiler to display warning messages during the compilation of your project. These parameters allow you to specify what types of warning messages you would like to see output in the console when compiling your project.
The following table describes the options available on the Warnings page.
| Option | Description |
|---|---|
| Check syntax only
(-fsyntax-only) |
Select to check the code for syntax errors, but do not do anything beyond that.
By default, this check box is not selected. |
| Pedantic
(-pedantic) |
Select to issue all the warnings demanded by strict ISO C and ISO C++; reject all
programs that use forbidden extensions, and some other programs that do not follow ISO
C and ISO C++. By default, this check box is selected. |
| Pedantic warnings as errors
(-pedantic-errors) |
Like -pedantic, except that errors are produced rather than
warnings. By default, this check box is not selected. |
| Inhibit all warnings
(-w) |
Select to inhibit all warning messages. By default, this check box is not selected. |
| All warnings
(-Wall) |
Select to enable all the warnings about constructions that some users consider
questionable, and that are easy to avoid (or modify to prevent the warning), even in
conjunction with macros. This also enables some language-specific warnings. By default, this check box is selected. |
| Extra warnings
(-Wextra) |
Select to enable some extra warning flags that are not enabled by
-Wall. By default, this check box is not selected. |
| Warnings as errors
(-Werror) |
Select to make all warnings into hard errors. Source code which triggers warnings
will be rejected. The specifier for a warning is appended. By default, this check box is not selected. |
| Implicit conversions warnings
(-Wconversion) |
Select to warn for any implicit conversions that may change a value. This
includes conversions between real and integer, like abs (x) when x is double;
conversions between signed and unsigned, like unsigned ui = -1; and conversions
to smaller types, like sqrtf (M_PI). Warnings about conversions between signed
and unsigned integers can be disabled by using
-Wno-sign-conversion. By default, this check box is not selected. |
| Warn on uninitialized variables
(-Wuninitialized) |
Select to warn if an automatic variable is used without first being initialized
or if a variable may be clobbered by a setjmp call. These warnings
occur for individual uninitialized or clobbered elements of structure, union or array
variables as well as for variables that are uninitialized or clobbered as a whole.
They do not occur for variables or elements declared volatile. By default, this check box is not selected. |
| Warn on various unused elements
(-Wunused) |
Select to warn if various constructs are unused (parameters, local variables,
functions, labels, typedef locally defined, function parameters). By default, this check box is not selected. |
| Warn if padding is included
(-Wpadded) |
Select to warn if padding is included in a structure, either to align an element
of the structure or to align the whole structure. Sometimes when this happens it is
possible to rearrange the fields of the structure to reduce the padding and so make
the structure smaller. By default, this check box is not selected. |
| Warn if floats are compared as equal
(-Wfloat-equal) |
Select to warn if floating-point values are used in equality comparisons. By default, this check box is not selected. |
| Warn if shadowed variable
(-Wshadow) |
Select to warn whenever a local variable or type declaration shadows another
variable, parameter, type, or class member (in C++), or whenever a built-in function
is shadowed. Note that in C++, the compiler warns if a local variable shadows an
explicit typedef, but not if it shadows a struct/class/enum. By default, this check box is not selected. |
| Warn if pointer arithmetic
(-Wpointer-arith) |
Select to warn about anything that depends on the sizeof a
function type or of void. GNU C assigns these types a size of 1,
for convenience in calculations with void * pointers and pointers
to functions. In C++, warn also when an arithmetic operation involves
NULL. This warning is also enabled by
-Wpedantic. By default, this check box is not selected. |
| Warn if suspicious logical ops
(-Wlogical-op) |
Select to warn about suspicious uses of logical operators in expressions. This
includes using logical operators in contexts where a bit-wise operator is likely to be
expected. By default, this check box is not selected. |
| Warn if struct is returned
(-Wagreggate-return) |
Select to warn if any functions that return structures or unions are defined or
called. (In languages where you can return an array, this also elicits a warning).
By default, this check box is not selected. |
| Warn on undeclared global function (-Wmissing-declaration) |
Select to warn if a global function is defined without a previous declaration. Do
so even if the definition itself provides a prototype. Use this option to detect
global functions that are not declared in header files. By default, this check box is not selected. |
| Other warning flags | Specifies additional command line options. Default: -Wno-narrowing (suppresses the diagnostic of narrowing conversions) |
The Miscellaneous page allows you to configure various auxiliary compiler options not otherwise available on the other pages in the project properties.
The following table describes the options available on the Miscellaneous page.
| Option | Description |
|---|---|
| Other flags |
Specify additional command line options. Default: -c -fmessage-length=0 |
|
Verbose (-v) |
Select to show each command-line that it passes to the shell, along with all progress, error, warning, and informational messages that the tools emit. By default, this check box is not selected. |
|
Support ANSI programs (-ansi) (Standard S32DS C Compiler only) |
Select this option if you want the assembler to operate in strict ANSI mode. In this mode, the compiler strictly applies the rules of the ANSI/ISO specification to all input files. This turns off certain features of GCC that are incompatible with ISO C90 (when compiling C code), or of standard C++ (when compiling C++ code), such as the asm and typeof keywords, and predefined macros such as unix and vax that identify the type of system you are using. It also enables the undesirable and rarely used ISO trigraph feature. For the C compiler, it disables recognition of C++ style ‘//’ comments as well as the inline keyword. By default, this check box is not selected. |
|
Position Independent Code (-fPIC) |
If supported for the target, emit position-independent code, suitable for dynamic linking and avoiding any limit on the size of the global offset table. By default, this check box is not selected. |
|
Save temporary files (--save-temps) |
Select to save temporary intermediate files and place them in the current
directory and name them based on the source file. By default, this check box is not selected. |
|
Generates assembler listing (-Wa, -adhlns="$@.lst") |
Enables the assembler to create a listing file as it compiles assembly language into object code. By default, this check box is not selected. |