Real-Time Workshop    

Building the Program

Once you have created the Simulink block diagram, added the device drivers, and configured the makefile template, you are ready to set the build options and initiate the build process.

Specifying the Real-Time Build Options

Set the real-time build options using the Solver and Real-Time Workshop pages of the Simulation Parameters dialog box. To access this dialog box, select Simulation Parameters from the Simulink Simulation menu.

In the Solver pane, for models with continuous blocks, set the Type to Fixed-step, the Step Size to the desired integration step size, and select the integration algorithm. For models that are purely discrete, set the integration algorithm to discrete.

Next, use the System Target File Browser to select the correct Real-Time Workshop pane settings for Tornado. To access the browser, open the Real-Time Workshop pane of the Simulation Parameters dialog box and select Target configuration from the Category menu. Then click the Browse button. The System Target Browser opens.

Select Tornado (VxWorks) Real-Time Target and click OK. This sets the Target configuration options correctly:

You can optionally inline parameters for the blocks in the C code, which can improve performance. Inlining parameters is allowed when using external mode.

Code Generation Options.   To specify code generation options specific to Tornado, open the Real-Time Workshop pane and select Tornado code generation options from the Category menu.

Real-Time Workshop provides flags that set the appropriate macros in the template makefile, causing any necessary additional steps to be performed during the build process.

The flags and switches are as follows:

Additional options are available on the Real-Time Workshop pane. See Using the Real-Time Workshop Pane for information.

Initiating the Build

To build the program, click on the Build button in the Real-Time Workshop pane of the Simulation parameters dialog. The resulting object file is named with the .lo extension (which stands for loadable object). This file has been compiled for the target processor using the cross compiler specified in the makefile. If automatic downloading (Download to VxWorks target) is enabled in the Tornado code generation options, the target server is started and the object file is downloaded and started on the target. If StethoScope was checked on the Tornado code generation options, you can now start StethoScope on the host. The StethoScope object files, libxdr.so, libutilstssip.so, and libscope.so, will be loaded on the VxWorks target by the automatic download. See the StethoScope User's Manual for more information.


  Configuring the Template Makefile Downloading and Running the Executable Interactively