Version 4.5 (R2006b) Real-Time Workshop Embedded Coder Software

This table summarizes what's new in Version 4.5 (R2006b):

New Features and ChangesVersion Compatibility ConsiderationsFixed Bugs and Known ProblemsRelated 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

Efficiency Enhancements in Generated Code

Real-Time Workshop Embedded Coder V4.5 (R2006b) provides the following efficiency enhancements in code generated from Simulink models:

Fixed-Point Code Generation Support for Enhanced N-Dimensional Lookup Table Blocks

Real-Time Workshop Embedded Coder V4.5 (R2006b) supports fixed-point code generation for the following new Simulink N-dimensional lookup table blocks:

The new blocks provide fixed-point arithmetic and more efficient code generation than the blocks they replace, PreLookup Index Search and Interpolation (n-D) Using PreLookup.

Ability to Control Use of Parentheses in Generated Code

The new Code Style pane in the Configuration Parameters dialog box allows you to control optional parentheses in generated code, including generating code that meets MISRA requirements. The default behavior is to generate code similar to that of previous releases.

For more information, see Code Style Pane in the Real-Time Workshop Embedded Coder documentation.

Enhanced HTML Code Report Performance and Content

If you select the Generate HTML report check box on the Real-Time Workshop pane of the Configuration Parameters dialog box, Real-Time Workshop Embedded Coder automatically produces a code generation report in HTML format. In R2006b, the performance associated with producing the code generation report has improved significantly. In addition, the reports no longer display the names of hidden blocks, such as automatically inserted Rate Transition blocks, as hyperlinks.

New General-Purpose OSEK/VDX Real-Time Operating System (RTOS) Example

Real-Time Workshop Embedded Coder V4.5 (R2006b) adds a new demo, rtwdemo_osek, that illustrates techniques for interfacing to the OSEK/VDX® real-time operating system (RTOS). The demo model includes:

Additional files related to the demo are provided in matlabroot/toolbox/rtw/rtwdemos/osektgt_demo. These include:

After launching rtwdemo_osek, you can save the model file rtwdemo_osek.mdl to a work directory. You can use the model file and the related files in matlabroot/toolbox/rtw/rtwdemos/osektgt_demo as a starting point to target specific OSEK implementations. The demo model provides examples of implementing Simulink blocks for OSEK APIs, and you can modify oseklib.tlc and osek_file_process.tlc to provide detailed information about your OSEK implementation.

New 'error' Hook Method for STF_make_rtw_hook.m

As of V4.5 (R2006b), the STF_make_rtw_hook.m hook file, which you can use to customize the target build process, supports a new 'error' hook method. If used, Real-Time Workshop calls the 'error' hook method when an error occurs during code generation or the build process. For example, you might use the new hook method to clean up any static or global data used by the hook file after an error occurs. Valid arguments include the hook method and model name.

For more information about the 'error' hook method or the STF_make_rtw_hook.m hook file, see Customizing the Target Build Process with the STF_make_rtw Hook File.

Maximum Length Enforced for Auto-Generated Identifiers in Generated Code

In previous releases, some auto-generated identifiers in generated code were allowed to exceed the Maximum identifier length specified on the Real-Time Workshop/Symbols pane of the Configuration Parameters dialog box. Generated identifiers that exceeded the Maximum identifier length did not honor the user setting and potentially were inconsistent with ANSI-C or MISRA guidelines requiring identifiers to be unique within a prescribed length (31 characters).

In R2006b, the user-specified Maximum identifier length is more rigorously enforced for auto-generated identifiers in generated code.

For limitations that apply, see Identifier Format Control Parameters Limitations in the Real-Time Workshop Embedded Coder documentation. For upgrade and compatibility considerations, see Compatibility Considerations.

For more information about the Real-Time Workshop Embedded Coder parameters for Identifier format control and their use, see Customizing Generated Identifiers and its subsection Specifying Identifier Formats in the Real-Time Workshop Embedded Coder documentation.

Compatibility Considerations

The following considerations for identifier format control apply when upgrading a Simulink model from an earlier release to this release:

New Default Value for IncludeERTFirstTime Model Configuration Parameter

In R2006a, Real-Time Workshop Embedded Coder introduced the IncludeERTFirstTime model configuration parameter, which specifies whether Real-Time Workshop Embedded Coder is to include the firstTime argument in the model_initialize function generated for an ERT-based Simulink model.

In R2006b, the default value of this parameter has changed from on (include the firstTime argument) to off (do not include the firstTime argument). As a result, for ERT-based Simulink models newly created in R2006b, the code generated for the model_initialize function by default will no longer include the firstTime argument.

To include the firstTime argument in generated code, change the value of the IncludeERTFirstTime parameter to on. However, see the release note Use of firstTime Argument to model_initialize Function to Be Discontinued.

Compatibility Considerations

For ERT-based Simulink models newly created in R2006b, the code generated for the model_initialize function by default will no longer include the firstTime argument. As a result, existing custom static main programs that invoke model_initialize with the firstTime argument will need to be reconciled with the code generated for the model_initialize function. For example, you can

Use of firstTime Argument to model_initialize Function to Be Discontinued

In a future release, Real-Time Workshop Embedded Coder will no longer use the firstTime argument in a model's generated model_initialize function. For more information about this change, use the form at http://www.mathworks.com/contact_TS.html to contact The MathWorks Technical Support.

"Source of initial values" Option for MPT Data Objects Removed

In R2006b, the Source of initial values option for MPT data objects has been removed from the Data Placement pane of the Configuration Parameters dialog box. Although this option was visible in R2006a, it was obsolete and the setting had no effect.

Use Simulink.Signal objects to initialize signal values, as explained in Initializing Signals and Discrete States in the Simulink documentation.

New and Enhanced Demos

The following demos have been added:

Demo...Shows How You Can...
rtwdemo_importstructImport externally defined parameters into Simulink. This model demonstrates how to generate code that accesses the fields of a data structure. The data structure is defined in legacy (hand-written) code and accessed via a pointer. This technique enables users to easily switch between complete sets of parameters at run time (for example, between reference and working versions).
rtwdemo_osekInterface to the OSEK/VDX real-time operating system. For more information, see New General-Purpose OSEK/VDX Real-Time Operating System (RTOS) Example.
rtwdemo_parenthesesSet the style of parenthesization in generated code to be Minimum (only parentheses required by C syntax), Nominal (parentheses added to optimize readability), or Maximum (parentheses obviate C precedence, as required by MISRA).

New Reference Documentation

R2006b adds HTML and PDF reference documentation for Real-Time Workshop Embedded Coder functions and blocks.

  


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