AI-driven testing just got smarter. Discover SOAtest 2025.1. >>

AUTOSAR C++ Rules and Coding Standards Compliance

C++ is a complicated language and requires a high effort investment to assure predictability, safety, and security. AUTomotive Open System ARchitecture (AUTOSAR) established AUTOSAR C++14 requirements to restrict the usage of C++14 to predictable constructs. Meet these requirements with Parasoft solutions to minimize safety and security risks.

What Is AUTOSAR?

The AUTomotive Open System ARchitecture (AUTOSAR) comes from a development partnership among automotive entities. Founded in 2003, the group sought to establish standardized and open software architecture around automotive electronic control units (ECUs). It also covers semiconductors.

The AUTOSAR development partnership sought to enhance the effectiveness and availability of safety requirements, scalability, transferability, and sustainability throughout the product life cycle. While these principles are often associated with medical devices, they also apply to certain automotive technologies classified as safety-critical systems. Products like airbags require technology that will accurately deploy them, while systems like motor control require consistency.

More embedded software in automobiles also means a lot of data collection and real-time data processing. Different aspects of AUTOSAR seek to address the needs of modern automotive electronics and software components.

Image of an autonomous vehicle driving at night toward a cityscape.

Breaking Down the AUTOSAR C++14 Coding Guidelines

AUTOSAR Classic Platform vs. AUTOSAR Adaptive

There are two types of AUTOSAR platforms: Adaptive and Classic. The AUTOSAR Classic Platform does not offer the flexibility and processing power the Adaptive Platform can. The growing complexity of automotive technology requires easier reactions and quicker responses. However, the two platforms are not rivals. They’re teammates. Both serve different purposes in the automotive design and development ecosystem.

Side by side graphic comparison of AUTOSAR Classic and Adaptive Platforms

AUTOSAR Classic PlatformAUTOSAR Adaptive Platform
Ideal for a single or multicore architecture and deeply embedded ECUs.Ideal for newer ECUs and intended to run on top of HPC architectures to better take advantage of them.
Utilizes signal-based communication with BUS networks like LIN or CAN.Uses service-based communication with Ethernet.
Defines an operating system (OS).Defines execution context, as well as an operating system interface such as PSE51.
Static nature with low flexibility.Provides “planned dynamics” during application deployment with flexible integration.
Deadlines are more pressing due to realtime processing.Soft realtime requirement.
Examples include braking systems and engine control.Examples include sensor fusion data processing and over-the-air updates (OTA updates).

What Is AUTOSAR C++14?

AUTOSAR C++14 is a coding standard for C++ version 14 (ISO/IEC 14882:2014). It’s also an artifact or one of the outcomes in defining the Adaptive AUTOSAR platform, which provides interface specifications for APIs and services. This section of AUTOSAR coding guidelines originally just updated MISRA C++ 2008—an outmoded coding standard. However, MISRA and AUTOSAR announced their merger in 2019 in support of updating to C++17, which has become the default language for many modern AUTOSAR electronic solutions. These guidelines are so robust and optimized that any industry that requires embedded programming in C++ can apply them.

AUTOSAR C++14 Rules & Deviations

AUTOSAR C++14 has 342 rules to provide a clear understanding and guidance on coding requirements. AUTOSAR C++14 coding rules are classified according to obligation level.

  • Required Rules
    Mandatory for claiming compliance with the standard.
  • Advisory Rules
    Recommended but without mandatory status.

However, developers may deviate from an AUTOSAR standard, rule, or guideline with approval. To prevent misuse, a formal sign-off is required for every deviation. Additionally, AUTOSAR classifies rules based on whether static analysis tools can enforce them automatically.

  • Automated
    Automated can be fully supported by static analysis tools.
  • Partially Automated
    Automated can be fully supported by static analysis tools.
  • Nonautomated
    Cannot be supported with static analysis tools.

The use of C++14 in collaboration with the AUTOSAR C++14 guidelines provides developers with the ability to use superior compilers and improved access to enhanced testing, verification, and analysis tools. It allows the use of new development methods like continuous integration/continuous delivery (CI/CD), which can detect errors sooner in the software development life cycle.

“MISRA”, “MISRA C” and the triangle logo are registered trademarks of The MISRA Consortium Limited. ©The MISRA Consortium Limited, 2021. All rights reserved.

