Create AUTOSAR Adaptive Software Component Model
R2026bCreate AUTOSAR Adaptive software component models in Simulink® by using one of these methods:
Import ARXML files with
arxml.importerand using thecreateComponentAsModelfunction. For an example, see Import AUTOSAR Adaptive Components to Simulink.Create a Simulink model algorithm with blocks and signals and then configuring the model as an AUTOSAR Adaptive software component with the AUTOSAR Component Designer app. For more information, see Model AUTOSAR Adaptive Component and Elements in Simulink.
Create and configure an AUTOSAR Adaptive software component from an existing Simulink model.
In this tutorial, you create model my_autosar_LaneGuidance
from Simulink model LaneGuidance.

For your reference, you can open example model autosar_LaneGuidance to
check your work and explore a configured AUTOSAR Adaptive software component model.
Open example model
LaneGuidance:openExample("LaneGuidance");Set configuration parameter System target file to
autosar_adaptive.tlc. This system target file enables AUTOSAR Blockset software and sets these configuration parameters in the model:Configuration Parameter Value Language C++Toolchain AUTOSAR Adaptive | CMakeCode replacement library C++ Standard Library MutexArray container type std::arrayAUTOSAR schema version R22-11Maximum short name length 128Verify the solver settings, which determine the execution period of the generated code. The fixed-step size directly controls the periodic task rate in the
main.cppfile that is generated in the last step of this tutorial.Configuration Parameter Value Type Fixed-stepSolver auto (Automatic solver selection)Fixed-step size 0.2Periodic same time constraint UnconstrainedExamine the bus element ports that model event-based data communication in the model. The model consists of a subsystem,
LaneGuidanceAlgorithm, with In Bus Element and Out Bus Element blocks.Port Elements LeftSensorLaneDistanceTurnIndicatorCarInBlindSpot
RightSensorLaneDistanceTurnIndicatorCarInBlindSpot
HazardIndicatorLeftRight
Save the model to a writable folder on your current MATLAB® search path. Name the file
my_autosar_LaneGuidance.slx.
Next, see Configure AUTOSAR Adaptive Software Component Ports and Interfaces.