This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

MISRA-C

MISRA stands for "Motor Industry Software Reliability Association". IAR has an Embedded Workbench which I believe is a Tester to verify the implementation for the MISRA C rules.

Does KEIL have a such a tool?

If there a PDF document available that spells out the rules. I have search and all I can find are test suites.

Parents Reply Children
  • I'm always looking to improve my coding style.<p>

    MISRA rules shouldn't be considered "good coding style", but a tool to remove some of the ambiguities of C in safety-critical applications.

    There are some downright ridiculous rules contained in the MISRA-C standard. Some of them will boil down to "Program shall not contain bugs.", which is pretty much a rule for any program.

    Another one, if followed to the letter, would turn a simple

    a = b + c++;
    

    into

    a = (b + (c++));
    

    There's also a a rule that forbids the use of goto. Have fun trying to exit that triple-nested loop.

  • MISRA is bullshit

    such a statement guarantees that your code is.

    Erik

  • MISRA is bullshit

    why is you bee thinking that this????

    a profffesional programer must learn all tools he can and finde best good ones to use for her job

    i reed about it and think about it and learn abot it

    sometime a tool you say not gggod is gooder by other me!!!!

    i think sir eric can be good right sometime and you have code that is how you sayed it!!

    plz dont be destruct commments and construct comment to help other peoples

    thankyou

  • "I'm always looking to improve my coding style"

    That's an excellent attitude!

    Whether or not you choose to adopt it, an intelligent review of what MISRA (or any other guidance) says should be beneficial.

    By looking at what MISRA (or any other guidance) says, and thinking about whether it is good, appropriate and/or worthwile in your particular circumstances you are (almost) bound to learn something!

    :-)

  • "MISRA is bullshit"

    That is an extremely foolish attitude.

    by simply dismissing it like that out-of-hand, you are certain to learn nothing!

  • "MISRA is bullshit"

    That is an extremely foolish attitude.

    by simply dismissing it like that out-of-hand, you are certain to learn nothing!

    "out of hand"? I doubt that.

    This was not about MISRA, but about something similar, and presenting it to someone I got the reaction "then it will not be real C" which I knew from that person ment "understandable and maintainable"

    A general comment like "MISRA is bullshit" is the same as stating "I have no intention of writing good code"

    Erik

  • A general comment like "MISRA is bullshit" is the same as stating "I have no intention of writing good code"

    You can write perfectly awful code even (or "especially") when following the MISRA rules religiously.

  • A general comment like "MISRA is bullshit" is the same as stating "I have no intention of writing good code"

    he write a general commment and is bad to be saying

    i agreee wit eric that is bad but he is you are be writing generailisation????

    generailly a generailisation not good you be thinking????

    plz warming to the comment!

  • "You can write perfectly awful code even (or "especially") when following the MISRA rules religiously."

    Indeed, quite awful code. There has been a length thread in comp.arch.embedded on this topic:

    groups.google.com/.../492cec375ac59ba3

  • he write a general commment and is bad to be saying

    i agreee wit eric that is bad but he is you are be writing generailisation????

    I may have written a general comment, but decades of experience with Cidiots makes me stand by it. I have meen no one that, however much they stood by their own, would not discuss coding practices without rejecting them out of hand and, at the same time, wrote good code.

    Erik

  • sir eric

    i be hit your nerve ends????

    sorry to you i saying

    i you think is right on cooding practice you think

    but you not thinkling make generel commment is bad yes with life?????

    i think you experience of years is very good and worth lot

    i now have experitnce to big rich programer but not good old years so you freind help me please????

  • you freind help me please????

    with WHAT

    Erik

  • Hi,

    its me, the bullshit man again ;-).

    I really think that MISRA is more academic but not for professionals. i have a lot of yars experience in professional development of embedded devicec in very very big projects.
    I dont need a kindergarden-guidance like MISRA. one rule is "dont use nonstandard language extensions". this is simply not possible in reality, like many more rules.

    understand me right, i am not against guidancees, but MISRA is one of the badest i have ever seen.

  • "with WHAT"

    sir eric

    no you not reading all message again!

    i being give youy complerment you know

    i say diffrent for you now

    yo have decedes of knowing and are good old and wise and clevere i be think

    you sometime giving good advicce and helping men

    but sometime i thinking you be obsterenentt ;)

    go help freind again now!!!!