Customizing Code Generation

www.kxcad.net Home > CAE Software Index > MATLAB Index >



The xPC Target build process enables you to customize code generation for additional processing, such as adding custom messages, or extracting from the model additional information that is not normally performed during code generation. For examples:

xPC Target provides this capability using the Real-Time Workshop Target Language Compiler. This feature assumes that you are familiar with the Real-Time Workshop Target Language Compiler and its directives.

  1. To add your custom code, change directory to matlabroot\toolbox\rtw\targets\xpc\target\build\tlc.

  2. Using the MATLAB editor or another text editor, edit the customentry.tlc file to add your custom generation commands using the Real-Time Workshop Target Language Compiler directives (Directives and Built-In Functions). The following is the default customentry.tlc file.

    %%%%%%%%% Add your custom code generation commands here.
    %%% The following is an example to output custom messages to the build process.
    %selectfile STDOUT
    %if RTWVerbose
    %%% Add custom output messages here.
    %endif
    %selectfile NULL_FILE
  


© 1984-2007 The MathWorks, Inc. Terms of Use Patents Trademarks Acknowledgments