MISRA-C 2004 code checker

Hi, I need a tool to check C code MISRA-C 2004 compliance: as I need it for various embedded compiler (GNU-ARM, Freescale CodeWarrior and AVRStudio), I thought about an external code checker (like PC-Lint for example).

What can I use? Thank you

Reply to
djordj
Loading thread data ...

PC-lint.

Regards,

-=3DDave

Reply to
Dave Hansen

QAC.

Reply to
Jujitsu Lizard

Op Mon, 06 Apr 2009 23:47:50 +0200 schreef djordj :

- LDRA TestBed

- IAR Embedded Workbench

--
Gemaakt met Opera's revolutionaire e-mailprogramma:  
http://www.opera.com/mail/
Reply to
Boudewijn Dijkstra

Two excellent choices, but PC Lint is only a few hundred dollars. LDRA is over $10K and IAR around $4K, with huge increases in capability though.

--
Scott
Validated Software
Lafayette, CO
Reply to
Not Really Me

Only for the Windows version.

I'm just throwing options to consider. And don't forget that every penny spent on a tool might be worth its weight in some more valuable metal, depending on how well the tool suits and how well it is used.

--
Gemaakt met Opera's revolutionaire e-mailprogramma:  
http://www.opera.com/mail/
Reply to
Boudewijn Dijkstra

In message , Boudewijn Dijkstra writes

I wouldn't use the IAR Workbench for this. It only checks for the MISRA

-C rules whereas MISRA-C assumes that you are using a full static analyser that will pick up as many MISRA-C rules as possible.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Reply to
Chris H

I disagree one is a (very good) compiler not a static analyser.

Best Bang for buck tool there is for C or C++ programming,. However the more you pay for tools like LDRA and QAC the more they can do.

Different tools. One is a testing tool the other a compiler.

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Reply to
Chris H

In message , Boudewijn Dijkstra writes

The OP mentioned PC-Lint. Also LDRA and the IAR tools are Windows based. What does AVR Studio run on?

Such as?

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Reply to
Chris H

Sembra che Boudewijn Dijkstra abbia detto :

I've seen it, but it's really expensive for my budget.

Uhm... looks like a compiler...

I've been using Splint some times ago, but it doesn't cover MISRA... it's a pity...

Reply to
djordj

In message , djordj writes

A good one but a compiler not a static analyser.

Apparently the splint project has not been worked on for a couple of years?

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Reply to
Chris H

Isn't MISRA rules checker included in any modern embedded compiler? It seems like many commertial packages have it.

BTW, some of the IAR Workbench compilers are very good (like AVR, for example), the others are junk (like 68HC12).

Vladimir Vassilevsky DSP and Mixed Signal Design Consultant

formatting link

Reply to
Vladimir Vassilevsky

AVR Studio runs on windows (or Linux with Wine). But the OP seems to be slightly confused there, since AVR Studio is a debugger, simulator, and IDE - not a compiler. It's likely he meant AVR Studio with avr-gcc as the compiler, since this is a common combination (and if he were using IAR or ImageCraft, he'd probably have mentioned them by name). avr-gcc is, like "GNU-ARM" (i.e., gcc for the ARM) and CodeWarrior, a cross-platform tool. But the assumption from PC Lint and AVR Studio is that he is running on Windows.

Reply to
David Brown

In message , Vladimir Vassilevsky writes

No.

Not that many AFAIK

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Reply to
Chris H

Op Tue, 07 Apr 2009 20:10:26 +0200 schreef Chris H :

YMMV. Too many variables to consider naming a metal. But IIRC, 10%-30% productivity increases are not uncommon for high-end tools.

--
Gemaakt met Opera's revolutionaire e-mailprogramma:  
http://www.opera.com/mail/
Reply to
Boudewijn Dijkstra

Op Tue, 07 Apr 2009 20:06:47 +0200 schreef Chris H :

A full static analysis of a big codebase might not be something you are willing to wait for, while IAR EW can quickly pick out a portion of the mistakes beforehand.

--
Gemaakt met Opera's revolutionaire e-mailprogramma:  
http://www.opera.com/mail/
Reply to
Boudewijn Dijkstra

Tools cost is typically equal to a few man days loaded costs. If they save more than that much they are worth it. More and more I keep hearing, "I can't afford free"

Trade the cost and accompanying support against the diverted time and specialized knowledge needed for FOSS starts to make the choices clearer.

Regards,

-- Walter Banks Byte Craft Limited

formatting link

Reply to
Walter Banks

Of course, the same applies the other way - I've seen commercial development tools with worse support than equivalent FOSS tools, or that are poorer quality than the FOSS tools, or that require more "specialised knowledge". It all depends on the tools in question, and who is using them. For someone who is used to gcc, makefiles, and a nice text editor, the gui, IDE, and project management system of CodeWorrier or Green Hills is "specialised knowledge" that can take days to figure out properly. For someone who is used to installing their tools with "./configure && make && make install" or "apt-get install", it is a hard jump to wait a week for delivery of a CD and dongle, then spend another two weeks fighting with the supplier over dongle or licensing problems.

I certainly have at least two targets for which I have a fully licensed top-range commercial development toolchain worth many thousands of dollars, yet I choose to use gcc for my development because it is more effective for my uses.

The point is not that FOSS is better than commercial, or vice versa - but that the best tool for the job depends on the job and who is doing it. Sweeping generalisations one way or the other are almost certainly going to be wrong.

The "cost" of picking a tool has to include the time it takes to get productive, and the "worth" of the tool has to include the time it saves during use - but that applies equally to commercial software as well as FOSS, and to the middle ground of commercially-supported open source software.

Reply to
David Brown

Sorry, it's all I use. Can't believe I'm saying this, but I'm a bit of a Windows snob. Just don't see the point of others. ... I know, someday I should try a linix platform, but it isn't today.

BTW, (to other posters), please don't fill this thread with long explanations on the merits of the others. If you really feel the need to educate me, start a new thread on the endless pros & cons of Linix and Windows. I am actually interested.

And to all the others that already posted, yes, I know Embedded Workbench is a compiler not a static analyzer. It does do an acceptable job with MISRA though, certainly better than no solution.

If you can afford LDRA, get it. If not, get PC Lint. If you think linting your code is a waste of time, what are doing programming for a living? Get a job you know something about.

--
Scott
Validated Software
Lafayette, CO
Reply to
Not Really Me

In message , Walter Banks writes

You would say that wouldn't you :-) Even if it is true.

What have you started? Get the asbestos coat. ....:-))))

--
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
\/\/\/\/\ Chris Hills  Staffs  England     /\/\/\/\/
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/
Reply to
Chris H

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.