Technical data
3 
Writing Target Language Files
3-6
Target Language Compiler Architecture
System Target Files
Table 3-1 lists the system target files that generate the RTW code.
Note: The grt.tlc file is in the /MATLAB/rtw/c/grt directory. All the system, 
library, and block target files referred to in this section are in the
/MATLAB/rtw/c/tlc directory.
To generate all of the associated generic real-time RTW code, you execute:
tlc –r model.rtw MATLAB/rtw/c/grt/grt.tlc –IMATLAB/rtw/c/tlc
As the names suggest, mdlhdr.tlc creates the model’s header file model.h, 
mdlparam.tlc creates the model’s parameters file model.prm, mdlreg.tlc 
creates the model’s function registration file, and 
mdlbody.tlc creates the 
model’s source code file 
model.c. If the code size in model.c reaches the file size 
threshold, code generation continues in 
model1.c. This process continues in 
model2.c, and so on.
Table 3-1: System Target Files
System Target File Purpose
grt.tlc
Assigns specific variables required for generic 
real-time code generation, and is the Target 
Language Compiler entry point.
mdlwide.tlc
Assigns more generalized variables required for 
RTW code generation, and is included by 
grt.tlc.
mdlbody.tlc
Included by mdlwide.tlc.
mdlreg.tlc
Included by mdlbody.tlc.
mdlhdr.tlc
Included by mdlreg.tlc.
mdlparam.tlc
Included by mdlreg.tlc.










