Main Content

Sfr type support (-sfr-types)

Specify sizes of sfr types for code developed with Keil or IAR compilers

Description

Specify sizes of sfr types (types that define special function registers).

Set Option

User interface (desktop products only): In your project configuration, the option is on the Target & Compiler node. See Dependency for other options you must also enable.

Command line and options file: Use the option -sfr-types. See Command-Line Information.

Why Use This Option

Use this option if you have statements such as sfr addr = 0x80; in your code. sfr types are not standard C types. Therefore, you must specify their sizes explicitly for the Polyspace® analysis.

Settings

No Default

List each sfr name and its size in bits.

Dependency

This option is available only when Compiler (-compiler) is set to keil or iar.

Command-Line Information

Syntax: -sfr-types sfr_name=size_in_bits,...
No Default
Name Value: an sfr name such as sfr16.
Size Value: 8 | 16 | 32
Example (Bug Finder): polyspace-bug-finder -lang c -compiler iar -sfr-types sfr=8,sfr16=16 ...
Example (Code Prover): polyspace-code-prover -lang c -compiler iar -sfr-types sfr=8,sfr16=16 ...
Example (Bug Finder Server): polyspace-bug-finder-server -lang c -compiler iar -sfr-types sfr=8,sfr16=16 ...
Example (Code Prover Server): polyspace-code-prover-server -lang c -compiler iar -sfr-types sfr=8,sfr16=16 ...