Main Content

Target Language Compiler

Define block code generation behavior using Target Language Compiler

Target Language Compiler (TLC) is an integral part of the code generator. Use TLC to customize generated code. Through customization, you can produce platform-specific code and incorporate your own algorithmic changes for performance, code size, or compatibility with existing methods.

With the Target Language Compiler, you can :

  • Customize the set of options specified by your system target file.

  • Inline the code for S-Function blocks.

  • Generate additional or different types of files.

To learn about the basics of TLC, see Target Language Compiler Basics.

Topics

Getting Started

Target Language Compiler Tutorials

Code Generation Architecture

model.rtw File

Directives and Built-in Functions

S-Function Inlining

TLC Library Reference

Debugging and Error Handling

  • Using the TLC Debugger
    Use the TLC debugger to execute TLC code line-by-line, analyze and/or change variables in a specified block scope, and view the TLC call stack.
  • TLC Coverage
    Determine what TLC statements are executed.
  • TLC Profiler
    Measure the execution time of each TLC function.
  • TLC Error Handling
    Use this alphabetical list of error messages to detect and address error conditions in your TLC code.