Detailed method of using pc-lint in Keil MDK

Publisher:一条属马的龙Latest update time:2016-12-16 Source: eefocusKeywords:Wedge  MDK  pc-lint Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

keil MDK version: V4.03

PC-lint version: V8.0

 

There are many articles on the Internet about the powerful role of PC-Lint. I don't want to repeat them here. I will just say one thing: a program that can pass the PC-Lint test is not necessarily without problems, but the improvement in quality of a program that has passed the PC-Lint test is self-evident. 

First install Keil MDK and PC-lint. Most PC-lint on the Internet is installed in a compressed package, which can be directly unzipped to the C drive. Please support genuine products! ! (Ahem, guilty conscience...) 

The method is very simple, because keil MDK has already provided the configuration file of pc-lint corresponding to the keil ARM compiler: CO-KCARM.LNT. 

First open mdk, select Tools – Setup PC Lint, and the PC-lint configuration interface shown in Figure 1 will pop up.

 

                        Figure 1 PC-lint configuration interface

Click the area marked with red 1 in Figure 1 and select the lint tool; then click the area marked with red 2 in Figure 1 and locate the CO-KCARM.LNT file under the /ARM/bin file in the keil installation directory. This file is the PC-lint check configuration file for the corresponding keil ARM compiler. Finally, click 'OK' to exit and the settings are complete. 

Run PC-lint to check the source code in the project: Tools – Lint … is used to check the current C source file opened in the editor, and Tools – Lint All C Source Files is used to check all C source files in the project. The information obtained by PC-Lint will be relocated to the Build – Output window for display. Double-clicking the Lint information line will position the editor to the corresponding source code line.

My program originally had 0 errors and 1 warning () in the compiler. After checking with pc-lint, there were hundreds of errors, warnings, and other information. I was sweating...


Keywords:Wedge  MDK  pc-lint Reference address:Detailed method of using pc-lint in Keil MDK

Previous article:How to ensure that a certain section of the program is not optimized in Keil MDK
Next article:Keil MDK compiler (V4.01) and H-JTAG issues

Recommended ReadingLatest update time:2024-11-23 10:19

Keil5 MDK software traditional C51 and STM32 mutual compatibility method
When I first started learning 89C51 microcontrollers, I used keil4 as the development environment, and later upgraded to keil5. Now I am preparing to learn STM32, and the STM32 development environment is keilMDK. After downloading the keilMDK installation package, I found that it is incompatible with Atmel and STC mic
[Microcontroller]
Keil5 MDK software traditional C51 and STM32 mutual compatibility method
Thoughts on Keil MDK LPC2100 startup file
;/*****************************************************************************/ ;/* STARTUP.S: Startup file for Philips LPC2000                               */ ;/*****************************************************************************/ ;/* Use Configuration Wizard in Context Menu                           */
[Microcontroller]
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号