By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
429,613 Members | 1,890 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 429,613 IT Pros & Developers. It's quick & easy.

C coding standard for embedded applications?

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

Sep 14 '06 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Ark
st*************@gmail.com wrote:
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

Sep 14 '06 #2

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

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

With best regards, Roman Mashak. E-mail: mr*@tusur.ru
Sep 15 '06 #3

P: n/a
On 14 Sep 2006 08:24:35 -0700, st*************@gmail.com wrote in
comp.lang.c:
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

--
Jack Klein
Home: http://JK-Technology.Com
FAQs for
comp.lang.c http://c-faq.com/
comp.lang.c++ http://www.parashift.com/c++-faq-lite/
alt.comp.lang.learn.c-c++
http://www.contrib.andrew.cmu.edu/~a...FAQ-acllc.html
Sep 15 '06 #4

P: n/a
Ark
Roman Mashak wrote:
Hello, Ark!
You wrote on Thu, 14 Sep 2006 14:21:13 -0400:

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

With best regards, Roman Mashak. E-mail: mr*@tusur.ru

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
Sep 15 '06 #5

This discussion thread is closed

Replies have been disabled for this discussion.