Real-Time Workshop | ![]() ![]() |
Summary of Files Created by the Build Procedure
The following is a list of the model
.*
files created during the code generation and build process for the GRT and GRT malloc targets. Many of the files derive from model
.mdl
, created by Simulink, which you can think of as a very high-level programming language source file. Files generated for embedded applications by Real-Time Workshop Embedded Coder are packaged slightly differently. Depending on model architectures and code generation options, other files may also be created by the build process:
model
.rtw
, generated by Real-Time Workshop build process, is analogous to the object file created from a high-level language source program. This "compiled model" is deleted by default once the build is over, but may be retained for inspection.
model
.c
, generated by the Target Language Compiler, is the C source code corresponding to the model
.mdl
file. It contains
model
_data.c
model
.h
and model
_private.h
model
_data.c
, generated by the Target Language Compiler, is a conditionally-generated C source file that when present contains
model
_private.h
, generated by the Target Language Compiler, is a header file that contains
model
.h
, generated by the Target Language Compiler, is a header file that includes model
_private.h
and also defines
rtM
subsystem
.c
, containing executable code for each noninlined nonvirtual subsystem or copy thereof (when its code cannot be reused).
subsystem
.h
, containing exported symbols for noninlined nonvirtual subsystems, analogous to model
.h
.
model
.mk
, generated by the Real-Time Workshop build process, is the customized makefile used to build an executable.
model
.exe
(on PC) or
model
(on UNIX), is an executable program, created under control of the make
utility by your development system (unless you have specified Generate code only on the Target configuration
portion of the Real-Time Workshop pane).
In addition, for each build when the HTML report option is selected, a set of .html
files (one for each source file plus a model
_contents.html
index file) is generated in the /html
subdirectory within your build directory.
For more information, see Generated Source Files of the Real-Time Workshop documentation.
Overview of a model.rtw File
This section examines the basic features of a model
.rtw
file, which serves as input to the code generation process. The .rtw
file shown is generated from the source model shown below.
This model is saved in a file called example.mdl
. Real-Time Workshop generates example.rtw
., an ASCII file by compiling the model into structured records from which code can be generated. The example.rtw
file consists of parameter name/parameter value pairs, stored in a hierarchical structure of nested text records.
Below is an excerpt from example.rtw
. The majority of lines have been elided to highlight on the structure of the file rather than its specific contents. You can find a more extensive example of a model
.rtw
file in the Code Generation Architecture" section of the Target Language Compiler documentation.
For more information on these files, see the Appendix A of the Target Language Compiler documentation, which details all records comprising model
.rtw
files. The documentation also provides tutorials on processing such record files.
Directories Used in the Build Process
Real-Time Workshop creates output files in two directories during the build process:
model
.exe
(on PC) or model
(on UNIX).
model
_
target
_rtw
, where model
is the name of the source model and target
is the type of
the chosen target (e.g., grt
for generic real-time). The build directory stores generated source code and all other files created during the build process (except the executable).
The build directory always contains the generated code modules model
.c
, model
.h
, and model
_export.h
, and the generated makefile model
.mk
.
Depending upon the target and code generation and build options selected, additional files in the build directory may include
model
.rtw
.obj
or .o
) files
/html
subdirectory)
model
_bio.c
) and parameter tuning (model
_pt.c
) information files
model
.tmw)
files
![]() | 4. Create the Executable | Working with Real-Time Workshop | ![]() |