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
  • 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.

Reply
  • 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.

Children