Main Content

本页翻译不是最新的。点击此处可查看最新英文版本。

目标语言编译器

自定义生成的代码、内联为 S-Function 模块生成的代码,以及生成其他或不同类型的文件

目标语言编译器 (TLC) 是代码生成器的重要组成部分。使用 TLC 自定义生成的代码。通过自定义,您可以生成特定于平台的代码并融入您自己的算法更改,以改善性能、代码大小或与现有方法的兼容性。

使用目标语言编译器,您可以:

  • 自定义系统目标文件指定的选项集。

  • 内联 S-Function 模块的代码。

  • 生成其他或不同类型的文件。

要了解 TLC 的基础知识,请参阅目标语言编译器基础知识

有关生成的代码和外部代码之间对接的更简单替代方法,请参阅外部代码导入

主题

快速入门

目标语言编译器教程

代码生成架构

model.rtw 文件

指令和内置函数

S-Function 内联

TLC 函数库参考

调试和错误处理

  • 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.