Model Reference and shared data types

20 views (last 30 days)
I am upgrading from R2009a to R2012a. In R2009a, I use Simulink.AliasTypes with DataScope='Auto' and HeaderFile='myheader.h". I am using shared code placement (UtilityFuncGeneration='Shared'). I am also using data type replacement (EnableUserReplacementTypes='on' with the proper fields filled in). During RTW code generation, all works fine, and "myheader.h" is included in _sharedutils/rtwtypes.h.
In R2012a, with the same settings, I get the error:
Error using rtwbuild (line 240)
Error: Error occurred when generating shared data declaration: The data types for the following shared data does not exist in the current slprj directory:
The data type 'F32' of data [my signals] is not shared
The data type 'U8' of data [my signals] is not shared
To continue, set these data types to be shared
I have tried every combination of DataScope and HeaderFile, but all give errors.
Interestingly, "myheader.h" is still included in the _sharedutils/rtwtypes.h file though.
Any idea what has changed and how to rectify this?
Pete

Accepted Answer

Kaustubha Govind
Kaustubha Govind on 30 Jul 2012
Do you have Data declaration on the Code Generation>Code placement pane of the Configuration Parameters window set to anything other than "auto"? If so, could you try changing it to "auto" and see if that fixes it? If not, I would recommend contacting MathWorks Technical Support regarding this.
  1 Comment
Peter
Peter on 30 Jul 2012
That fixed the error - thank you. I need to see what other issues might arise now with that new setting, but at least I can proceed.

Sign in to comment.

More Answers (0)

Community Treasure Hunt

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

Start Hunting!