JavaScript is not currently enabled, but is required for full CodeSonar manual search and browse functionality.
If you are viewing this file in your hub's Web GUI, enable JavaScript in your browser: you will also need it for GUI functionality.
If you opened this file directly from disk, your browser may be directly suppressing JavaScript functionality: certain browsers perform this suppression on local files (but not files delivered by web servers) for security reasons.
| CodeSonar® 9.2p0 | CONFIDENTIAL | CodeSecure Inc |
CodeSonar provides two TI CodeComposer compiler models.
| Compiler model |
Modeled native compiler | Source file extensions | Description | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| cl6x | cl6x | .c, .C, .cc, .cpp, .cxx |
Texas Instruments TMS320C6000 Optimizing C/C++ Compiler.
Also suitable for use with the following Texas Instruments compilers.
|
||||||||||
| cl30 | cl30 | .c, no extension | Texas Instruments TMS320C3x/C4x Optimizing Compiler. |
| Platform Availability | The cl30 and cl6x compiler models are available for all platforms. | ||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Default Recognition/Handling | By default, compilations
are recognized and handled as follows.
|
||||||||||||||||||||||||
| Specifying Additional Mappings | On other platforms, use the COMPILER_MODELS configuration file parameter
to instruct CodeSonar to use the required compiler
models:
COMPILER_MODELS += cl30 -> cl30 COMPILER_MODELS += cl6x -> cl6x COMPILER_MODELS += armcl -> cl6x COMPILER_MODELS += cl430 -> cl6x COMPILER_MODELS += cl470 -> cl6x COMPILER_MODELS += cl55 -> cl6x COMPILER_MODELS += cl2000 -> cl6x |
For full details of all native compilers recognized by CodeSonar by default, see section Compilers Recognized by CodeSonar.
Command arguments can be specified on the command line, in files specified with -@, and in environment variables:
| compiler | environment variable |
|---|---|
| cl6x | C6X_C_OPTION * |
| armcl | TI_ARM_C_OPTION * |
| cl430 | MSP430_C_OPTION * |
| cl470 | C_OPTION |
| cl55 | C55X_C_OPTION * |
| cl2000 | C2000_C_OPTION * |
[*] For cl6x, armcl, cl430, cl55, and cl2000: if the compiler-specific environment variable is empty or not defined, C_OPTION is used instead.
The following command arguments are interpreted by the cl6x compiler model. All others are silently ignored by the model. All these options are passed to the front end unless specifically noted.
| Argument | Alternative | Additional Treatment in Model |
|---|---|---|
| --asm_file
file --asm_file=file |
-fa
file -fa=file -fafile |
Not passed to front end, no special treatment in model. |
| --ap_file
file --ap_file=file |
-fl
file -fl=file -flfile |
Not passed to front end, no special treatment in model. |
| --auto_inline
val --auto_inline=val |
-oifile -oi=file -oifile |
Not passed to front end, no special treatment in model. |
| --c89 | (n/a) | Specifies front end option --c89, provided the modeled compilation is in C mode. |
| --c99 | (n/a) | Specifies front end option --c99, provided the modeled compilation is in C mode. |
| --c++03 | (n/a) | Specifies front end option --c++03, provided the modeled compilation is in C++ mode. |
| --c++14 | (n/a) | Specifies front end option --c++14, provided the modeled compilation is in C++ mode. |
| --c_extensionext --c_extension=ext |
-ec ext -ec=ext -ecext |
Changes the set of file extensions associated with C source files to {.ext, .c}. |
| --c_file
file --c_file=file |
-fc
file -fc=file -fcfile |
file will be treated as a C source file. This option is not passed through to the front end. |
| --cmd_file
file --cmd_file=file |
-@ file -@=file -@file |
Extracts the options specified in file and appends them to the command line. |
| --cpp_default | -fg | Treat all source files with C extensions as if they are C++ source files. |
| --cpp_extensionext --cpp_extension=ext |
-ep ext -ep=ext -epext |
Changes the set of file extensions associated with C++ source files to {.ext, .C, .cpp, .cxx, .cc}. |
| --cpp_file
file --cpp_file=file |
-fp
file -fp=file -fpfile |
file will be treated as a C++ source file. This option is not passed through to the front end. |
| --define
m --define=m |
-D m -D=m -Dm |
Defines macro m to 1. All instances of -D on the command line are processed before any -U options. |
| --define m=def | -Dm=def | Defines macro m to def. All instances of -D on the command line are processed before any -U options. |
| --embedded_cpp | -pe | Not passed to front end, no special treatment in model. |
| --exceptions | (n/a) | Specifies front end option --exceptions, provided the modeled
compilation is in C++ mode. (In all other C++ cases, specifies
--no_exceptions.) |
| --gcc | (n/a) | Specifies front end option --gcc, provided the modeled
compilation is in C mode. Supersedes additional treatment due to
previous occurrences of --kr-compatible, --relaxed_ansi,
or --strict_ansi. |
| --include-path
dir --include-path=dir |
-I dir -I=dir -Idir |
Appends directory dir to the list of directories searched for include files. |
| --kr_compatible | -pk | Specifies front end option --old_c, provided the modeled compilation is in C mode. Supersedes additional treatment due to previous occurrences of --gcc, --relaxed_ansi, or --strict_ansi. |
| --no_inlining | -pi | Not passed to front end, no special treatment in model. |
| --obj_file
file --obj_file=file |
-fo
file -fo=file -fofile |
file will be treated as an object file. This option is not passed through to the front end. |
| --opt_level --opt_level=level |
-O -O=level -Olevel |
Defines macro _INLINE (unless --no_inlining/-pi is also specified). |
| --rtti | -rtti | Specifies front end option --rtti, provided the modeled compilation is in C++ mode. (In all other C++ cases, specifies --no_rtti.) |
| --silicon_version
version --silicon_version=version |
-mv
version -mv=version -mvversion -v version -v=version -vversion |
Affects compiler-specific macro settings for cl6x, cl2000, cl430. |
| --relaxed_ansi | -pr | Supersedes additional treatment due to previous occurrences
of --gcc, --kr-compatible,
or --strict_ansi. |
| --strict_ansi | -ps | Specifies front end option --strict, provided the modeled
compilation is in C mode. Supersedes additional treatment due to
previous occurrences of --gcc, --kr-compatible, or --relaxed_ansi. |
| --undefine
m --undefine=m |
-U m -U=m -Um |
Undefines macro m. -U options are evaluated after all -D options. |
If any of the following are specified for a compiler invocation, CodeSonar will ignore the compilation and will not generate any corresponding internal representation. If a CodeSonar project is based only on ignored compilations, it will have no contents and so will not be finalized.
The cl6x compiler model will specify C/C++ version-related front end options in the following cases.
| Condition | Front end option specified |
|---|---|
| Command line option --c99 specified. | --c99 |
| [C++ only] Native compiler is cl6x with version string 8003000 or later. | --c++14 |
[C++ only] Native compiler is armcl with version string
18001000 or later. |
--c++14 |
[C++ only] Native compiler is cl2000 with version string
18001000 or later. |
--c++14 |
[C++ only] Native compiler is cl430 with version string
18001000 or later. |
--c++14 |
The cl6x compiler model defines various macros in addition to the standard CodeSonar predefined macros. It also specifies various front end options.
| Include Paths |
As specified with command arguments of the form -ipath, and environment
variable that depends on the compiler:
|
||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
MacrosThe cl6x compiler model attempts to invoke the native compiler to extract its predefined macros so they can be used for the modeled compilation. For some macros (indicated below) the model provides default settings when this invocation is unsuccessful. |
|||||||||||||||||||
| Macros Always Defined, all modeled compilers |
The following macros are defined for all uses of the
cl6x compiler model.
|
||||||||||||||||||
| Conditionally Defined Macros, all modeled compilers |
|
||||||||||||||||||
| Compiler-Specific Macros for cl6x |
If the native compiler invocation is unsuccessful, the
following macro defaults are defined when using the
cl6x model with the
cl6x compiler.
|
||||||||||||||||||
| Compiler-Specific Macros for armcl |
If the native compiler invocation is unsuccessful, the
following macro defaults are defined when using the
cl6x model with the
armcl compiler.
|
||||||||||||||||||
| Compiler-Specific Macros for cl2000 |
If the native compiler invocation is unsuccessful, the
following macro defaults are defined or conditionally defined
when using the cl6x model with
the cl2000 compiler.
|
||||||||||||||||||
| Compiler-Specific Macros for cl430 |
If the native compiler invocation is unsuccessful, the
following macro defaults are defined or conditionally defined
when using the cl6x model with
the cl430 compiler.
|
||||||||||||||||||
| Compiler-Specific Macros for cl470 |
If the native compiler invocation is unsuccessful, the
following macro defaults are defined when using the
cl6x model with the
cl470 compiler.
|
||||||||||||||||||
| Compiler-Specific Macros for cl55 |
If the native compiler invocation is unsuccessful, the
following macro default is defined when using the cl6x model with the cl55 compiler.
|
||||||||||||||||||
Front End Options |
|||||||||||||||||||
| Conditionally Specified Front End
Options, all modeled compilers |
|
||||||||||||||||||
| Compiler-Specific Front End Options for cl6x |
The following front end options are conditionally specified
when using the cl6x model with
the cl6x compiler.
|
||||||||||||||||||
| Compiler-Specific Front End Options for armcl |
The following front end options are conditionally specified
when using the cl6x model with
the armcl compiler.
|
||||||||||||||||||
| Compiler-Specific Front End Options for cl2000 |
The following front end options are conditionally specified
when using the cl6x model with
the cl2000 compiler.
|
||||||||||||||||||
| Compiler-Specific Front End Options for cl430 |
The following front end options are specified when using the
cl6x model with the
cl430 compiler.
|
||||||||||||||||||
| Compiler-Specific Front End Options for cl470 | n/a | ||||||||||||||||||
| Compiler-Specific Front End Options for cl55 | n/a | ||||||||||||||||||
Command arguments can be specified on the command line, in files specified with -@, and in environment variable C_OPTION.
The following command arguments are interpreted by the cl30 compiler model. All others are silently ignored by the model. All these options are passed to the front end unless specifically noted.
| Argument | Additional Treatment in Model |
|---|---|
| -@file -@ file |
Extracts the options specified in file and appends them to the command line. |
| -dm | Defines macro m to 1. |
| -dm=def | Defines macro m to def. |
| -faval -fa val |
Not passed to front end, no special treatment in model. |
| -fcval -fcval |
file will be treated as a C source file. This option is not passed through to the front end. |
| -fofile -fo file |
file will be treated as an object file. This option is not passed through to the front end. |
| -idir | Appends directory dir to the list of directories searched for include files. |
| -mb | Defines macro _BIGMODEL. |
| -mr | Defines macro _REGPARM. |
| -tf | Specifies front end option --ti_relaxed_prototype. |
| -tp | Specifies front end option --ti_relaxed_type. |
| -um | Undefines macro m. |
| -vproc | Defines several macros: see below. |
| -x2 | Defines macro _INLINE. |
If any of the following are specified for a compiler invocation, CodeSonar will ignore the compilation and will not generate any corresponding internal representation. If a CodeSonar project is based only on ignored compilations, it will have no contents and so will not be finalized.
The cl30 compiler model defines the following macros in addition to the standard CodeSonar predefined macros.
| Include Paths | As specified with command arguments of the form -ipath, and environment variable C_DIR. | ||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Macros Always Defined |
|
||||||||||||||||||
| Conditionally Defined Macros |
|
To report problems with this documentation, please visit https://support.codesecure.com/.