PC-lint Installation

To be able to use the MAPLAB® X PC-Lint Plugin, you will need to install the Gimpel PC-lint Software. Go to the Gimpel website to acquire this product.

On Windows, running the setup program will copy the PC-lint files onto your hard drive. Running the configuration wizard (config.exe) will configure PC-lint (lint-nt.exe) for your compiler, libraries, editors and IDEs. It may be run multiple times if you have multiple configurations for which you need support. It will build a batch file for calling PC-lint (lin.bat) and will invoke the appropriate PC-lint configuration files (*.lnt) for your environment. Note that PC-lint error messages may be found in the file msg.txt.

Some important Gimpel PC-lint/MISRA plug-in files are listed below:


Batch file for invoking lint-nt.exe.


PC-lint executable to process the C source file(s) for linting.


Configuration wizard for PC-lint. This wizard creates a file that contains options to allow PC-lint to process the source code, i.e., using this utility you will be able to select your desired Microchip C compiler.


The co-xxxx.lnt files are included with PC-lint and contain options for using the respective MPLAB XC C compiler with PC-lint.

Currently, for PC-lint to support MPLAB XC C compilers, you will need to follow the instructions in the co-xc8.lnt, co-xc16.lnt and co-xc32.lnt files for editing lint-cmac.h and include-path.lnt files.

The following is taken from co-xc8.lnt

// Before you start using this file, please follow the directions to perform these
// simple steps:

// 1 - Include the path(s) to your header files
//      - run xc8 with -v option and copy any -I argument from the output to
//        include-path.lnt (in the same directory where co-xc8.lnt exists).
//        don't forget to use the -i lint option. ex: -i"include-path".
//        Note that any other include directories should be added explicitly.

// 2 - Now include the preprocessor macro definitions specific to the chip you are
// using:
//      - From the output you get in step one, copy all arguments starting with -D
//        to "lint-cmac.h" in the same directory as co-xc8.lnt.
//      - Edit the file to have the form:
//        #define macro_name value // each definition on a separate line


An ASCII rendition of PC-lint messages for MPLAB X IDE use. PC-lint message types are shown in the following table:
Type C C++ Warning Level
Syntax Errors 1 - 199 1001 - 1199 1
Internal Errors 200 - 299 0
Fatal Errors 300 - 399 0
Warnings 400 - 699 1400 - 1699 2
Informational 700 - 899 1700 - 1899 3
Elective Notes 900 - 999 1900 - 1999 4

Installing the PC-lint Plugin on MPLAB X IDE

To install the plug-in into MPLAB X IDE follow the instructions on the Install a Microchip Plug-in page.

© 2016 Microchip Technology, Inc.
Information contained on this site regarding device applications and the like is provided only for your convenience and may be superseded by updates. It is your responsibility to ensure that your application meets with your specifications. MICROCHIP MAKES NO REPRESENTATIONS OR WARRANTIES OF ANY KIND WHETHER EXPRESS OR IMPLIED, WRITTEN OR ORAL, STATUTORY OR OTHERWISE, RELATED TO THE INFORMATION, INCLUDING BUT NOT LIMITED TO ITS CONDITION, QUALITY, PERFORMANCE, MERCHANTABILITY OR FITNESS FOR PURPOSE. Microchip disclaims all liability arising from this information and its use. Use of Microchip devices in life support and/or safety applications is entirely at the buyer's risk, and the buyer agrees to defend, indemnify and hold harmless Microchip from any and all damages, claims, suits, or expenses resulting from such use. No licenses are conveyed, implicitly or otherwise, under any Microchip intellectual property rights.