The standard library is a fundamental part of most embedded systems and their software; embedded systems would not run without it. However, functions in the standard library are usually taken for granted and are not tested properly. The C and C++ language standards provide library functions with a well-defined interface to invoke a specific behavior. These functions are automatically added to the application by the SDK. Instead of implementing more code manually, application developers use these resources with their well-known functionality. This approach not only saves time, but it also makes code shorter and more robust. Altogether, noteworthy benefits that make software developers rely heavily on the standard library functions.
Although some library functions are not often used in deeply embedded systems, like the ones regarding input and output, others are a key part in many safety-critical components. For example, in the calculation of the brake pressure and the angle of the throttle valve of your car, the mathematical library functions for floating-point computations can play a vital role. In cases like this one, where code from the C standard library is going to end up on the device, those functions cannot go unqualified. The ISO 26262 functional safety standard offers two routes to library qualification.
Functional safety testing
It is easy to forget about the C or C++ standard library in the functional safety process, because library code is invisibly and automatically added to the construction of the application. Yet, in a functional safety setting, library code should not be forgotten.
The ISO 26262 process for Commercial Off The Shelf (COTS) software can be applied to libraries up to ASIL C, without access to the library source code. For ASIL D, structural code coverage needs to be analyzed and for that you need access to the source code. Source code, however, is not always supplied with COTS software. For libraries that are not COTS, the general requirements for application software apply, which are quite extensive.
SuperTest does not forget the standard library
In any case, you need a good test suite for the standard library. Fortunately, SuperTest includes the most extensive test suite for the standard library that can be used for library qualification. It is based, of course, on the ISO C language specification that provides a complete definition of the C standard library. With the aim of giving library testing the relevance it deserves, SuperTest is your essential tool for library qualification.
Do you want to know more? Click on the button below.
By José Luis March Cabrelles, PhD, Software Quality Engineer & Dr. Marcel Beemster, CTOContact
Subscribe to our monthly blog!