Real-Time Workshop Release Notes |
Upgrading from an Earlier Release
This section describes the upgrade issues involved in moving from Real-Time Workshop 4.1 to Version 5.0.
If you are upgrading from a version earlier than 4.1, then you should see Upgrading from an Earlier Release in the Real-Time Workshop 4.1 Release Notes.
Replacing Obsolete Header File #includes
Generated code is packaged into fewer files in this release (see Packaging of Generated Code Files Simplified). If you have interfaced code to code generated by previous releases of Real-Time Workshop, you may need to remove dependencies on header files that are no longer generated (such as model_
common.h
, model_
export.h
, model_
prm.h
, and model_
reg.h
) and add #include
model
.h
directives.
Custom Code Blocks Moved from Simulink Library
The Custom Code blocks have been removed in Real-Time Workshop version 5.0 (R13). These blocks are now located in a new library, named custcode.mdl
(type custcode
to access them). Because custom code blocks are linked to this new library, backward compatibility is assured.
Updating Custom TLC Code
In this release, a number of changes have been made to model
.rtw
files. If your applications depend on parsing model
.rtw
files using customized TLC scripts, please read model.rtw Changes Between Real-Time Workshop 5.0 and 4.1 in Appendix A of the Target Language Compiler documentation, which describes the structure and contents of compiled models.
Upgrading Customized GRT and GRT-Malloc
Targets to Work with Release 13
Substantial changes have been made to the GRT and GRT-Malloc targets in Release 13 to improve the efficiency of generated code. If you have customized either type of target, you should make changes to your modified files to ensure that your target works properly with Release 13 (Real-Time Workshop Version 5.0).
We highly recommend that you begin with the versions of the target files included in this release, and introduce all of your existing customizations to them. If you are unable to follow this upgrade path, then you would need to perform all of the steps outlined in sections A and B below.
A. Changes Resulting from the Replacement of SimStruct with the rtModel
Prior to Release 13 of Real-Time Workshop, the GRT and GRT-Malloc targets used the SimStruct data-structure to capture and store model-wide information. Since the SimStruct was also used by noninlined S-functions, it suffered from the drawback that some of its fields remained unused when it was used to capture root (model-wide) information. To avoid this drawback, Version 5.0 introduces a special data structure called the rtModel to capture root model data.
As a result, grt_main.c
and grt_malloc_main.c
need to be updated to accommodate rtModel. Following are the changes that you need to make to these files to use the rtModel instead of the SimStruct:
rtmodel.h
instead of simstruc.h
at the top.
#define EXPAND_CONCAT(name1,name2) name1 ## name2
rt_CreateIntegrationData
and rt_UpdateContinuousStates
to be as shown in the Release 13 version of grt_main.c
(or grt_malloc_main.c
).
'RT_MODEL'
instead of the argument 'SimStruct'
.
rt_GetNextSampleHit
, rt_UpdateDiscreteTaskSampleHits
, rt_UpdateContinuousStates
, rt_UpdateDiscreteEvents
, rt_UpdateDiscreteTaskTime
, and rt_InitTimingEngine
have changed. You need to change their names to use the prefix rt_Sim
instead of rt_
and then change the arguments you pass into them.
grt_main.c
(or grt_malloc_main.c
) for the list of arguments that need to be passed into each function.
In addition to the changes to the main C files, you need to change the target TLC file and the template make files.
USE_RTMODEL
. See one of the GRT or GRT-Malloc template make files for an example.
B. Changes Resulting from Moving the Logging Code to the Real-Time Workshop Library:
In Release 13, all the support functions used for logging data have been moved from rtwlog.c
to the Real-Time Workshop library. As a result, you need to make the following changes to ensure compatibility with the new logging functions:
rtwlog.c
from all of your template make files.
grt_main.c
or grt_malloc_main.c
), include rt_logging.h
instead of rtwlog.h
.
grt_main.c
or grt_malloc_main.c
), you need to change the calls to the logging related functions because the prototypes of these functions have changed. See grt_main.c
(or grt_malloc_main.c)
for the list of arguments that needs to be passed into each function.
The BlockInstanceData Function has been Deprecated
S-function TLC files should no longer use the BlockInstanceData method. All data used by a block should be declared using data type work vectors (DWork).
Platform Limitations for HP and IBM | Known Software and Documentation Problems |