Benefits of Having the Right Solution in Your AUTOSAR Software Toolkit

Finding the right development tools to ensure software quality is a matter of trial and error. But that doesn’t mean you need to experiment with unproven tools or strategies. The many benefits of automation in testing and compliance are clear.

Finding issues earlier only makes things easier for everyone involved in software development. From software architecture and application software to diagnostics and validation, Parasoft solutions keep it all in mind.

Adopt AUTOSAR C++14 compliance to develop safe, secure, and reliable software—reducing development costs, accelerating time to market, and ensuring long-term product success.

Increase Code Quality & Reduce Defect Cost

Prevent code defects earlier in the development process before they cascade into more expensive challenges down the line.

Satisfy Industry Process Standards

Parasoft offers AUTOSAR C++14 static analysis as the solution recommended by process standards like ISO 26262, DO-178C, IEC 62304, IEC 61508, EN 50128, and more.

Satisfy Static Analysis Security Testing (SAST)

Weave AUTOSAR C++14 security coding guidelines right into your software development life cycle as part of your SAST strategy.

Test Smarter With AI & ML

Parasoft incorporates artificial intelligence and machine learning to improve productivity in your team’s AUTOSAR C++14 static analysis workflows, flagging and prioritizing the violations to fix first.

Incorporate AUTOSAR C++14 Static Analysis Into Your CI/CD Workflow

Parasoft’s AUTOSAR C++14 static analysis integrates easily into your streamlined CI/CD pipeline with continuous testing to quickly deliver high-quality, safe, and secure software.

Expand From AUTOSAR C++14 & Build Custom Coding Guidelines

Create your own custom coding standards configuration for your organization using the Parasoft RuleWizard.

Combine Coding Standards With AUTOSAR C++14 for Optimum Code Quality

Parasoft offers the aggregation of MISRA with all our other supported coding standards like CERT, CWE, OWASP, UL 2900, and more.

Solutions to Help Meet AUTOSAR Requirements

Screenshot of main menu of Parasoft C/C++test product tour.
Parasoft C/C++test icon

C/C++test

A powerful automated software testing solution for automotive safety and security-critical applications, C/C++test ensures compliance with AUTOSAR C++14 guidelines. It integrates seamlessly into your C and C++ IDE, CI/CD pipeline, and containerized deployments supporting verification and validation methods required by ISO 26262.

Learn More
Screenshot of Parasoft Report Center showing graphical test results of ISO 26262 compliance with AUTOSAR, MISRA, and CERT.
Parasoft DTP icon

DTP

Gain clear visibility into AUTOSAR C++14 compliance with our reporting and analytics solution. DTP aggregates test results and requirements traceability, providing intelligent and continuous monitoring of testing outcomes. The dynamic dashboard highlights testing gaps, tracks progress, and automates compliance reporting.

Learn More

AUTOSAR Best Practices

When it comes to AUTOSAR C++14 compliance, there are several highly beneficial practices. Here’s a list of some of the methods to consider.

Perform Code/Peer Reviews

In addition to AUTOSAR C++14 compliance, convene with your fellow software engineers and systematically check each other’s code for mistakes and coding style violations. This activity has been shown to accelerate and substantially improve code quality.

Properly Log Your Deviations

Any AUTOSAR C++14 guideline deviation requires thorough documentation on the following: the specific guideline, scope, justification, safety assurance, consequences, and mitigation.

Code Clarity

AUTOSAR C++14 compliance will help you write code that’s easy to read and understand. Don’t be too clever and write cryptic code that’s hard to follow or easily misunderstood. You don’t want other engineers or yourself to spend a lot of time trying to decipher a bug in your code.

Code Portability

AUTOSAR C++14 compliance promotes code portability, allowing software to be easily migrated across platforms like POSIX and ANSI C-based systems with minimal changes. This flexibility reduces adaptation effort when switching compilers, operating systems, or hardware targets—enabling businesses to take cost-saving or strategic opportunities without major rework.

Reduce AUTOSAR C++14 Noise

Certain code constructs can violate AUTOSAR C++14 rules. Parasoft enables you to intentionally filter out this noise.

Code Complexity

AUTOSAR C++14 compliance helps write code that doesn’t have a large number of branches. The more branches, the higher the code complexity and the higher number of bugs found in the code.

