Software Tools: New way of working

Anders Kallerdahl, automotive software expert at KPIT Technologies, looks at the advantages of using Adaptive Autosar
The software platforms dominantly used in the automotive industry are firmware based. The firmware is a binary running build for a bare-metal on a given microcontroller. A set of requirements is created and realised as a firmware implementation or configuration.
It is downloaded at production, a periodic service in a workshop or in worst case in a call back because it contains faults. But the original aim is to download it and, hopefully, the producer will never need to update the software in the life of the car.
This does not fit software very well. Not that there are bad software engineers in the automotive industry, but the features and the tasks that the ECUs must fulfil today are so complex that continuous feature updates and software faults are unavoidable.
The more complex a project, the more errors per line of code increases, that is the number of errors is not just a linear function of the lines of code.
More can, of course, be invested in verification and validation, but often feature growth is prioritised over the module and integration testing. In addition, typical verification needs the same expert level as the implementers. The system test is expensive and hard to coordinate. In addition, requirements are not in all cases clear from the beginning, and this will make validation of the system hard.
The new generation owners of cars are expecting up-to-date and dynamic features in the car. Most of these features are connected to the software. Smartphones today are much more efficient in adapting to the user needs. Being all-the-time connected to the internet is considered normal in today’s way of living.
Infotainment and telematics projects have been early adopters of introducing complex feature implementations and agile work processes. They are typically updatable systems with a complex operating system supporting file-systems, such as Linux.
Unfortunately, these projects are in many cases an integration of lots of modules creating a software platform integration and have little or no reuse. Each generation of a project is basically a start from scratch. In addition, Linux based platforms are not good in fulfilling safety and hard real-time requirements.
With this background, Adaptive Autosar is a new standard that is solving these problems and creates a partly service oriented architecture (SOA).
Classic Autosar is a self-contained firmware platform, while Adaptive Autosar is not trying to be complete in the sense to create a full SOA. An SOA is a software platform where services are central.
A service is provided by a service provider and consumed by a service consumer. The connection between the provider and consumer is set up by a service broker dynamically in run-time. The consumer does not necessarily know where the provider is located, and the software platform is dynamic and can be partially updated without affecting the system.
Adaptive Autosar does not claim to create a full SOA. The operating system is only interfaced and not specified. Here an Adaptive Autosar application is interfacing an operating system that provides the PSE51 API subset of the Posix standard. This does not mean that the OS can only be PSE51, it means the Adaptive Autosar application can only use this API. The OS can still be a full PSE54 OS, for example Linux, which is PSE54-ish.
The benefit of this approach is that all Posix compliant applications and libraries can be modelled, and, hence, reused and deployed in any Adaptive Autosar software platform. In other words, Autosar is not trying to redefine Posix. Just for clarification, Posix is a standard interface for a programming interface. It is neither an implementation nor an operating system.
Reuse
Should older reliable software that has been in production for a long time be reused? As new software always contains defects, why not simply use the old code and make some small extensions?
The evolution of features required in software today is huge. It is very hard to create a good architecture that enables adding all kind of future features not known from the beginning. Refactoring of the software is needed from time to time to be able to maintain and verify the software efficiently.
The benefit of Adaptive Autosar is that Posix compliant software can be reused, with the philosophy write once, adopt everywhere. Nobody is forced to rewrite; they can benefit from existing open software or a software company may reuse applications for different customers.
Going for an SOA using an Adaptive Autosar approach will not clear all obstacles. Going from a firmware based Classic Autosar approach to an SOA means there are new problems that were either previously not there or mainly solved by hand.
Continuous integration
Having an SOA that is updatable implies that a project’s work process needs to change. The classical waterfall approach where a requirement specification is released to a supplier, and they will implement and test it, will not really work anymore.
Instead, an agile way of working, where a continuous integration (CI) approach is the foundation, is required. A CI continuously verifies and releases new software. In addition, the CI will be interfaced by the OEM and suppliers, and the suppliers will have their own CI for their applications or software platforms.
To fulfil such a CI ecosystem, the OEM’s and suppliers’ CIs must interact automatically. CIs that automatically create releases for the other companies’ CIs will not be an easy nut to crack for IT and legal departments. They need to understand the ownership and how such interactions can be done in a safe and secure way.
Another important topic is to make a software platform reusable among different projects, without starting each from scratch. Here Adaptive Autosar is very helpful.
On one side, there are well specified Autosar basic services, such as the diagnostic manager that handles specific functionality required in the car and, on the other, a clear methodology and exchange format that can be used in the work process of OEMs and suppliers.
Having such a standard will make it possible to develop and reuse applications between different projects and users.
The benefit with a firmware approach is that updates are one-time activities. With an updatable system comes the fact that the system will be partly updated spatially and temporally.
The initial image will be deployed, and different organisations and companies will make updates to the system at different points in times. This puts strong requirements on the offline tooling. The update must be checked for compatibility before being deployed. The update must be verified such that it will not break anything in the vehicle. And, updates must be orchestrated, for example if two ECUs needs to be updated and one fails, the software in both ECUs must be rolled back to their previous version.
The Posix standard defines several features; the feature level is controlled by the PSE51-54 profiles. In each profile, most of the features are optional. In classic Autosar, the feature content is well specified and mostly controlled by the scalability classes.
Two different Posix operating systems can differ very much in feature content. It is important to specify the needed features of a Posix operating system early in the project and to make sure that the selected Posix operating system can be extendable with further features when the project grows in required features.
SOA is often affiliated with dynamic behaviour. But to control and manage the next generation software in vehicles, the work process must be stringent and automated. In addition, the software in the vehicle must be controlled so that verification and safety can be achieved.
Suppliers and car OEMs will work closer together using automated continuous integration systems. Static verification must be extended with dynamic verification is the vehicle, for example by adding metadata. And different suppliers in the ecosystem of the software platform must work together in an efficient way. A contract-based approach in development is needed.
These are some topics that need to be handled in the new SOA paradigm. An SOA based on Adaptive Autosar is not replacing classical Autosar platform 1:1.
Conclusion
There are new challenges in technical and work-process areas. But the advantage of the approach Adaptive Autosar is taking is to align to an existing standard such as Posix. And therefore it is possible to reuse software and experiences from various projects.
Anders Kallerdahl is an automotive software expert at KPIT Technologies
