Skip to main content
Concept guide · ISO 26262-6 + MISRA · 15 chapters

Software Coding Guidelines

Master safe coding practices for automotive software development including MISRA C, MISRA C++, AUTOSAR C++14, and CERT C, with practical guidance on rule selection, static analysis integration, and deviation management.

Chapters
15
Chapters
C & C++
MISRA
C & C++
Rules Covered
400+
Rules Covered
Rule Mapping
ASIL
Rule Mapping
Included inExpert
The short version

Quick answers

What are coding guidelines in ISO 26262?
ISO 26262-6 requires that safety-related software be written using modelling and coding guidelines that address defined criteria - enforcement of low complexity, use of language subsets, strong typing, defensive implementation techniques, and similar topics listed in the standard. The standard names criteria, not a specific rule set; in practice the industry meets them with established standards: MISRA C:2012 for C, MISRA C++:2008 or AUTOSAR C++14 for C++, and CERT C for security-oriented concerns. A compliant setup combines a selected and tailored rule set, tool-based enforcement through static analysis, a formal deviation process for justified violations, and compliance evidence for the safety assessment.
Does ISO 26262 require MISRA C?
No - ISO 26262 never names MISRA. It requires coding guidelines that cover the standard's criteria, such as language subsets and low complexity, and leaves the choice of rule set to the project. MISRA C:2012, with its 143 rules and 16 directives classified as mandatory, required, or advisory, is simply the de facto way to satisfy those criteria for C. Claiming compliance with a recognized standard is far easier to defend at assessment than a homegrown guideline document, which is why nearly every automotive project uses MISRA or a MISRA-derived set.
Why this course · ISO 26262, Part 6, Clause 5

Why it pays for itself

Tailor a defensible rule set

Build a project-specific rule set from MISRA C, MISRA C++, AUTOSAR C++14, and CERT C - selected by language version, target platform, ASIL, and team capability, with tailoring documented.

Make static analysis work for you

Configure tools like Polyspace, LDRA, and PC-lint for guideline enforcement, manage false positives instead of drowning in them, and wire automated compliance gates into the CI pipeline.

Manage deviations compliantly

Not every violation can be fixed. Run a formal deviation process with safety impact assessment, alternative measures, and records that survive an ISO 26262 assessment.

After the course

What you’ll be able to do

Apply MISRA C and MISRA C++

Navigate the complete MISRA C:2012 and MISRA C++:2008 rule sets, understand rule rationale, and apply them correctly in embedded automotive software development.

Select & Tailor Rule Sets

Build project-specific coding rule sets tailored to language version, target platform, ASIL, and team capability with proper tailoring documentation.

Configure Static Analysis Tools

Set up and tune static analysis tools for guideline enforcement with effective false positive management and CI/CD pipeline integration.

Manage Deviations Compliantly

Implement a formal deviation management process with safety impact assessment, alternative measures, and assessment-ready deviation records.

Prevent Critical Defect Classes

Apply guideline rules specifically targeting memory safety, numeric errors, timing issues, and concurrency hazards in safety-critical software.

Generate Compliance Evidence

Produce complete coding guideline compliance evidence packages suitable for ISO 26262 safety assessment including trend data and deviation records.

The curriculum · 15 chapters

Chapter by chapter

  1. 01

    Overview & Purpose

    Understand why coding guidelines are required by ISO 26262, how they relate to software safety requirements, and the regulatory landscape including IEC 62443 and SOTIF implications for safe coding practices.

    • ISO 26262 requirement
    • Regulatory landscape
    • Safety relationship
  2. 02

    MISRA C 2012

    Master the MISRA C:2012 rule set with all 143 rules and 16 directives. Understand mandatory, required, and advisory classifications, the rationale behind high-impact rules, and how to apply them in embedded C development.

    • 143 rules & 16 directives
    • Rule classifications
    • High-impact rules
  3. 03

    MISRA C++ 2008

    Navigate MISRA C++:2008 with its 228 rules for safety-critical C++ development. Understand C++ language features to avoid, OOP safety implications, and practical compliance strategies for embedded systems.

    • 228 rules coverage
    • C++ features to avoid
    • OOP safety implications
  4. 04

    AUTOSAR C++14

    Explore the AUTOSAR C++14 coding guidelines as the modern successor to MISRA C++ for AUTOSAR-based development. Covers new C++14 feature guidance, overlap with MISRA C++:2008, and adoption strategies.

    • C++14 feature guidance
    • MISRA overlap analysis
    • Adoption strategy
  5. 05

    CERT C

    Apply CERT C Coding Standard rules focusing on security-oriented safe coding. Understand how CERT C complements MISRA C, its categorization by severity and likelihood, and which rules are most relevant for functional safety.

    • CERT C overview
    • MISRA C complement
    • Safety-relevant rules
  6. 06

    Rule Selection & Tailoring

    Build a project-specific coding rule set by selecting and tailoring guidelines for language version, target platform, ASIL, and team capability. Learn the rule selection process and how to document tailoring decisions.

    • Rule set construction
    • ASIL-based selection
    • Tailoring documentation
  7. 07

    Static Analysis Tools

    Evaluate and configure static analysis tools including LDRA, Polyspace, PC-lint, Coverity, and SonarQube for coding guideline enforcement. Understand false positive management, tool qualification, and output interpretation.

    • Tool comparison
    • Configuration guidance
    • False positive management
  8. 08

    Deviation Management

    Implement a compliant deviation management process for coding guideline violations. Learn deviation documentation requirements, safety impact assessment, alternative measures, and deviation record management per ISO 26262.

    • Deviation process
    • Safety impact assessment
    • Record management
  9. 09

    Memory Safety

    Apply coding guidelines specifically targeting memory safety hazards including buffer overflows, null pointer dereferences, use-after-free, and stack overflow. Understand static and dynamic enforcement strategies.

    • Buffer overflow prevention
    • Pointer safety
    • Stack management
  10. 10

    Timing & WCET

    Write code compatible with Worst Case Execution Time analysis. Understand which C/C++ constructs make WCET analysis infeasible, timing-safe coding patterns, and the relationship between coding guidelines and timing verification.

    • WCET-hostile constructs
    • Timing-safe patterns
    • WCET tool integration
  11. 11

    Numeric Safety

    Prevent numeric safety hazards including integer overflow, division by zero, floating-point precision issues, and type conversion errors. Apply MISRA and CERT rules targeting numeric computation safety.

    • Integer overflow prevention
    • Float precision handling
    • Type conversion safety
  12. 12

    Concurrency

    Write safe concurrent code for multi-core and multi-tasking embedded systems. Cover race condition prevention, mutex usage patterns, interrupt safety, atomic operations, and MISRA rules for concurrent code.

    • Race condition prevention
    • Mutex safety patterns
    • Atomic operations
  13. 13

    CI/CD Integration

    Integrate coding guideline enforcement into continuous integration pipelines. Configure automated static analysis gates, manage baseline suppressions, generate compliance reports, and track rule violation trends over time.

    • CI pipeline integration
    • Automated gates
    • Compliance reporting
  14. 14

    Compliance Workflow

    Implement an end-to-end coding guideline compliance workflow from initial rule set definition through ongoing enforcement to final compliance evidence generation for safety assessment.

    • End-to-end workflow
    • Evidence generation
    • Assessment readiness
  15. 15

    Model-Based Development

    Apply coding guidelines in model-based development environments using Simulink and TargetLink code generation. Understand generated code compliance, model coding standards (MAAB), and tool-specific compliance verification.

    • Generated code compliance
    • MAAB guidelines
    • Tool-specific verification
