Main Content

AUTOSAR-Based Battery System: A Model-Based Design Example for Automotive SPICE and ISO 26262: 2018

Requirements

This example requires a local installation of Git. If you receive a Git error about a file path exceeding the maximum length, run this command from the MATLAB command window:

!git config --global core.longpaths true

To run software-in-the-loop (SIL) or processor-in-the-loop (PIL) simulations in this example, you must have an Embedded Coder license and a local installation of a supported compiler. For more information, see Supported and Compatible Compilers.

Explore Example Project

This example shows how to apply an AUTOSAR CLASSIC platform-based battery system to an Automotive SPICE and ISO 26262:2018 ASIL D project. The example is comprised of a project that includes artifacts, models, requirements, tests, and pregenerated results that are relevant to using the project.

When you launch the example, the project automatically opens the runRefWorkflow.mlx file. From this file, you can review:

  • A list of required and recommended MathWorks products for running this example.

  • Detailed information about the System Engineering (SYS) and Software Engineering (SWE) processes.

  • Model-Based Design reference workflow for embedded C/C++ applications that shows the use of MathWorks products to fulfill the development and verification/validation activities that are called out by ISO 26262:2018.

The runRefWorkflow.mlx file contains a button for each workflow example livescript. These buttons also unzip the reports, tests, and src_pregen archives that the examples reference. To navigate the workflow examples with the correct dependencies available, use the buttons in the runRefWorkflow.mlx file rather than manually opening the livescripts via the project browser or file explorer.

If you receive a MATLAB error about a report path exceeding the Windows path length limit of 259 characters, the longest relative path in the project is 186 characters. To resolve the error, consider moving the project to a directory with a total path length of fewer than 70 characters.