Why can't generate A2L file including parameters and measurements for AUTOSAR model in Simulink 2018b?

11 views (last 30 days)
My Simulink version is 2018b and simulink model is an AUTOSAR model. After I select ASAP2 interface option in Configuration Parameters - Code Generation - Interface, it will generate an A2L file when building model, but there isn't any parameters and measurements in A2L. Why is it? Is it because A2L generation for AUTOSAR model is not supported in Simulink2018b? If it is not supported, is there any other solutions to generate A2L for AUTOSAR model in Simulink?

Answers (1)

Manikanta Aditya
Manikanta Aditya on 3 Jan 2025
Edited: Manikanta Aditya on 3 Jan 2025
The issue you're encountering with generating an A2L file that includes parameters and measurements for an AUTOSAR model in Simulink 2018b is likely due to the limitations of that version. Simulink 2018b does not fully support the generation of A2L files with parameters and measurements for AUTOSAR models.
  • Consider upgrading to a newer version of Simulink that has enhanced support for AUTOSAR models and A2L file generation. For example, later versions like MATLAB R2020a and beyond have improved capabilities for generating A2L files with parameters and measurements for AUTOSAR models.
  • If upgrading is not an option, you might need to manually configure the data elements for ASAP2 file generation. This involves specifying the calibration and measurement properties for each data element in your model. You can use the Code Mappings Editor or command-line functions to set these properties.
  • Ensure you are using Embedded Coder, which provides additional features for code generation and A2L file creation. You can configure the model data elements and generate the A2L file using the Embedded Coder app
Refer to the following documentations:
I hope this helps you.
  2 Comments
Peng
Peng on 6 Jan 2025
Hi, @Manikanta Aditya, Thanks for your help. As upgrading can not be an option from my side, I tried to manually configure the data elements for ASAP2 file following the documentation you shared. However, as the system target file is selected as autosar.tlc, it is "Code - Mapping - AUTOSAR" in Code Perspective but not "Code - Mapping - C". If I change the system target file to ert.tlc, it is "Code - Mapping - C", but when building it will also fail. The error is as follows:
So I am thinking because parameter and signals are AUTOSAR object, they can not be configured in Embedded Coder. Is it correct?
Manikanta Aditya
Manikanta Aditya on 6 Jan 2025
Edited: Manikanta Aditya on 6 Jan 2025
Hi @Peng,
You're correct in your understanding.
Since your parameters and signals are AUTOSAR objects, they cannot be configured in Embedded Coder when using the ert.tlc system target file. The autosar.tlc system target file is specifically designed to handle AUTOSAR objects, and switching to ert.tlc will cause errors because it does not support AUTOSAR-specific configurations.
  • You might consider writing custom MATLAB scripts to automate the configuration of parameters and signals for the A2L file generation. This can help streamline the process and ensure that all necessary elements are correctly configured.

Sign in to comment.

Categories

Find more on AUTOSAR Blockset in Help Center and File Exchange

Products


Release

R2018b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!