User`s guide

1 Introduction to the Real-Time Workshop
1-14
Target Language Compiler
To generate code, the Real-Time Workshop invokes the Target Language
Compiler (TLC). The Target Language Compiler transforms an intermediate
model description generated by the Real-Time Workshop of your Simulink
block diagram into target specific code. The intermediate description of your
model is saved in an ASCII file called
model.rtw.
The Target Language Compiler allows you to modify most aspects of the
generated code. The compiler reads the
model.rtw file and executes a TLC
program that consists of a set of target files (
.tlc files). These are ASCII files
written for the Target Language Compiler. The TLC program specifies how to
transform the
model.rtw file into generated code.
The TLC program consists of:
The entry point or main file. This is called the system target file.
A set of block target files. These specify how to translate each block in your
model into target-specific code.
A Target Language Compiler function library. This is a set of library
functions that the TLC program uses when converting the
model.rtw file
into generated code.
The complete TLC program is provided with the Real-Time Workshop.
If you are familiar with HTML, Perl, and MATLAB, you may see similarities
between these and the Target Language Compiler. The Target Language
Compiler has the mark-up language features, like HTML, the power and
flexibility of Perl and other scripting languages, and the data handling power
of MATLAB. The Target Language Compiler is designed for one purpose — to
convert the model description file,
model.rtw, into target-specific code.
Make Utility
The Real-Time Workshop invokes make to build the real-time executable. Make
is a utility that compiles and links the generated code to create an executable.
The
model.mk makefile, which the system template makefile, system.tmf,
creates, in turn invokes
make. You can fully configure the make utility by
modifying the system template makefile.
The Real-Time Workshop passes
model.mk to the make utility, which directs
the compilation and linking of model code along with any libraries or user
provided modules.