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
C and C++


The Keil Compiler Models

CodeSonar provides the c51 and c251 compiler models for the Keil C51 and C251 C compilers, respectively.

For the Keil MDG-ARM Microcontroller Development Kit C/C++ Compiler, use the armcc compiler model



Overview

The following file extensions are supported:

Compiler model Modeled native compiler Source file extensions (case-insensitive)
c51 Keil C51 C Compiler C source file: .c
C++ source file: .cpp, .cxx
c251 Keil C251 C Compiler C source file: .c
C++ source file: .cpp, .cxx

Availability

Platform Availability The c51 and c251 compiler models are available for Windows only.
Default Recognition/Handling By default, compilations are recognized and handled as follows.
Platform Native Compiler Model Used
Windows only c251.exe c251
Windows only c51.exe c51
Specifying Additional Mappings If your compiler executable has a different name, specify a corresponding COMPILER_MODELS rule to map your executable name to the c51 or c251 model.

For full details of all native compilers recognized by CodeSonar by default, see section Compilers Recognized by CodeSonar.

Model Behavior

Model-Specific ABI Key Format There is no model-specific ABI key format for the c51 and c251 compiler models.
Compilation Mode Compilation mode for each source file is determined from the file extension as described above. Source files with other extensions are ignored.
Include paths Include paths will be:
  • c51_install_path/../INC , where c51_install_path is considered to be the parent of the directory containing the compiler executable, and
  • each dir listed in the value of environment variable C51INC (for c51 model) / C251INC (for c251 model), and
  • each dir specified with compiler directive INCDIR(dir).
Preinclude path The model will specify --preinclude $CSONAR/csurf/csinclude/cs51_builtins.h unless environment variable CS_NO_C51_BUILTINS is defined.
(Where $CSONAR is the CodeSonar installation directory.)
Environment Variables Environment variables and their values are determined from the system environment (that is, the environment in which CodeSonar is invoked).
 

To report problems with this documentation, please visit https://support.codesecure.com/.