Advice About TLC Tutorials
The fastest and easiest way to understand the Target Language Compiler (TLC) is to run it, paying attention to how TLC scripts transform compiled Simulink® models (
.rtw files) into source code. The tutorials highlight the principal reasons for and techniques of using TLC. The tutorials provide a number of TLC exercises.
The example models, S-functions, and TLC files for the exercises are located in the folder
tlctutorial. Each example is located in a separate subfolder within
tlctutorial. Within that subfolder, you can find solutions to the problem in a
Each tutorial exercise is limited in scope, requiring just a small amount of experimentation. The tutorial explains details about TLC that will help customize and optimize code for code generation projects.
Note: You should not customize TLC files in the folder
/rtw/c/tlc even though the capability exists to do so. Such TLC customizations might not be applied during the code generation process and can lead to unpredictable results.
The tutorials progress in difficulty from basic to more advanced. To get the most out of them, you should be familiar with
Working in the MATLAB® environment
Building Simulink models
Using the code generator to produce code for target systems
High-level language concepts (for example, C or Fortran programming)