Modern software development and test processes encompass a wide range of best practices and development methodologies. Personal preferences and lessons learned — both good and bad — dictate most workflows. Customized tools and scripts are frequently cobbled together with internal and external automation tools. However, at the core there are a set of proven development and test methods that enable deployment of high quality software with, ideally, no defects. Adherence to coding standards, performing software verification early in the development process, checking against an established set of quality metrics, and identifying software operations that are known good or known to contain faulty code will bring quality and consistency to critical embedded software.

Establish Software Quality Models and Objectives

Table 1. Quality model with criteria for achieving specific objectives.
Embedded software in quality-critical systems continues to become more complex. Even as the systems they develop become more sophisticated, software development organizations must meet stringent software quality objectives that are mandated by the organization itself or required by the customer or by government regulations. For software teams to meet these objectives, and to ideally achieve zero-defect software, a quality model must be defined. The model establishes specific quality objectives with metrics and thresholds. These objectives provide a mechanism by which teams can communicate goals and status, both internally and with others outside the organization.

Static code analysis automation tools provide quantifiable metrics about the quality of software. As the term static implies, the tools analyze the source code without requiring program execution. Using techniques including code scanning and abstract interpretation, these tools detect errors in code and measure compliance to coding standards. The more advanced static code analysis tools can formally prove that the source code is free of specific run-time errors.

Example of a Software Quality Model With Objectives

One example of a software quality model with well-defined objectives developed by several automotive OEMs and MathWorks is described in a document titled “Software Quality Objectives for Source Code”*. This quality model comprises a set of software quality objectives, many of which implicitly require the use of static code analysis. Compliance with these objectives is assessed using the following criteria:

  • Quality plan in place;
  • Detailed design description completed;
  • Code metrics established;
  • Code standards met (for example, adherence to MISRA-C);
  • No unreachable branches;
  • No unreachable branches;
  • Run-time errors eliminated or potential for run-time errors understood;
  • Dataflow analysis completed.