| Version 3.2 (R13SP1+) Real-Time Workshop® Embedded Coder™ Software Release Notes | ![]() |
This table summarizes what's new in Version 3.2 (R13SP1+):
| New Features and Changes | Version Compatibility Considerations | Fixed Bugs and Known Problems | Related Documentation at Web Site |
|---|---|---|---|
| Yes Details below | No | No bug fixes | No |
New features and changes introduced in this version are:
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
How to specify target characteristics (such as word sizes for C data types) for the build process, so that generated code is correct for deployment on target hardware
A general hook file mechanism for adding target-specific customizations to the build process
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.
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.

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.
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:
RTW Embedded Coder (auto configures for optimized fixed-point code): To optimize for fixed-point code generation, select this target from the System Target File Browser.
RTW Embedded Coder (auto configures for optimized floating-point code): To optimize for floating-point code generation, select this target from the System Target File Browser.
The use of these targets is detailed in the Advanced Code Generation Techniques chapter of the Real-Time Workshop Embedded Coder User's Guide.
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
Generate virtually any type of source (.c) or header (.h) file. A CFP template can emit code to the standard generated model files (e.g., model.c, model.h, etc.) or generate files that are independent of model code.
Organize generated code into sections (such as includes, typedefs, functions, and more). Your CFP template can emit code (e.g., functions), directives (such as #define or #include statements), or comments into each section as required.
Generate code to call model functions such as model_initialize, model_step, etc.
Generate code to read and write model inputs and outputs.
Generate a main program module.
Obtain information about the model and the files being generated from it.
CFP templates are described in the Advanced Code Generation Techniques chapter of the Real-Time Workshop Embedded Coder User's Guide.
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.
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.
![]() | Version 3.2.1 (R13SP2) Real-Time Workshop Embedded Coder Software | Version 3.1 (R13SP1) Real-Time Workshop Embedded Coder Software | ![]() |
| © 1984-2008- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |