Version 3.2 (R13SP1+) Real-Time Workshop Embedded Coder Software

This table summarizes what's new in Version 3.2 (R13SP1+):

New Features and ChangesVersion Compatibility ConsiderationsFixed Bugs and Known ProblemsRelated Documentation at Web Site
Yes
Details below
NoNo bug fixesNo

New features and changes introduced in this version are:

Advanced Code Generation Techniques Documented

A new chapter, Advanced Code Generation Techniques, has been added to the Real-Time Workshop Embedded Coder User's Guide. This chapter contains complete information on the new features that are summarized in these release notes. In addition, the chapter documents useful code generation, optimization, and customization techniques that have not received wide exposure in previous releases. These include

New Code Generation Options

Several new code generation options have been added, and some changes have been made to the layout of Embedded Real-Time (ERT) target code generation options in the Real-Time Workshop pane of the Simulation Parameters dialog box.

Options Layout Changes and Additions

The Suppress error status in real-time model data structure option has been relocated to the ERT code generation options (2) category, as shown in this figure.

A new code generation option, Pass model I/O arguments as structure reference, is now available in the ERT code generation options (3) category, as shown below. This option is described in Passing Model I/O Arguments to the model_step Function.

A new group of options supporting use of code templates, a powerful and simple technique for customizing generated code, has been added. These options are available in the ERT code templates category of the Real-Time Workshop pane of the Simulation Parameters dialog box (see the figure below). Code templates are summarized in Code Templates for Customizing Generated Code.

Auto-Configuration of Models for Code Generation

Real-Time Workshop Embedded Coder now supports automated configuration of all (or selected) model parameters during the code generation process. By automatically configuring a model in this way, you can avoid manually configuring models. This saves time and eliminates potential errors.

Auto-configuration is performed by executing an M-file (referred to as a hook file) that is executed as part of the target build process. Therefore, auto-configuration becomes a function of the target that invokes the hook file. You can direct the automatic configuration process to save existing model settings before code generation and restore them afterwards, so that options the user chooses manually are not disturbed.

The automatic configuration process, and utilities provided to support auto-configuration, are described in the Advanced Code Generation Techniques chapter of the Real-Time Workshop Embedded Coder User's Guide.

Optimized ERT Targets for Fixed-Point and Floating-Point Code Generation

To make it easier for you to customize a hook file that is optimized for your target hardware, Real-Time Workshop Embedded Coder provides two variants of the ERT target:

The use of these targets is detailed in the Advanced Code Generation Techniques chapter of the Real-Time Workshop Embedded Coder User's Guide.

Code Templates for Customizing Generated Code

The ERT target now supports use of custom file processing templates (CFP templates).

A CFP template is a Target Language Compiler (TLC) file that calls a high-level applications programming interface (API), referred to as the code template API. The code template API simplifies generation of custom source code by letting you

CFP templates are described in the Advanced Code Generation Techniques chapter of the Real-Time Workshop Embedded Coder User's Guide.

Custom File Banner Generation

The ERT target now supports use of banner templates during code generation. A banner template is a TLC file that specifies banner and trailer comments that are emitted to generated source (.c) and header (.h) files. Banner templates are described in the Advanced Code Generation Techniques chapter of the Real-Time Workshop Embedded Coder User's Guide.

Passing Model I/O Arguments to the model_step Function

A new code generation option, Pass model I/O arguments as structure reference, lets you control how model inputs and outputs at the root level of the model are passed in to the model_step function. This option is available in the ERT code generation options (3) category of the Real-Time Workshop pane of the Simulation Parameters dialog box. When Generate reusable code is selected, Pass model I/O arguments as structure reference is enabled, as shown in this figure.

When Pass model I/O arguments as structure reference is deselected (the default), each root-level model input and output is passed to model_step as a separate argument. When this option is selected, all root-level inputs are packed into a struct that is passed to model_step as an argument. Likewise, all root-level outputs are packed into a struct that is also passed to model_step as an argument. Selecting Pass model I/O arguments as structure reference can reduce the number of arguments passed in to model_step.

See the Code Generation Options and Optimizations chapter of the Real-Time Workshop Embedded Coder User's Guide for further details.

  


 © 1984-2008- The MathWorks, Inc.    -   Site Help   -   Patents   -   Trademarks   -   Privacy Policy   -   Preventing Piracy   -   RSS