Real-Time Workshop    

Building the Program

Once you have created your Simulink model and added the appropriate device driver blocks, you are ready to build a DOS target application. To do this, select the Real-Time Workshop pane of the Simulink parameters dialog box, and select Target configuration from the Category menu.

Click Browse to open the System Target File Browser. Select drt.tlc; this automatically fills in the correct files as shown above:

You can specify Target Language Compiler options in the System target file field following drt.tlc. You can also specify and make options in the Make command field. See Code Generation and the Build Process for descriptions of the available Target Language Compiler and make options.

The DOS system target file, drt.tlc, and the template makefile, drt_watc.tmf, are located in the matlab\rtw\c\dos directory.

The template makefile assumes that the Watcom C/386 compiler, assembler, and linker have been correctly installed on the host workstation. You can verify this by checking the environment variable, WATCOM, which correctly points to the directory where the Watcom files are installed.

The program builder invokes the Watcom wmake utility on the generated makefile, so the directory where wmake is installed must be on your path.

Running the Program

The result of the build process is a DOS 32-bit protected-mode executable. The default name of the executable is model.exe, where model is the name of your Simulink model. You must run this executable in DOS; you cannot run the executable in Windows.


  Adding Device Driver Blocks to the Model The Real-Time Workshop Development Process