Target Language Compiler    

Summary of Target File Usage

In the context of the Real-Time Workshop, there are two types of target files, system target files and block target files:

You must write or modify a target file if you need to do one of the following:

  1. The code generated for each block is defined by a block target file. Some of the things defined in the block target file include what the block outputs at each major time step and what information the block updates.

  1. Inlining an S-function means writing a target file that tells the Target Language Compiler how to generate code for that S-function block. The Target Language Compiler can automatically generate code for noninlined C MEX S-functions. However, if you inline a C MEX S-function, the compiler can generate more efficient code. Noninlined C MEX S-functions are executed using the S-function Application Program Interface (API) and can be inefficient.

    It is possible to inline an M-file or Fortran S-function; the Target Language Compiler can generate code for the S-function in both these cases.

  1. You may want to instrument the generated code for profiling, or make other changes to overall code generation for all models. To accomplish such changes, you must modify some of the system target files.

  1. The Target Language Compiler provides the basic framework to configure the entire Real-Time Workshop for code generation in another language.

Refer to Directives and Built-in Functions, for a description of the Target Language and A TLC Tutorial, for a tutorial on using the Target Language and a description of how to inline S-functions.


  Available Target Files System Target Files