User`s guide
Quick Start Tutorials
3-9
Tutorial 1: Building a Generic Real-Time Program
This tutorial walks through the process of generating C code and building an
executable program from the demonstration model. The resultant
stand-alone program runs on your workstation, independent of external
timing and events.
Working and Build Directories
It is convenient to work with a local copy of the f14 model, stored in its own
directory,
f14example. This discussion assumes that the f14example
directory resides on drive
d:. Set up your working directory as follows:
1 Create the directory from the MATLAB command line by typing
!mkdir d:\f14example (on PC)
or
!mkdir ~/f14example (on UNIX)
2 Make f14example your working directory (drive d: used as example).
cd d:/f14example
3 Open the f14 model.
f14
The model appears in the Simulink window.
4 From the File menu, choose Save As. You need to navigate to or to specify
your working directory. Save a copy of the
f14 model as
d:/f14example/f14rtw.mdl.
During code generation, Real-Time Workshop creates a build directory within
your working directory. The build directory name is
model_target_rtw,
derived from the name of the source model and the chosen target. The build
directory stores generated source code and other files created during the build
process. You examine the build directory contents at the end of this tutorial.