Interactive Tools

Not just text: the visual toolkit

Rule Classification Browser

Interactive browser for MISRA C:2012, MISRA C++:2008, and AUTOSAR C++14 rules with filtering by classification, category, and ASIL applicability with side-by-side rule comparison.

Violation Category Heatmap

Visual heatmap of common coding guideline violation categories by frequency, safety impact, and ASIL, based on industry data from static analysis tool surveys.

Deviation Request Template

Interactive deviation request form with guided safety impact assessment, alternative measure documentation, and automatic review checklist generation.

Static Analysis Tool Comparison

Side-by-side comparison of major static analysis tools across dimensions of rule coverage, false positive rate, ASIL qualification support, and CI/CD integration capability.

Rule Set Tailoring Wizard

Step-by-step wizard for constructing a project rule set by selecting base standard, applying ASIL-based recommendations, and documenting tailoring decisions in a compliant format.

Compliance Trend Dashboard

Simulated compliance dashboard showing violation count trends, deviation status, coverage by rule category, and project-level compliance percentage over sprint iterations.

Real-World Application

Coding Guideline Implementation for ASIL-C Engine Control

Real-world implementation of MISRA C:2012 compliance for a 45,000-line engine control unit codebase, covering tool selection, baseline establishment, and systematic compliance improvement.

  • Initial static analysis scan revealing 2,400 violations across 8 MISRA categories
  • ASIL-driven rule prioritization and team training rollout
  • Deviation process implementation for 47 justified mandatory rule violations
  • CI gate configuration achieving zero new mandatory violations per merge
  • Compliance dashboard setup with trend tracking over 6-month remediation
  • Final compliance evidence package for safety assessment submission
ECU Compliance Dashboard
Violation heatmap - 2,400 findings categorized by MISRA rule and safety impact

Unlock 5 more compliance phases

Built for

Who this guide is for

  • Embedded C and C++ developers meeting MISRA compliance for the first time
  • Software leads defining coding standards and CI quality gates for an ASIL project
  • Tool owners configuring and tuning static analysis for guideline enforcement
  • Teams assembling coding-compliance evidence for a safety assessment

Frequently Asked Questions

Common questions about Software Coding Guidelines

A deviation is a documented, justified decision to violate a specific guideline rule at a specific location - the pressure valve that keeps a rule set enforceable. A compliant deviation record identifies the rule and code location, explains why compliance is not reasonable there, assesses the safety impact, and names alternative measures that address the rule's underlying risk. Deviations need review and approval, not just a suppression comment. In the course's engine-control case study, 47 justified deviations from mandatory rules were processed this way and accepted at assessment.
MISRA C targets safety: it constrains C to a predictable subset by banning constructs with undefined or implementation-defined behaviour that make code unanalyzable. CERT C targets security: its rules address exploitable weaknesses and are categorized by severity and likelihood. The overlap is substantial - buffer overflows and integer overflows are both safety and security problems - so the two complement each other, and with ISO 21434 pushing cybersecurity into automotive projects, many teams now enforce MISRA C as the base with safety-relevant CERT C rules layered on top.
Fifteen chapters spanning 400+ rules across MISRA C:2012, MISRA C++:2008, AUTOSAR C++14, and CERT C, plus rule selection and tailoring, static analysis tooling, deviation management, and dedicated chapters on memory safety, timing, numeric safety, and concurrency. The case study takes a 45,000-line ASIL C engine control codebase from 2,400 initial violations to an assessment-ready compliance package. A free account starts you off, and the Pro and Expert plans unlock more of the library.

Start the course today

A free account unlocks one full concept guide, 3 work product templates, 1 guided process, the Markov simulator, and 5 practice exams per month. The Pro and Expert plans unlock more of the 78-guide library. No credit card required.