Keil Logo

Configure PC-lint

This section shows the configuration of PC-Lint for validation and MISRA checking.

General setup

Open Tools – Set-up PC-lint and enter the path to the PC-lint executable. It is recommended to enable Add Compiler Conifg, as the relevant PC-lint configuration files are automatically selected.

You may include other project information as shown below. For details refer to Setup PC-lint.

picture: PC-lint config

Setup for MISRA Validation

To setup PC-Lint for MISRA validation, choose the relevant Rules configuration, for example MISRA_C_2012_Config. Then click on Setup to copy the rules configuration file to your project.

picture: MISRA config

Click on Edit to configure the MISRA rules. This opens the configuration file where you may disable certain MISRA rules.

picture: MISRA config file edit

Additional PC-lint Commands

You may enter Additional Lint Commands that are added to the PC-Lint configuration.

  • Single File allows you to specify commands when only one file is validated.
  • Multiple Files allows you to specify commands when a file group or the complete project is validated.

For example, to suppress the info 714 message from the PC-lint output, you may enter –e714 into this dialog.

picture: Exclude message

For complex PC-lint setups, you may use additional PC-lint configuration files, using the command –ifilename.lnt.

Additional Information

The folder ..\UV4\Lint contains the PC-lint template setup files.

Compiler PC-lint Setup Files
File name Description
co-ARMCC-5.lnt Setup file for ARMCC5
co-ARMCC-6.lnt Setup file for ARMCC6
co-kc51.lnt Setup file for C51
co-kc251.lnt Setup file for C251
co-kc166.lnt Setup file for C166
MISRA Template Configuration Files
File name Description
MISRA_C_2012_Config.lnt Config file for MISRA-C 2012
MISRA_C_2004_Config.lnt Config file for MISRA-C 2004
MISRA_C_1998_Config.lnt Config file for MISRA-C 1998
MISRA_CPP_2008_Config.lnt Config file for MISRA-C++ 2008
MISRA Setup Files
File name Description
au-misra3.lnt Setup file for MISRA-C 2012
au-misra2.lnt Setup file for MISRA-C 2004
au-misra1.lnt Setup file for MISRA-C 1998
au-misra-cpp.lnt Setup file for MISRA-C++ 2008

During configuration with the PC-Lint Options dialog, the related MISRA configuration is copied to the project folder into the sub-folder .\Lint. The MISRA configuration is therefore only relevant for a single project, however, you may copy existing configuration files to other projects.

PC-Lint Command File Structure

The command files for PC-Lint are generated in the project folder and have the name target_A.lnt (for single file invocation) or target_G.lnt (for multi-file invocation). The PC-lint command file is generated based on the settings in the PC-lint Options dialog. An example is shown below:

Example content of single file target_A.lnt
// PC-Lint invocation file generated by uVision
// --------------------------------------------


// Lint specific command path:
// Compiler Include path:

// ARM Compiler Lint configuration:
// Disable messages for Compiler header file directories:

// Format Output to uVision:
-format="*** LINT: %(%f(%l) %)%t %n: %m"

// Source file(s) for verification:
  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.