C coding standard for embedded applications?

S

steven.sagerian

Can anyone suggest a good off the shelf coding standard for embedded
real time applications?
Thanks,
Steve
 
A

Ark

Can anyone suggest a good off the shelf coding standard for embedded
real time applications?
Thanks,
Steve
It all depends on what your quality requirements and maintainability
requirements and time-to-market requirements are. What is your price of
a bug? of missing a task deadline? etc.
MP3 player is waaaay different from engine controller which is waaay
different from safety shutdown devices.
You can start with standards posted on exida.com or micrium.com (the
latter I think is truly bad though).
Also, you've gotta think of a coding standard in the framework of the
software development process, of which you've gotta think in the
framework of your product devel process.
Then you can use Google.
Then you can hire me as a consultant :)
Best,
Ark
 
R

Roman Mashak

Hello, Ark!
You wrote on Thu, 14 Sep 2006 14:21:13 -0400:

A> It all depends on what your quality requirements and maintainability
A> requirements and time-to-market requirements are. What is your price of
A> a bug? of missing a task deadline? etc.
A> MP3 player is waaaay different from engine controller which is waaay
A> different from safety shutdown devices.
A> You can start with standards posted on exida.com or micrium.com (the
A> latter I think is truly bad though).
Are you probably talking about MISRA standards?

With best regards, Roman Mashak. E-mail: (e-mail address removed)
 
J

Jack Klein

Can anyone suggest a good off the shelf coding standard for embedded
real time applications?
Thanks,
Steve

The second version of MISRA C is quite an improvement over the first.
Not perfect by any means, but a good starting point and better than
anything else I know of.

http://www.misra.org.uk
 
A

Ark

Roman said:
Hello, Ark!
You wrote on Thu, 14 Sep 2006 14:21:13 -0400:

A> It all depends on what your quality requirements and maintainability
A> requirements and time-to-market requirements are. What is your price of
A> a bug? of missing a task deadline? etc.
A> MP3 player is waaaay different from engine controller which is waaay
A> different from safety shutdown devices.
A> You can start with standards posted on exida.com or micrium.com (the
A> latter I think is truly bad though).
Are you probably talking about MISRA standards?

With best regards, Roman Mashak. E-mail: (e-mail address removed)
MISRA (2004 edition) is a good starting point. Taken literally, it's a
sure way to produce unreadable gobbledygook (been there, done that). For
my safety-aware customer, I wrote a coding standard based on about
60-70% of MISRA and quite a few things taken differently. E.g., C99: I
would trade MISRA for designated initializers any day.
But then, for my previous employer, I had written a completely different
coding standard; it had different purpose and was for a different
application area (consumer electronics). So it all depends.
As important as the coding standard is its enforcement. The only honest
way I know is to use static code analysis tools; their choice may
therefore affect the standard itself. Latest PC-Lint of course comes to
mind as (arguably) the most flexible, but there are other tools.
Finally, a long standard (more than, say, 20-25 pages) will not be
followed even with best intentions.
Best,
- Ark
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,579
Members
45,053
Latest member
BrodieSola

Latest Threads

Top