Code Robustness

AUTOSAR C++14 compliance helps you write reliable code that handles expected scenarios and unexpected scenarios—including negative use cases and invalid data conditions—ensuring application resilience.

Code Reusability

AUTOSAR C++14 compliance helps you write portable code that can be reused in future products or projects. This improves productivity and reduces labor and testing costs.

Example Use Cases

Modern automotive software systems rely more and more on open, standardized architectures like AUTOSAR to power safety-critical autonomous driving and connectivity features. Two key examples of compliance for autonomous driving software testing include:

  1. Advanced driver-assistance systems (ADAS) like LIDAR use AUTOSAR-compliant software to detect collision risks by precisely sensing surrounding objects.
  2. Parking assistance with automated driving depends on code that meets AUTOSAR architecture requirements to execute safe, precise maneuvers without driver intervention.

These are just a couple of notable examples. The growing adoption of AUTOSAR Adaptive Platform and IoT-enabled vehicles makes real-time data measurement and adaptive response capabilities mission-critical.

Automated AUTOSAR Compliance Reporting

Parasoft’s analytics dashboard with automated AUTOSAR compliance reporting makes it easy to provide the proof required for certification.

Graphical Parasoft AUTOSAR C++ compliance report showing number and percentage of rules in compliance along with violations and deviations.

For safety and security-critical applications, you’ll want to use our TÜV SÜD certified solution to ensure standards compliance and ease of adoption into your high-performance development processes.

Getting Started

A great thing about proposing AUTOSAR C++14 compliance is that you can introduce it to your team and start using it at any software development phase of a project. Better yet, it’s effective even if a project or your ECU software is incomplete and partially coded.

AUTOSAR Challenges

  • Large amount of code can produce a large number of warnings.
    The biggest challenge with introducing AUTOSAR C++14 compliance is that a large amount of code can produce a large number of warnings. Therefore, the focus when integrating AUTOSAR C++14 compliance into a project should be on getting the team productive as soon as possible. This will minimize opportunities for the team to get overwhelmed by static analysis warnings.

As achieving AUTOSAR C++14 compliance becomes part of each developer’s daily routine, they can analyze results faster and fix bugs more efficiently.

The maturity of the product under development also matters as it impacts how to incorporate AUTOSAR C++14 compliance. The adoption life cycle management works as described below.

The number 1 inside a blue circle

Acknowledge and Defer

This approach targets existing projects that are already on the market. With minimal new code being developed, all the discovered safety bugs and security vulnerabilities accumulate as technical debt within the existing codebase.

The number 2 inside a blue circle

A Line in the Sand

Existing projects with current development have teams improve new code as it’s developed to defer fewer critical warnings as technical debt.

The number 3 inside a blue circle

Greenfield

New projects adopt this approach. Developers can integrate AUTOSAR C++14 compliance in their development environments from the start to ensure a high standard of quality as code.

Why Parasoft

Icon of a train in a white outline centered inside a blue circle

Enable Automated Post-Processing & Advanced Reporting Strategies

View results from C/C++test’s AUTOSAR C++14 compliance in Parasoft’s dynamic reporting dashboard. You can automate post-processing and advanced reporting strategies using historical data.

It’s easy to see AUTOSAR C++14 compliance results across builds over time. This is true even when working with large codebases and legacy code where visibility into the code is typically challenging. You can quickly focus on the quality of the newly added code.

Icon inside a blue circle showing a white dollar sign.

Time & Cost Savings

The Parasoft code analysis AUTOSAR solution, C/C++test, detects complex AUTOSAR C++14 compliance runtime-like problems in an AUTOSAR runtime environment early in the development stage—without executing costly runtime tests. This streamlines development processes in a way that benefits everyone.

C/C++test analyzes the execution paths through the code and finds AUTOSAR C++14 compliance issues like null pointer dereferencing, division by zero, and memory leaks. It also searches for security vulnerabilities such as arithmetic on a pointer operand, buffer overflows, unreachable code, and cstdlib system function.

Icon inside a blue circle of a white gear representing continuous integration.

Produce Automatic Reports

With widgets that automatically track AUTOSAR C++14 compliance, users get a dynamic view into the compliance process, and can easily produce automatic reports for code audits and certification goals.

Frequently Asked Questions