Linting C/C++ Code

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Linting C/C++ Code

963 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Fritz on Tue Dec 27 08:42:12 MST 2011
Hello, I am searching for tools 'linting' which are able check source code and improve quality of software written in C/C++ on 'Red Suite'. It would be nice if it is possible to generate automatically tests on the target for array bounds, illegal pointers, stack and more, if possible.

Has anyone experiances with such tools?
0 Kudos
6 Replies

770 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pivic on Fri Jul 06 12:04:11 MST 2012
Hi Macgyver,

Can you please let us know how you did it?
I asked Gimpel but I had no answer from them...

Thanks,
Alex
0 Kudos

770 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Macgyver on Mon Mar 05 15:38:11 MST 2012
I got PC-Lint to work via help from Gimpel. There was not a lnt file for eclipse, but since Eclipse is a very common IDE nowadays, they had no problem getting me setup. There are a few hoops to jump through to get it to work, but if you contact Gimpel Software, they can probably get you up and running in a few hours.

Good luck.
0 Kudos

770 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by pivic on Tue Feb 21 05:05:30 MST 2012
Hi,

I have been struggling to install PClint in LPCxpresso for the last few days.

Did anyone managed to get them working together?

I have been following : http://www.bezem.de/2009/08/using-pc-lint-in-eclipse-no-plug-ins-required/ to create a new Build configuration. But now I am facing the problem of including the headers and libraries.

I use PClint V9.00i and LPCxpresso V4.1.5[219]

Thanks,
Alex
0 Kudos

770 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by kalpak on Wed Dec 28 07:22:35 MST 2011
PC Lint has online demo
0 Kudos

770 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by TheFallGuy on Wed Dec 28 04:55:41 MST 2011
Not tried it myself, but I hear very good reports about PC-Lint:

http://www.gimpel.com/html/index.htm
0 Kudos

770 Views
lpcware
NXP Employee
NXP Employee
Content originally posted in LPCWare by Rob65 on Tue Dec 27 09:53:49 MST 2011
I have used Insure++ from Parasoft in the past with very nice results.
But this was something like 10+ years ago and the code ran on an embedded Linux target.

We found some nice bugs (e.g. memory being allocated that was not being freed ad the same level, writing beyond stack boundaries, use of uninitialized variables) - nice bugs that are hard to catch during normal debugging.
We also did code coverage using the TCA option of Insure++, this shows which blocks of code are executing how many times. Not only shows this your code coverage but it also shows where to start optimization if you need to.

Unfortunately this was too long ago to remember exactly how and what it was used. One thing I do know is that Insure++ injects special instrumentation code that checks and reports everything. The instrumentation code is specific for a certain target - we had a version that specifically matched our linux target.
There is an open source alternative called Valgrind, but I have never used it.

Regards,
[INDENT]Rob
[/INDENT]
0 Kudos