Target Language Compiler    

System Target Files

The entire code generation process starts with the single system target file that you specify in the Real-Time Workshop pane of the Simulation Parameters dialog box. A close examination of a system target file reveals how code generation occurs. This a listing of the noncomment lines in grt.tlc, the target file to generate code for a generic real-time executable:

The three variables, MatFileLogging, TargetType, and Language, are global TLC variables used by other functions. Code generation is then initiated with the call to codegenentry.tlc, the main entry point for Real-Time Workshop.

If you want to make changes to modify overall code generation, you must change the system target file. After the initial setup, instead of calling codegenentry.tlc, you must call your own TLC files. The code below shows an example system target file called mygrt.tlc.

Generated code is placed in a model or subsystem function. The relevant generated function names and their execution order is detailed in the Real-Time Workshop documentation. During code generation, functions from each of the block target files are executed and the generated code is placed in the appropriate model or subsystem functions.


  Summary of Target File Usage Block Target Files