User`s guide

2 Getting Started with the Real-Time Workshop
2-4
Write a harness program (i.e., main)
Install a C compiler
A bundled harness program is supplied for the Tornado and DOS operating
systems. That is, these harnesses can be used without modification. More
generic harnesses are supplied as starting points for targeting a different
operating system. The Real-Time Workshop User’s Guide addresses each of the
items identified in this overview to assist you in making the generated code
work for your engineering application.
The following sections map real-time development tasks to corresponding
sections of this book.
1. Single- and Multitasking Code Generation
The Real-Time Workshop fully supports single- and multitasking code
generation. See Chapter 7, “Models with Multiple Sample Rates,” for a
complete description.
2. Customizing Generated Code
The Real-Time Workshop provides a Custom Code library that supports
customizationofthegeneratedcode.See“CustomCodeLibrary”onpage11-4
for a description of this library.
An alternative approach to customizing generated code is to modify Target
Language Compiler
TM
(TLC) files. The Target Language Compiler is a
interpreted language that translates Simulink models into C code. Using the
Target Language Compiler, you can customize the generated code.
TherearetwoTLCfiles,
hookslib.tlc and cachelib.tlc,thatcontain
functions you can use to customize Real-Time Workshop generated code. See
Chapters3and4oftheTarget Language Reference Guide for more information
about TLC files. The following functions are available in
hookslib.tlc:
LibCacheDefine, LibCacheExtern, LibCacheFunctionPrototype,
LibCacheIncludes
, LibCacheNonFiniteAssignment, LibCacheTypeDefs
The following functions are available in cachelib.tlc:
LibHeaderFileCustomCode, LibPrmFileCustomCode,
LibRegFileCustomCode
, LibSourceFileCustomCode,
LibMdlStartCustomCode
, LibMdlTerminateCustomCode,