QP/C++  7.3.0
Real-Time Embedded Framework
Loading...
Searching...
No Matches
AUTOSAR-C++14 Compliance

This document (Unique Identifier: DOC-QPCPP-CSC) describes the compliance of the QP/C++ Real-Time Embedded Framework as well as the Application code based on this framework with the AUTOSAR Guidelines for the use of the C++14 language in critical and safety-related systems [AUTOSAR-CPP14]. This compliance report is designed to be applicable to safety-related real-time embedded systems.

Remarks
This document is part of the QP Certification Kit, which has been specifically designed to aid companies in safety certification of their software based on the QP Framework treated as commercial off-the-shelf (COTS) software. Also, independently of the desired certification level, this MISRA Compliance report is a good source of information about the best coding practices used in development of QP/C Framework and highly recommended for QP Applications.

Revision History

The revision history of the document DOC-QPCPP-CSC is as follows:

Revision QP/C++
version
Date
(YYYY-MM-DD)
By Description
1.0 5.0.0 2018-05-30 MMS Initial release for MISRA-C++:2008
2.0 7.3.0 2023-06-30 MMS Initial release for AUTOSAR-C++14

     

About AUTOSAR-C++14

The AUTOSAR C++14 coding guidelines – "Guidelines for the use of the C++14 language in critical and safety-related systems" ([AUTOSAR-CPP14]) – were developed circa 2017-2018, by a specialist sub-group of AUTOSAR members. They were developed with the specific intention to develop a new safer C++ coding standard that would allow them to make greater use of the evolving C++ language; specifically, the new C++11 and C++14 features.

At that time, the existing MISRA C++ 2008 coding standard for C++ explicitly required the use of the C++ 2003 language version and did not allow for the modern C++ constructs to be used. This meant that developers were left with the choice of either reverting to older and more primitive versions of the C++ language, or with coding guideline rules that didn't really fit much of the new software being developed. And for safety critical software systems coding guidelines or standards are considered a key piece of the related IEC 61508 functional safety system. Thus, AUTOSAR C++ 14 was born.

The latest incarnation of the MISRA C++ standard, which is currently under development, will also address the use of more modern versions of C++ within a safer and more maintainable context, with support for C++17. However, as this is not yet released, it is anticipated that the AUTOSAR C++14 will remain widely used within the safety related C++ software markets, not just automotive, for some time to come.

AUTOSAR-C++14 and Functional Safety

In the context of functional safety standards the full C++ programming language is generally not recommended. However, safer subsets of C++, such as AUTOSAR-C++14, are highly recommended, especially for higher SIL levels (see [IEC-61508-3] Table A.3, [IEC-61508-7] C.4.6 Table C.1).

AUTOSAR-C++14 as a safer subset of the C++ programming language

About Coding Standard Compliance of QP/C++ Framework

The QP/C++ Framework has a long history of compliance with the safety-related coding standards. Earlier versions of QP/C++ were compliant with the MISRA-C++:2008 Standards, see [QPCPP-MCPP]. Starting with QP/C++ version 7.x, the framework was adapted for the C99 language standard and compliance with AUTOSAR-C++14 [AUTOSAR-CPP14].

References

[AUTOSAR-CPP14] AUTOSAR Guidelines for the use of the C++14 language in critical and safety-related systems, March 2019
[MISRA-Comply] MISRA Compliance:2020 Achieving compliance with MISRA Coding Guidelines,
ISBN 978-1-906400-11-8 (PDF), MIRA Limited, February 2020
[ISO-C99] ISO/IEC 9899:1999, Programming languages — C, International Organization for Standarization, 1999
[PCLP] Reference Manual for PC-lint® Plus™ Version 2.0, A diagnostic facility for C and C++,
Vector Informatik
[PCLP-Cert] Using PCLP in Safety Critical Applications Version 2.0,
Vector Informatik
[BARR-C:2018] BARR-C:2018 Embedded C Coding Standard,
Michael Barr, ISBN-13: 978-1-72112-798-6, Barr Group 2018, (https://barrgroup.com/sites/default/files/barr_c_coding_standard_2018.pdf)
[Saks-1998] Dan Saks, "Programming Pointers - Placing const in Declarations", Embedded Systems Programming, June 1998, (https://www.dansaks.com/articles/1998-06%20Placing%20const%20in%20Declarations.pdf)
[PSiCC2] Practical UML Statecharts in C/C++, 2nd Edition, Event-Driven Programming for Embedded Systems,
Miro Samek, ISBN 978-0750687065, Newnes 2008 (https://www.state-machine.com/psicc2)
[QPCPP-MCPP] Application Note: QP/C++ MISRA-C++:2008 Compliance Matrix,
Quantum Leaps (https://www.state-machine.com/doc/https://www.state-machine.com/doc/AN_QP-Cpp_MISRA.pdf)