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 Hi-Tech Compiler Model



Overview

Compiler
model
Modeled native compiler Source file extensions Description
picc picc .c Hi-Tech C Compiler

Availability

Platform Availability The picc compiler model is available for all platforms.
Default Recognition/Handling By default, compilations are recognized and handled as follows.
Platform Native Compiler Model Used
Windows only picc.exe picc
Specifying Additional Mappings On other platforms, use the COMPILER_MODELS configuration file parameter to instruct CodeSonar to use the Hi-Tech compiler model:
COMPILER_MODELS += picc -> picc

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

Command Arguments

The following command arguments are interpreted by the picc compiler model. All others are silently ignored by the model. Unless otherwise specified, all arguments are passed through to the front end.

Argument
(case-insensitive)
Additional Treatment in Model
@file Extracts the options specified in file and appends them to the command line. The @ argument is not passed to the front end.
--CHAR=charkind If charkind is nonempty, specifies front end option --signed_chars. (In all other cases, specifies --unsigned_chars.) The --CHAR argument is not passed to the front end.
--CHIP=chipkind If chipkind is nonempty, it is used to help determine the predefined macros and include paths.
-Dmacro Defines macro macro to 1.
-Dmacro=defn Defines macro macro with defn as its definition. All instances of -D on the command line are processed before any -U options.
-Idir Appends directory dir to the list of directories searched for include files.
-Ooname Uses oname as the basename for the output file or files. The -O argument is not passed to the front end.
--SETOPTIONcpp,fname Extract -D, -I, and -U directives from the file named fname.
--STRICT Specifies front end option --hitech_strict. The --STRICT argument is not passed to the front end.
-Umacro Undefines macro macro. -U options are evaluated after all -D options.

No CodeSonar Build

If any of the following are specified, 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.

(Options are case-insensitive.)

Predefined Macros and Include Paths

When the Hi-Tech compiler model is used, it invokes picc to extract the location of its configuration files, and uses this to set up the include path and predefined macros.

Hi-Tech Language Extensions

The following table describes the C language extensions supported by the Hi-Tech compiler, and the treatment of those extensions in the compiler model.

  Hi-Tech Extension Compiler Model Action(s)
Types Built-in type bit. Treats entities of type bit as if they have type char.
Numbers Numbers can be expressed in binary notation. For example, 21 can be expressed as 0b10101. Scans binary numbers and interprets them correctly.
Absolute Variables Variables can be declared with absolute addresses. For example:
int x @ 0x06;
The address is scanned and ignored
Assertions Assert statements are supported, with form
#assert condition
Scans statement, checks condition, issues an error error if condition is not met.
Assembly Code Assembly code blocks may be included in programs, delimited by #asm and #endasm. Ignores everything in a #asm...#endasm block.
Keywords Several additional keywords are supported, see below for details.

Additional Keywords

The additional keywords supported by the Hi-Tech compiler are:

The compiler model scans and ignores these keywords.

The Hi-Tech compiler does not implement all additional keywords for all chips, and programmers in some environments might therefore use identifiers that in other environments would be interpreted as keywords. If this is the case, use the --hitech_disable_keyword front end option to instruct the compiler model to treat the identifiers appropriately,

 

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