Configure AUTOSAR Adaptive Model for External Mode Simulation
R2026bEmbedded Coder® Support Package for Service-Oriented Applications on Linux® enables you to configure an AUTOSAR adaptive model for external mode simulation using XCP communication channel. Install the support package from Add-Ons button from MATLAB home. For more information about the support package, see Install Embedded Coder Support Package for Service-Oriented Applications on Linux (Embedded Coder).
Steps to enable external mode simulation:
Open your AUTOSAR adaptive model.
Set the Hardware board configuration parameter in the Hardware Implementation to
Embedded Coder Linux Docker Container.Note
Embedded Coder Linux Docker Containeris only visible if the Embedded Coder Support Package for Service-Oriented Applications on Linux is installed.Enable the XCP service and configure the TCP port for XCP communication by using the
linux.setXCPServiceConfiguration(Embedded Coder) function.linux.setXCPServiceConfiguration("myModel", Enabled=true, TCPPort=12345);Enable the External mode option in the Interface pane of Code Generation section.
To log signals, select the signals you want to log and click the Log Signals in the Prepare pane of the Simulation section.
Open the Linux Runtime Manager from the Simulink apps gallery. Alternatively, enter this command at the MATLAB Command Window.
linuxRuntimeManager
Deploy the model on the Linux target machine. See Build Simulink Model and Deploy Application (Embedded Coder) for more information.
Select the model on the Linux Runtime Manager and click Monitor & Tune button. This will start the application and external mode simulation.
See Also
linux.setXCPServiceConfiguration (Embedded Coder) | linux.getXCPServiceConfiguration (Embedded Coder) | Linux Runtime
Manager (Embedded Coder)
Topics
- Build Simulink Model and Deploy Application (Embedded Coder)
- Get Started with Embedded Coder Support Package for Service-Oriented Applications on Linux
- Event Communication Between AUTOSAR Adaptive Applications Using Periodic Reception
- Event Communication Between AUTOSAR Adaptive Applications Using Event Driven Approach