Target Language Compiler    

Invoking Code Generation

Typically, rtwgen and TLC (as seen in the first section) are called directly from the Real-Time Workshop build procedure. This avoids problems that may arise due to command arguments changing from release to release. Thus you normally invoke rtwgen and tlc when you click the Build (or Generate code) button on the Real-Time Workshop dialog box. Sometimes, however, circumstances may require you to execute rtwgen and tlc directly from the MATLAB prompt.

The rtwgen Command

To generate the model.rtw file from the MATLAB prompt, it usually suffices to type

However, you may want to specify a build directory in which to place the output file. You exercise this and other options using keyword, value syntax.

You may specify other options to rtwgen, such as whether or not identifiers should have case sensitivity, and reserved keywords. For more details, type

at the MATLAB prompt.

The tlc Command

Once the .rtw file generates, to run the Target Language Compiler on this file, type

This generates output as directed by file.tlc. Options to TLC include

For more details, type

at the MATLAB prompt.


  A Basic Example Configuring TLC