Why is rtw_extmode.h included in the header file even if not using Real-Time Workshop in external mode for a model that uses model referencing in Simulink 6.0 (R14)?

4 views (last 30 days)
I have a model in Simulink 6.0 (R14) that uses model referencing. All the configuration sets are set such that they do not use external mode. However, Real-Time Workshop includes the following line of code in the generated header files.
#include "rtw_extmode.h"

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 27 Jun 2009
This bug has been fixed in Release 14 Service Pack 2 (R14SP2). For previous releases, please read below for any possible workarounds:
We have verified that there is a bug in Real-Time Workshop 6.0 (R14) in the way that it handles code generation in external mode.
This issue is known to occur when either of the following conditions exists:
- You select Simulation-->Configuration Parameters-->Real-Time Workshop-->Interface-->Utility function generation-->Shared location.
- The model contains a referenced model.
To work around this issue,
1. Edit $MATLAB/rtw/c/tlc/mw/commonhdrlib.tlc, where $MATLAB is the MATLAB root directory on your machine, as returned by typing
matlabroot
at the MATLAB command prompt.)
2. Search for the following string:
%if ::ExtMode == 1 || CompiledModel.GenUtilsSrcInSharedLocation
You should find only one occurrence.
3. Replace the string with the following:
%if ::ExtMode == 1
4. Close the file.
5. Restart MATLAB.
6. Issue the following command at the MATLAB command prompt:
rehash toolboxcache

More Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!