Main Content

Target Language Compiler

Customize generated code, inline code generated for S-Function blocks, and generate additional or different types of files

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.

For simpler alternative approaches for interfacing between generated and external code, see Generated Code Interfacing.


Getting Started

Target Language Compiler Tutorials

Code Generation Architecture

model.rtw File

Directives and Built-in Functions

S-Function Inlining

TLC Function 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.