| Contents | Index |
| On this page… |
|---|
This example shows you how to generate code on a Windows host, and then build it remotely on a BeagleBoard running Linux.
Download and install the following PuTTY utilities from http://www.chiark.greenend.org.uk/~sgtatham/putty/download:
Plink (a command-line interface to the PuTTY back ends)
PSCP (an SCP client)
Install the GNU-compiler toolchain on the BeagleBoard. Open a terminal session with the Linux command line on the BeagleBoard.
For example, on a board running the Angstrom Linux distribution, enter the following commands:
root@beagleboard:~# opkg install binutils root@beagleboard:~# opkg install gcc root@beagleboard:~# opkg install gcc-symlinks root@beagleboard:~# opkg install cpp-symlinks root@beagleboard:~# opkg install libstdc++-dev root@beagleboard:~# opkg install make-dev
Configure MATLAB to generate code.
Enter xmakefilesetup at the MATLAB command line. In the XMakefile Configuration dialog, set template to gmake and configuration to gcc_target.
Open the Target Preferences block in your model. Set IDE/Toolchain to Eclipse, set Board to BeagleBoard ARM, and set Operating System to Linux.
In your model, open Simulation > Configuration Settings. Under Code Generation, select the IDE Link pane. Set Build format to Makefile, and set Build Action to Create_makefile.
Generate the code by pressing Ctrl B.
Use the load method to load the buildInfo.mat file from the project directory to the BeagleBoard. For example, at the MATLAB command prompt enter:
s =load('sumdiff_codegen_eclipseide\buildInfo.mat')Use remoteBuild function to build the code on the BeagleBoard. For example, enter:
remoteBuild(s.buildInfo, '/home/root', '144.212.110.193', 'root', 'password', 'C:\utils\putty')
The GNU compiler toolchain automatically builds and runs the software on the BeagleBoard.
For more information, see remoteBuild.
![]() | Scheduler | Example: Build Generated Code on a Linux Host, Then Run It Remotely on BeagleBoard | ![]() |

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 |