MISRA-C is a standard of C programming specified by MISRA, with a goal of providing guidelines on how to generate safe, reliable and portable code.
Initially targeted at automotive systems, MISRA-C is now also recognised by many sectors as a model for best practice in embedded software development, and the latest version of the standard (MISRA-C:2012) consists of 143 rules and 16 directives, each of which is classified as mandatory, required or advisory.
The rules can be automatically checked using a static analysis tool such as the invaluable Gimpel PC-Lint.
You may want to use MISRA guidelines as a tool to guarantee software quality for your industrial control system, even if there’s no safety concern.
To avoid adding unnecessary cost to your project, we may want to allow more deviations than we would for a safety-critical automotive application.