Skip to Main Content Skip to Search
Product Documentation

remoteBuild - Build Simulink-generated code on remote target running Linux

Syntax

remoteBuild('modelname','targetrtwstartdir','targetipaddress','username','passwd','putilsfolder')
remoteBuild(bd.buildInfo,'targetrtwstartdir','targetipaddress','username','passwd','putilsfolder')

Description

This function is only supported for generating code on a Windows host computers, and then performing a remote build on an embedded Linux® target.

Performing a remote build is a two-stage process. In the first stage, you generate source files and a makefile from your Simulink model without compiling and linking. In the second stage, you use remoteBuild to download the source files and a makefile to the remote target. There, the compiler and linker complete the build process. For more information, see Example: Build Generated Code on a BeagleBoard Running Linux.

The remoteBuild function supports two different syntaxes, one simple, the other a little more complex.

For the simple syntax, enter the model name as the first argument, 'modelname'. For example:

remoteBuild('modelname','targetrtwstartdir','targetipaddress','username','passwd','putilsfolder')

For the more complex syntax, use the load function to create an object with the build information structure of the model:

bd = load('path'\'filename'.mat')

Then supply that object and build information as the first argument, bd.buildinfo. For example:

remoteBuild(bd.buildInfo,'targetrtwstartdir','targetipaddress','username','passwd','putilsfolder')

Tips

Input Arguments

modelname

Specify the name of the model. For example, sdl_test_beagle.

bd

Specify the object that contains the build information structure of the model. For example, bd.buildInfo.

First, use the Simulink load command to create this object from the buildInfo.mat file, located among the files you generated from your model. For example,

bd = load('C:\Documents\MATLAB\foo_eclipseide\buildInfo.mat')

targetrtwstartdir

The path of the destination folder on the remote Linux target to which remoteBuild copies the generated source and header files. For example: '/home/root/devel'

If the destination folder does not exist, remoteBuild creates it.

targetipaddress

The IP address or the host name of the remote Linux target. For example, '10.10.10.1'

username

The name of the user that runs ssh commands on the remote Linux target. For example, 'root'

passwd

Enter the password for username. If the username does not have a password, provide empty quotes. For example ''

putilsfolder

The path of the folder on the Windows host that contains plink.exe and pscp.exe. For example, 'C:\putils'

Examples

Using the one-step approach, supply the model name as the first argument:

remoteBuild('sdl_test_beagle','/home/root/devel','10.10.10.1','root','','C:\putils')

Using the one-step approach, first create an object with the board specification. Then supply that object as the first argument:

bd = load('C:\Documents\MATLAB\foo_eclipseide\buildInfo.mat')
remoteBuild(bd.buildInfo,'/home/root/devel','10.10.10.1','root','','C:\putils')

References

This stage requires using makefiles (Build format = Makefile), as described in Makefiles for Software Build Tool Chains.

See Also

load | xmakefilesetup

  


Related Products & Applications

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.

 © 1984-2012- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS