Today, innovation in mobility and individual transport is mostly driven by software. On the one side, the amount of software and its complexity increases while at the same time its interconnection with safety-critical sub-systems such as steering or braking increases.
Success Factors for Efficient Software Development
It is well accepted that to efficiently develop complex software, a couple of principles and concepts shall be applied in order to master this challenge. To leverage success, these are some of the proven practices in modern software development:
- Reuse code by creating and utilizing domain-specific libraries. By sharing and reusing code, you can clearly increase productivity in your software project. This may be applied to a certain department, a company, or even the whole industry.
- Pursue a well-structured architectural software design that allows a high level of flexibility. A proper software architecture ensures that code can be reused for different applications. If you master to break it down to individual components with powerful APIs, you can also account for new use cases and keep flexibility for custom extensions.
- Systematically and continuously apply static code analysis practices from day one of your software development to ensure immediate feedback. This also helps to prevent late changes in crucial design decisions of your software project.
Relevant Constraints in Automotive Software Development
In the traditional automotive industry, the C programming language is the de-facto standard for implementing software functionality. In automotive, its usage is highly regulated by standards and best-practices such as MISRA-C:2012. In a nutshell, MISRA is kind of a rule set that proposes best practices to make your software implementation less risky given the typical pitfalls you see when applying C to real-world problems. This especially applies to safety-relevant systems. There are some relevant rules that have to be applied:
- Do not perform dynamic memory allocation during runtime. This should prevent your application from running into trouble if no additional memory is available during a potential runtime allocation. This accounts for predictability and determinism.
- Do not download any unused code (in terms of requirements specification) to your ECU. Typically, it is well-accepted that you should only download code to your ECU that is really required. While this keeps the memory footprint of your application small, it also ensures that no unwanted code can be called by accident. This is highly relevant if you decide to design with software libraries.
- Respect compiler warnings (better turn them into fatal errors); apply consistent unit testing, and strive for the required coverage according to your ASIL goals. Finally, use comprehensive static code analysis for immediate feedback during development.
If we compare these rules to the initial design goals for efficient software development, we realize that modern complex systems in the automotive sector can hardly be mastered with the dominant programming language C. The main reason for this is that plain C lacks good abstraction capabilities for complex software architectures.
One potential option to overcome these limitations would be the introduction of C++ for automotive software development. A first initiative was done when proposing a MISRA rule set for C++. However, MISRA-C++:2008 does still not consider relevant features that have been introduced with recent C++ standards (starting from C+11 to C++20). In general, it was written by safety experts that assumed an average audience with rather limited knowledge of C++. Hence, the result addresses an obsolete language standard and practices. It shall be highlighted that C++ is not just a 'better C'. More precisely, it is an own language that shares some concepts with C but also has important differences (e.g. different type system or implementation-dependent behavior) that might lead to risky misunderstandings.
Current initiatives around MISRA-C++:202x try to close that gap by bringing together recent C++ best practices with safe software development practices to make it less risky. However, this standard is still under development. Even if this new standard is released, a next challenge will be the broad availability of qualified development toolchains for the relevant target ECUs.
With BASELABS Create Embedded a further alternative was introduced to the market. It aims to resolve the above mentioned conflicts by proposing several technologies:
- BASELABS provides a domain-specific SDK/library for sensor data fusion applications. This includes general purpose algebraic functionality, Kalman filtering, and a statistical layer to realize complex multi-object tracking applications.
- BASELABS developed Trait-C language, an extension of the C-language on preprocessor-level to enable features such as templates/generics. With this technology, we can ensure software reusability while still respecting the automotive safety constraints.
- The BASELABS software is 100% self-contained. This means, it has no external dependencies. This allows straightforward integration into your continuous integration infrastructure and your target ECUs.
- The code of the BASELABS SDK was developed according to ASIL-B practices. It has 100% of branch coverage. This directly scales into your project. We are providing coverage reports and a compiler test kit.
- The BASELABS workflow is compatible with any C99 development toolchain. So, you can directly start today by applying it to your existing infrastructure.
- The complete codebase was developed according to ISO26262:2018 and MISRA-C:2012. You will get access to our safety manual.
- To leverage the efficiency of your developers, we provide plugins for IDEs such as Visual Studio Code.
- The SDK comes with comprehensive tutorials, API documentation, and architectural design documents. Moreover, we provide a descriptive way to configure and implement object fusion use cases based on a reference architecture.