Main Content

MPLAB XC8 C Compiler (-compiler microchip)

Specify MPLAB XC8 C compiler

Since R2020a

Description

Specify microchip for the Compiler (-compiler) option if you compile your code with a MPLAB XC8 C compiler. By specifying your compiler, you can avoid compilation errors from syntax that is not part of the Standard but comes from language extensions.

Then, specify your target processor type. If you select microchip for Compiler, in the user interface, you see only the processors allowed for a MPLAB XC8 C compiler. Your choice of target processor determines the size of fundamental data types, the endianness of the target machine, and certain keyword definitions.

If you specify the microchip compiler, you must specify the path to your compiler header files. See Provide Standard Library Headers for Polyspace Analysis.

Settings

The target uses these default sizes in bits for the fundamental types. You do not see these sizes in the user interface.

Targetcharshortintlonglong longfloatdoublelong doubleptrDefault sign of charEndiannessAlignmentDefinition of size_tDefinition of wchar_t
pic81616326432323216unsignedLittle8unsigned intlong

Your compiler specification also determines the values of many compiler-specific macros. In case you want to know how Polyspace® defines a specific macro, use the option -dump-preprocessing-info.

Tip

  • Polyspace does not support the Atmel families of processors, such as AVR, TinyAVR, MegaAVR, XMEGA, and SAM32.

  • Polyspace does not support the CPP/P1 or C18 Microchip front-end. This front-end is activated by the compiler when you compile your code with the C90 version of the Standard.

  • If you use Polyspace as You Code extensions in IDEs, enter this option in an analysis options file. See options file.

Command-Line Information

Parameter: -compiler microchip -target
Value: pic
Default: pic
Example (Bug Finder): polyspace-bug-finder -compiler microchip -target pic
Example (Code Prover): polyspace-code-prover -compiler microchip -target pic
Example (Bug Finder Server): polyspace-bug-finder-server -compiler microchip -target pic
Example (Code Prover Server): polyspace-code-prover-server -compiler microchip -target pic

Version History

Introduced in R2020a