From the series: Using Qualified Tools in a DO-178C Development Process
Bill Potter, MathWorks
Showing conformance to source code standards is an objective in DO-178C. Embedded Coder® has the capability to comply with MISRA® C:2012 coding standard. Polyspace Bug Finder™ is a static analysis tool that is used to analyze C source code for either handwritten code or for Embedded Coder generated code. Polyspace Bug Finder is used to verify that the source code conforms to the MISRA C:2012 mandatory coding rules as well as some other categories of rules. Those checks can be run directly from a menu in Simulink® after code generation. The Polyspace Bug Finder also provides the capability to measure code metrics, for example, cyclomatic complexity and comment density. A report indicating pass/fail for each of the MISRA checks and details of the source code metrics will be generated for each source code file. If a non-compliance is found, the report can navigate back to the line of code, as well as to the model element for that code. This report can be provided in various formats, such as Rich Text, Word, HTML or PDF for long-term archiving. The DO Qualification Kit provides the necessary artifacts to qualify automatic standards checking and metrics reporting by Polyspace Bug Finder.