Code Generation
After creating and developing a Simulink® representation of an AUTOSAR adaptive software component, generate code for testing or for integration into the AUTOSAR run-time environment. AUTOSAR code generation requires Simulink Coder™ and Embedded Coder®.
From an adaptive model, you can build a Linux executable or library. For Linux testing, you can configure run-time calibration, measurement, and logging.
Functions
| coder.asap2.export | Generate ASAP2 (A2L) file according to ASAM MCD-2 MC standards (Since R2021a) | 
| createManifest | Create manifest file for AUTOSAR adaptive model (Since R2021a) | 
| getClassName | Get class name of model (Since R2021a) | 
| setClassName | Set class name of model (Since R2021b) | 
| getClassNamespace | Get class namespace for a model (Since R2021a) | 
| setClassNamespace | Set class namespace of model (Since R2021b) | 
Topics
- Generate AUTOSAR Adaptive C++ Code and XML DescriptionsGenerate AUTOSAR-compliant C++ code and export AUTOSAR XML (ARXML) descriptions from AUTOSAR adaptive component model. 
- Configure AUTOSAR Adaptive Code GenerationConfigure code generation for AUTOSAR adaptive model. 
- Model Configuration Parameters: Code Generation AUTOSAR (Embedded Coder)Parameters for controlling AUTOSAR code generation. 
- Configure AUTOSAR Adaptive Data for Run-Time Calibration and MeasurementGenerate XCP Server function calls and ASAP2 (A2L) file for calibrating AUTOSAR adaptive model data. 
- Configure AUTOSAR Adaptive Model for External Mode SimulationConfigure AUTOSAR Adaptive model for external simulation using XCP communication channel. 
- Build Library or Executable from AUTOSAR Adaptive ModelGenerate libraries and executables from AUTOSAR adaptive model. 
- Build Out of the Box Linux Executable from AUTOSAR Adaptive ModelGenerate Linux executable for AUTOSAR adaptive model. 
- Configure Run-Time Logging for AUTOSAR Adaptive ExecutablesForward AUTOSAR adaptive event logging information to a console, file or network. 
- Generate Static Code MetricsGenerate static code metrics for AUTOSAR adaptive models. 
- Limitations and TipsLimitations that apply to AUTOSAR code generation.