Build Simulink Model and Deploy Application
After connecting the development computer to the target computer, build the Simulink model
and deploy the standalone Linux application to the Linux environment. The support package
allows you to deploy Adaptive software component models, DDS Blockset models configured with
eProsima
, and RTI Connext
vendors.
Note
Deployment of DDS Blockset models with referenced models is not supported.
Steps to build a model and deploy the application.
For the Simulink model, select Hardware Implementation > Hardware board as
Embedded Coder Linux Docker Container
. This is mandatory for the model to deploy it using support package.Note
Building a model with Hardware board set to
Embedded Coder Linux Docker Container
generates the.mldatx
file.Click the Linux Target > Prepare > Create & Deploy Application Package.
If you have an application package (
.mldatx
) file already created, select it. Or you can select the Simulink model.Programmatically:
To create application package from Simulink model:
To deploy the application package:linux.createApplicationPackage(<modelName>);
tg.deployApplicationPackage(<NameOfSoftwarePackage>);
The Linux Runtime Manager builds the model, creates the application package, and deploys the package.
If there is an application package (.mldatx
) file available, you can
also deploy it on target in the following way:
Right-click the application package and select Open. The following window opens.
Choose a target and click the OK button. The selected application gets deployed on the target.
The application name is displayed under the target computer. To view the list of measurable signals and tunable parameters, select the deployed application.
Alternatively, use these commands.
To view the available signals:
availableSignals = tg.getMeasurements(<applicationName>);
availableParameters = tg.getParameters(<applicationName>);
Deploy DDS Blockset Models Configured with RTI Connext Vendor
To deploy DDS model configured with RTI Connext
vendor:
To deploy DDS applications configured with
RTI Connext
vendor, set the value of environment variable NDDSHOME_LINUX on host to theRTI Connext
software folder path on Linux target machine.For example:setenv('NDDSHOME_LINUX', '<Path for the software>')
setenv('NDDSHOME_LINUX', '/home/user/RTIDDS/glnxa64/rti_connext_dds-6.0.1_gcc7.3.0')
On the Linux Runtime manager, click Connect button. If the target setup is not done, a pop-up opens to fill the deployment location.
If the docker container is already present, delete it using this command:
docker rm linux-container
Click the Linux Target > Prepare > Create & Deploy Application Package and select the DDS Blockset model.
This will generate
MLDATX
file for the selected model and deploys it on the target.Select the application and click on Start Application to launch the application on target.
You can also deploy DDS Blockset models by converting them to Adaptive AUTOSAR models by using the function
linux.utils.migrateDds2Adaptive
.
Note
DDS Blockset models use broadcasting way of communication and Adaptive AUTOSAR models use locator based communication. To establish communication between Adaptive AUTOSAR and DDS Blockset models,
Set the Code Generation > Build process > Build configuration to
Specify
.Specify the Code Generation > Build process > Toolchain details > Defines as
-DDO_NOT_USE_LOCATORS
.
See Also
linux.utils.migrateDds2Adaptive
| deployApplicationPackage