| Products & Services | Solutions | Academia | Support | User Community | Company |
| Download Product Updates | | | Get Pricing | | | Trial Software |
| Documentation → Real-Time Workshop Embedded Coder |
| Contents | Index |
| Learn more about Real-Time Workshop Embedded Coder |
This table summarizes what's new in Version 5.1 (R2008a):
| New Features and Changes | Version Compatibility Considerations | Fixed Bugs and Known Problems | Related Documentation at Web Site |
|---|---|---|---|
| Yes Details below | Yes—Details labeled as Compatibility Considerations, below. See also Summary | Bug
Reports Includes fixes | No |
New features and changes introduced in this version are
Bidirectional Traceability for Stateflow Charts and Embedded MATLAB Functions
Improved MISRA C Compliance for Matrix Math Utilities and Lookup Block Utilities
math.h Header File Inclusion Now Controllable Through Target Function Library Customization
"What's This?" Context-Sensitive Help Available for Simulink Configuration Parameters Dialog
Real-Time Workshop Embedded Coder V5.1 (R2008a) provides AUTOSAR-compliant code generation configurable by GUI, command line functions, or AUTOSAR-compliant XML files. For information, see Generating Code That Complies with AUTOSAR Standards in the Real-Time Workshop Embedded Coder User's Guide documentation.
Select the new system target file autosar.tlc to access the AUTOSAR Code Generation Options pane in the Configuration Parameters dialog box. You can then launch the Model Interface dialog to access all options for configuring AUTOSAR-compliant code generation and import/export to and from XML files.
New functions provide command-line access to all AUTOSAR options. For more information, see Configuring AUTOSAR Options Programmatically in the Real-Time Workshop Embedded Coder User's Guide documentation.
Also, two AUTOSAR demos are provided, rtwdemo_autosar_roundtrip_script and rtwdemo_autosar_legacy_script.
In previous releases, the Real-Time Workshop Embedded Coder software provided bidirectional traceability for Simulink blocks only. In R2008a, bidirectional traceability is added between generated code and Stateflow chart objects and Embedded MATLAB scripts. For embedded real-time (ERT) based targets, you can choose to include traceability comments in the generated code. Using the enhanced traceability report, you can click hyperlinks to go from a line of code to its corresponding item in the model. You can also right-click an item in your model to find its corresponding line of code.
The following parameters are added or updated for bidirectional traceability:
| Previous Parameter Location and Name | New Parameter Location and Name |
|---|---|
| Real-Time Workshop > General pane: Generate HTML report | Real-Time Workshop > Report pane: Create code generation report |
| Real-Time Workshop > General pane: Launch report automatically | Real-Time Workshop > Report pane: Launch report automatically |
| Real-Time Workshop > General pane: Code-to-block highlighting | Real-Time Workshop > Report pane: Code-to-model |
| Real-Time Workshop > General pane: Block-to-code highlighting | Real-Time Workshop > Report pane: Model-to-code |
| N/A | Real-Time Workshop > Report pane: Eliminated / virtual blocks |
| N/A | Real-Time Workshop > Report pane: Traceable Simulink blocks |
| N/A | Real-Time Workshop > Report pane: Traceable Stateflow objects |
| N/A | Real-Time Workshop > Report pane: Traceable Embedded MATLAB functions |
| Real-Time Workshop > Comments pane: Simulink block comments | Real-Time Workshop > Comments pane: Simulink block / Stateflow comments |
Also, the right-click Real-Time Workshop > Highlight Code menu option is now Real-Time Workshop > Navigate to Code.
For more information, see Traceability of Stateflow Objects in Real-Time Workshop Generated Code in the Stateflow and Stateflow® Coder™ documentation, Using Traceability in Embedded MATLAB Function Blocks in the Simulink documentation, and Generating Reports for Code Reviews and Traceability Analysis in the Real-Time Workshop Embedded Coder documentation.
In R2008a, code generation is enhanced to
Enable cross product optimizations between Simulink blocks and Stateflow charts.
Reduce the size of code and improve code execution speed for the Bus Assignment, Bus Creator and Bus Selector blocks.
In R2008a, function prototype control:
Adds a preview function prototype command, getPreview, when configuring the prototype programmatically.
Adds the capability to work with model references.
Ignores the Pass scalar root inputs by value model reference configuration parameter when a model_step function prototype is specified.
For more information, see Controlling Generation of Function Prototypes in the Real-Time Workshop Embedded Coder documentation.
Previously, the code generator ignored function prototype control specifications for reference models. In R2008a, when you configure a referenced model for function prototype control and multi-instance implementations, the code generator reports an error. You can fix the error by doing one of the following:
Configure the referenced model for single-instance implementation.
Disable function prototype control for the model.
In previous releases, a built-in class's custom storage class definitions were released in an M-file. In R2008a, they are released in both an M-file and a functionally equivalent P-file. P-files take precedence over M-files, so when both files exist MATLAB ignores the M-file and loads the P-file. The M-file exists for human readability and to support customizing built-in custom storage classes (CSCs).
You can examine a built-in class's custom storage class definitions in the Custom Storage Class Designer. In previous releases, the designer loaded the M-file that defined the CSCs. M-files are editable, so you could edit built-in CSC definitions and save the changes, which would take effect immediately. In R2008a, the CSC designer loads the P-file rather than the M-file. However, P-files cannot be edited, so all CSC Designer editing capabilities are disabled when the CSC Designer obtained the CSCs that it displays from a P-file.
You can delete a P-file that contains CSC definitions, in which case MATLAB and the CSC Designer load the corresponding M-file, which defines exactly the same CSCs as the P-file. However, M-files can be edited, so you can then edit built-in CSCs as in previous releases. However, The MathWorks discourages this practice. If you delete both the P-file and the M-file for a package that defines CSCs, an error occurs when you try to use the package.
No compatibility problems arise unless you changed built-in custom storage class definitions in earlier releases and want to continue to do so in R2008a. As of R2008a, The MathWorks discourages customizing built-in custom storage class files. The preferred technique is to create user-defined packages and custom storage classes, as described in Subclassing Simulink Data Classes and Creating and Using Custom Storage Classes. The CSC designer stores user-defined CSC definitions in M-files, so the interface to that capability is unchanged in R2008a.
If you want to continue the practice of customizing the CSC definitions for a built-in package, you must first delete the P-file that defines the CSCs for the package. That file is always named csc_registration.p, and exists on the MATLAB path in a directory named @package, where package is the package name, e.g. @simulink. With the P-file deleted, the CSC designer loads the M-file, which you can then edit and save as in earlier releases. MATLAB then loads the changed CSC definitions for that package from the M-file.
This release improves the MISRA C® compliance of matrix math utilities and lookup block utilities that are used in generated code.
In previous releases, code generated by the Real-Time Workshop Embedded Coder software automatically included the math.h header file, defining C standard math functions, regardless of the math requirements of the target environment. In this release, selecting or customizing a target function library (TFL) for your model controls which header files are included, and generated code does not automatically include math.h unless it is needed.
For more information about selecting TFLs, see Selecting and Viewing Target Function Libraries in the Real-Time Workshop documentation. For more information about customizing TFLs, see Replacing Math Functions and Operators Using Target Function Libraries in the Real-Time Workshop Embedded Coder documentation.
R2008a introduces "What's This?" context-sensitive help for parameters that appear in the Simulink Configuration Parameters dialog. This feature provides quick access to a detailed description of the parameters, saving you the time it would take to find the information in the Help browser.
To use the "What's This?" help, do the following:
Place your cursor over the label of a parameter.
Right-click. A What's This? context menu appears.
For example, the following figure shows the What's This? context menu appearing after a right-click on the Start time parameter in the Solver pane.

Click What's This? A context-sensitive help window appears showing a description of the parameter.
The following demos have been added:
| Demo... | Shows How You Can... |
|---|---|
| rtwdemo_autosar_legacy_script | Prepare, implement, and verify an existing model for AUTOSAR by using the AUTOSAR target. |
| rtwdemo_autosar_roundtrip_script | Import, modify, and export AUTOSAR software components. |
| rtwdemo_polyspace | Use PolySpace® products to prove both the absence and presence of run-time errors for code generated by Real-Time Workshop Embedded Coder software. It also shows the results of MISRA C compliance for the generated code. |
The following demo has been enhanced to illustrate code traceability improvements in R2008a:
![]() | Version 5.1.1 (R2008a+) Real-Time Workshop Embedded Coder Software | Version 5.0.1 (R2007b+) Real-Time Workshop Embedded Coder Software | ![]() |

Learn more about Simulink through this collection of videos, articles, technical literature and the Getting Started with Simulink Guide.
| © 1984-2009- The MathWorks, Inc. - Site Help - Patents - Trademarks - Privacy Policy - Preventing Piracy - RSS |