We are running a survey to help us improve the experience for all of our members. If you see the survey appear, please take the time to tell us about your experience if you can.
Does anyone have any experience with a good or cheap Lint tool to help run a static check on standard C code in Keil? I found one called Cpp check but it doesn't look like it's compatible with Keil (and I haven't had a chance to check it using any other IDE).
cppcheck.sourceforge.net/
I figured I'd go ahead and ask here in case anyone has one they use or recommend (or even if one exists that is compatible with Keil). Thanks!
The canonical answer to that question would be PC-Lint. It's not free, but the price is quite reasonable, particularly if you only need a personal, one-seat license. And yes, uVision has pre-fabricated support for it, because it's the industry standard tool for the job, and has been since about forever.
"... doesn't look like it's compatible with Keil (and I haven't had a chance to check it using any other IDE)."
Most IDEs (including uVision) have the facility to run external apps
www.keil.com/.../uv4_ut_runexternalprograms.htm
Even when you can't "integrate" it within the IDE (uVision or other), there's nothing to stop you running it separately as a standalone app...
But the compatibility issue is normally the language extensions in C51.
"... the language extensions ..."
... which PC-Lint accommodates.
Yes, but if you look a bit closer, you notice that the OP talked about a tool available on sourceforge but that it didn't seem compatible, and Andrew then continued that tools that can't be integrated in the IDE can still be run from the command line.
And while PC-Lint have support for Keil extensions, the majority of lint-like tools (or source code scanners of other types) do not have such support. So the main "issue" when looking for tools to scan the source code isn't if they can be make to integrate with the IDE or not - the main "needle eye" is if they can support the source code extensions.
"... the main "needle eye" is if they can support the source code extensions."
I have not encountered a source code extension that PC-Lint can not be configured for.
I rarely use IDEs. I purchased PC-Lint as a standalone tool independent of toolchain/IDE. It supports the source code extensions I configure it for. I have no clue (and don't care) how my language extension definitions compare to vendor-sanctioned definitions (e.g., Keil's definitions). I craft them as needed to work with all sorts of architecture/vendor 'isms.
I have not found a free tool to be configurable enough to handle the idiosyncrasies of our development domain.
Yes, yes, yes. We have already concluded that PC-Lint can do the task. That isn't contended, and have never been.
Dan, I think his point had more to do with the issue with most Lint tools (such as the free one I had found) have trouble with Keil specific code). He wasn't talking specifically about PC-Lint's ability to do the task (it sounds like everyone agrees it can, including Keil's website).
Anyway, PC-Lint sounds like it will do the job so I will probably look into getting that.
Thanks for your help, everybody!