User`s guide

Creating System Target Files and Template Makefiles
10-5
Creating System Target Files and Template Makefiles
Assuming that you’ve created the directory
/applications/mytarget
youshouldcopymatlabroot/rtw/c/grt/grt.tlc into it and rename grt.tlc
to mytarget.tlc. You can then modify your system target file as needed, based
on the requirements of your real-time target. You should modify or remove the
first comment lines that define browser information.
Chapter 3, “Code Generation and the Build Process,” provides information on
how makefiles work. If your compiler and linker come with a
make utility, then
you can use it providing that it conforms to the general” structure of most
make
utilities. If a make utility isn’t provided with your compiler, you can use GNU
make, which is located in rtw/bin/arch/make. When working with GNU make,
youshoulduse
grt_unix.tmf as a starting point — even on PC platforms.
You should copy one of the
matlabroot/rtw/c/grt/*.tmf template makefiles
to
/applications/mytarget and rename it mytarget.tlc.Youwillneedto
modify the template makefile to support your compiler, linker, and your
version of
make.
You can exercise
mytarget.tlc and mytarget.tmf by creating a small
Simulink fixed-step model. In the Real-Time Workshop page of the
Simulation
Parameters
dialog box, you must set the System target file to mytarget.tlc
and the Template makefile to mytarget.tmf: