Keil Logo

Running PC-Lint

PC-Lint from Gimpel Software checks the syntax and semantics of C programs across all modules of your application. PC-Lint flags possible bugs and inconsistencies and locates unclear, erroneous, or non-sense C code. PC-Lint may considerably reduce the debugging effort of your target application.

Install PC-Lint on your PC and enter parameters in the dialog Tools — Setup PC Lint. The example shows a typical PC-Lint configuration.

To get correct output in the Build page, you should use the configuration file that is located in the folder KEIL\ARM\BIN.

After the setup of PC-Lint you may Lint your source code. Tools — Lint … runs PC-Lint on the current in focus editor file. Tools — Lint All C Source Files runs PC-Lint across all C source files of your project. The PC-Lint messages are redirected to the Build — Output Window. A double click on a Lint message line locates the editor to the source file position.

PC-Lint Output Window Example

To get correct results in the BuildOutput Window, PC-Lint needs the following option lines in the configuration file:

-hsb_3 // 3 lines output, column below
-format="*** LINT: %(%f(%l) %)%t %n: %m" // Change message output format
-width(0,10) // Don't break lines

Each toolset uses specific PC-LINT configuration files that are configured for the various compiler variants. These configuration files contain all relevant PC-LINT configuration options including the lines shown above. It is strongly recommended to use the following configuration files, since they contain also other PC-Lint options required for the various compilers.

PC-LINT Configuration File Description
..\C51\BIN\CO-KC51.LNT PC-LINT configuration file for Keil C51 and CX51.
..\C251\BIN\CO-KC251.LNT PC-LINT configuration file for Keil C251.
..\C166\BIN\CO-KC166.LNT PC-LINT configuration file for Keil C166 for classic C16x and ST10 devices.
..\C166\BIN\CO-KC166XC.LNT PC-LINT configuration file for Keil C166 for XC16x devices.
..\ARM\BIN\CO-KCARM.LNT PC-LINT configuration file for Keil CARM.
  Arm logo
Important information

This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.

Change Settings

Privacy Policy Update

Arm’s Privacy Policy has been updated. By continuing to use our site, you consent to Arm’s Privacy Policy. Please review our Privacy Policy to learn more about our collection, use and transfers
of your data.