Some neat software compliance & testing tools -

Some neat software compliance & testing tools

I’m a tool guy. Whether it’s a piston ring compressor, a roaring planer or a decent IDE I’ve always bought the best I could afford. Actually, “always” isn’t quite correct as I have succumbed to the temptation of Harbor Freight a few times.

But cheap tools have always been a disappointment. There was that belt sander; it ran so hot one could hardly hold on to it. Every time I used it it ticked me off. Eventually I donated it and got a decent unit. Or the come-along that wouldn’t release under load.

But a great tool makes one smile every time it’s used. The Husqvarna blower. The xplorer2 replacement for that cursed Vista version of Windows Explorer.

A great tool makes you more efficient and productive.

Tools coupled to a disciplined process are even better.

Four decades in this industry have taught me a few truths. One is the importance of using coding standards. I have yet to see companies consistently generating best-in-class code unless it’s done to a standard.

One friend takes pride in the fact that no one can tell who wrote different sections of his company’s products, since everyone does it all to an in-house standard. That sort of mirrors the notion of egoless programming originally promoted by Jerry Weinberg.

Until recently the use of standards was pretty spotty. MISRA-C , though, has started to change that. I run into a lot of companies today that embrace at least a substantial subset of MISRA.

Lots of standards exist. CERT   has one for secure programming. The F-35  has its own (called the JSF standard, for Joint Strike Fighter). Barr Group, too, publishes one as does NASA’s JPL .

But most people use manual inspections to enforce the rules, which is a ludicrous activity since it can be automated. Any time a tool can do something, you must use a tool to do that activity. When it comes to checking code against a standard, there really aren’t many tools around, which seems sort of whacky considering how much time they could save.

PC-Lint   will check code against the MISRA rules, or at least most of them (some are hard to enforce statically ).

C++ Test by Parasoft can check your code against rules you define. But I’ve yet to meet anyone in the embedded world who uses it.

One very cool tool that seems to fit the needs of this industry is Testbed by LDRA (see my screen shot below ). What I like about this product is that it includes around twenty different software standards spread over 1000+ rules. You can tell it to check against a standard, or some mix rules from a number of standards. As the following screen shot shows, one can just select all MISRA-C, or select your own rule set.

Click on image to enlarge.

The agile community demands we automate our tests, which is great advice (when possible ). Similarly, we should automate everything that can be delegated to the mindless yet never bored computer.

Jack G. Ganssle is a lecturer and consultant on embedded development issues. He conducts seminars on embedded systems and helps companies with their embedded challenges. Contact him at . His website is .

1 thought on “Some neat software compliance & testing tools

  1. I agree with the writer.

    For MISRA C I found IAR embedded workbench's intrinsic MISRA C add on better than PC-Lint. Many of the rules which are not checked by the former one are reported by IAR's add on. Its my experience so people may disagree with it.

    Log in to Reply

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.