Use Agentic AI to generate smarter API tests. In minutes. Learn how >>
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.
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.
Breaking Down the AUTOSAR C++14 Coding Guidelines
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.
AUTOSAR Classic Platform | AUTOSAR 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). |
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 has 342 rules to provide a clear understanding and guidance on coding requirements. AUTOSAR C++14 coding rules are classified according to obligation level.
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.
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.
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.
Prevent code defects earlier in the development process before they cascade into more expensive challenges down the line.
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.
Weave AUTOSAR C++14 security coding guidelines right into your software development life cycle as part of your SAST strategy.
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.
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.
Create your own custom coding standards configuration for your organization using the Parasoft RuleWizard.
Parasoft offers the aggregation of MISRA with all our other supported coding standards like CERT, CWE, OWASP, UL 2900, and more.
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.
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.
Any AUTOSAR C++14 guideline deviation requires thorough documentation on the following: the specific guideline, scope, justification, safety assurance, consequences, and mitigation.
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.
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.
Certain code constructs can violate AUTOSAR C++14 rules. Parasoft enables you to intentionally filter out this noise.
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.
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.
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.
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:
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.
Parasoft’s analytics dashboard with automated AUTOSAR compliance reporting makes it easy to provide the proof required for certification.
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.
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.
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.
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.
Existing projects with current development have teams improve new code as it’s developed to defer fewer critical warnings as technical debt.
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.
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.
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.
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.
Elevate your software testing with Parasoft solutions.