Create Linux Executable for Run-Time Calibration

As part of AUTOSAR adaptive code generation, AUTOSAR Blockset enables you to create an executable on your Linux host machine. You can run the executable as a stand alone application. The AUTOSAR Adaptive Linux Executable toolchain provides AUTOSAR adaptive functional cluster libraries for compiling the generated code. To create this executable, use the generated CMakeLists.txt file (requires CMake software).

Create CMakeLists.txt File for AUTOSAR Adaptive Model

To generate the file CMakeLists.txt file from your AUTOSAR adaptive model:

  1. Open an AUTOSAR adaptive component model from which you want to generate the executable.

  2. In the Configuration Parameters dialog box, under Code Generation configuration parameters, set System target file as autosar_adaptive.tlc.

  3. In the AUTOSAR Code Generation configuration parameters, select the schema version.

  4. In the Code Generation > Build process > Toolchain settings > Toolchain configuration parameter field, select the AUTOSAR Adaptive Linux Executable toolchain. ARA functional cluster libraries provided by MathWorks® are added with the toolchain configuration displayed under Toolchain details.

  5. Build the model. The build generates C++ code, ARXML files, and the CMakeLists.txt file.

Configuration Parameters dialog box, Code Generation pane, with the System target file set to autosar_adaptive.tlc and the Toolchain set to AUTOSAR Adaptive Linux Executable.

Note

The AUTOSAR Adaptive Linux Executable toolchain is available only on Linux machines, on which you create and run the adaptive model executables.

Create AUTOSAR Adaptive Executable

To create an AUTOSAR adaptive application executable from the generated CMakeLists.txt file:

  1. Enter into the code generation folder of the model.

  2. Create the executable for the AUTOSAR adaptive model by using these commands:

    cmake -DCMAKE_BUILD_TYPE=Debug CMakeLists.txt;
    make all;
  3. Run the generated executable on your Linux host machine. You can use calibration tools with this executable to calibrate AUTOSAR data.

Related Topics