User`s guide

The Build Process
2-15
The Build Process
Real-Time Workshop generates C code only or generates the C code and
produces an executable image, depending on the level of processing you
choose. By default, a
Build button appears on the Real-Time Workshop pane
of the
Configuration Parameters dialog. This button completes the entire
build process and an executable image results. If you select the
Generate
code only
check box to the left of the button, the button label changes to
Generate code.
When you click the
Build or Generate code button, Real-Time Workshop
completes the following process.
Note If Real-Time Workshop detects code generation constraints for your
model, Real-Time Workshop issues warning or error messages.
1 Model Compilation. Real-Time Workshop analyzes your block diagram
(and any models referenced by Model blocks) and compiles an intermediate
hierarchical representation in a file called
model.rtw.
2 Code Generation. The Target Language Compiler reads model.rtw,
translates it to C code, and places the C file in a build directory within your
working directory.
When you click
Generate code, processing stops here.
3 Customized Makefile Generation. Real-Time Workshop constructs a
makefile from the appropriate target makefile template, and writes it in
the build directory.
4 Executable Program Generation. Your system’s make utility reads the
makefile to compile source code, link object files and libraries, and
generate an executable image (called
model or model.exe). The makefile
places the executable image in your working directory.
If you select
Generate HTML report on the Real-Time Workshop pane,
a MATLAB browser window displays a report when the build is done. The
report files occupy a directory called
/html within the build directory. The