Skip to main content

IAR Embedded Workbench for RX 5.20

The icstat tool

In this section:

Use the icstat tool to perform a C-STAT static analysis on a project, with a previously produced manifest file as input. You produce the manifest file using the ichecks tool.

Invocation syntax for icstat

The invocation syntax for icstat:

icstat parameters [-- command_line]

The different parts are:

Syntax parts

Description

commands

Commands that define an operation to be performed.

options

Command line options that define actions to be performed. These options can be placed anywhere on the command line, but must come before --.

command_line

Compiler or linker command line for the analyze and link_analyze commands.

Table 142. icstat syntax


For an example, see Performing an analysis from the command line.

Summary of icstat commands

This table summarizes the icstat commands:

icstat commands

Description

analyze

Analyzes a source file. The command line must end with a compiler invocation (--).

link_analyze

Analyzes an application. The command line must end with a linker invocation (--).

load

Outputs the analysis messages from the database file.

clear

Clears the database file.

commands cmd

Executes the commands in the cmd file.

Table 143. icstat commands summary


For an example, see Performing an analysis from the command line.

When running icstat with the commands analyze or link_analyze, identified deviations will be listed on stdout on the format:

Severity[check-tag]: message. Alias tags.
Summary of icstat options

This table summarizes the icstat options:

Command line option

Description

--checks

Specifies the manifest file, which contains the checks to perform.

--db

Contains analysis information (mandatory).

--deterministic

Ensures a deterministic amount of messages when running icstat with multiple threads.

--exclude

Excludes file(s) from the analysis.

--fpe

Makes icstat attempt to remove false messages (false positives).

--language_specific_checks

Makes icstat focus on checks specific to the language of the source files.

--parallel

Specifies the number maximum number of threads to use during parallel analysis.

--sarif_dir

Specifies that the output from an analysis should be stored in the SARIF format, and where to store it.

--timeout

Specifies the number of seconds that the analysis of a module is allowed to take before it terminates.

--timeout_check

Specifies the number of seconds that the each check is allowed to take before the analysis terminates.

Table 144. icstat options summary


For more information, see Descriptions of C-STAT options.