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 |
The cvavr compiler model models the behavior of a build carried out with CodeVisionAVR.
The process for constructing a CodeSonar project based on a CodeVisionAVR build differs somewhat to that for other tools. In particular, CodeSonar does not observe the CodeVisionAVR build directly: instead, the cvavr compiler model is applied to the CodeVisionAVR project file
The cvavr compiler model models the behavior of a build carried out with CodeVisionAVR.
The process for constructing a CodeSonar project based on a CodeVisionAVR build differs somewhat to that for other tools. In particular, CodeSonar does not observe the CodeVisionAVR build directly: instead, the cvavr compiler model is applied to the CodeVisionAVR project file.
We supply special executable cvavr-null to manage this application. To accumulate CodeSonar project components based on CodeVisionAVR project file P.prj, you will have CodeSonar observe the execution of command:
Note that CodeVisionAVR projects have the same .prj suffixes as the project files generated by CodeSonar, even though they are not otherwise related. To avoid confusion, you may wish to keep the two kinds of .prj file in different locations, add a prefix such as cs_ to your CodeSonar pfiles-name, or choose some other distinguishing mechanism.
To build a CodeSonar project based on CodeVisionAVR project file path/to/projectdir/my_codevision_project.prj, do the following.
| Command Line |
cd
path/to/projectdir
codesonar analyze csproject localhost:7340 cvavr-null.exe -f my_codevision_project.prj |
|---|---|
| Windows Build Wizard |
|
Note: you may experience false positive Null Pointer Dereference warnings if your code includes low-valued but non-null pointers. To eliminate these warnings, set a lower null pointer threshold by adding following rule to an appropriate configuration file: either the general template configuration file, or individual general project configuration files for CodeSonar projects based on CodeVisionAVRbuilds.
NULL_POINTER_THRESHOLD = 1
The following table lists CodeVisionAVR project file arguments that receive additional treatment in the cvavr compiler model.
| Argument | Additional Treatment in Model | ||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 8BitEnums=val | Defines macro _8BIT_ENUMS_=val. | ||||||||||||||||||||||||||||||||
| CharIsUnsigned=val | Defines macro _UNSIGNED_CHAR_=val. | ||||||||||||||||||||||||||||||||
| Chip=val |
Defines macro _CHIP_VAL_=1, where VAL is the upcased version of
val. Depending on
val, may also define an
additional macro:
|
||||||||||||||||||||||||||||||||
| CPUClock=val | Defines macro _MCU_CLOCK_FREQUENCY_=val. | ||||||||||||||||||||||||||||||||
| Fnum=feo | Specifies front end option feo. | ||||||||||||||||||||||||||||||||
| GLCDDisplayIndex=val |
Defines several macros, where the precise set of macros and
values depending on val.
|
||||||||||||||||||||||||||||||||
| HeapSize=val | Defines macro _HEAP_SIZE_=val. | ||||||||||||||||||||||||||||||||
| IncludePathnum=path | Specifies front end option -Ipath. | ||||||||||||||||||||||||||||||||
| IOBitDefinitions=val | Defines macro _IO_BITS_DEFINITIONS_=val. | ||||||||||||||||||||||||||||||||
| MemoryModel=val |
Defines a macro, depending on val:
|
||||||||||||||||||||||||||||||||
| UseFATFS=val | Defines macro _USE_FATFS_=val. | ||||||||||||||||||||||||||||||||
| Symbolnum=macroname | Defines macro macroname=1. |
Predefined macros and include paths are listed below.
| Paths Always Included |
The cvavr compiler model
specifies front end option -Idir for all dir on the
following list that exist on the local system.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Macros Always Defined |
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Conditionally Defined Macros |
Additional defined macros and their values depend on the
contents of the CodeVisionAVR project file.
|
|||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
| Front End Options Always Specified |
|
To report problems with this documentation, please visit https://support.codesecure.com/.