Model Reference and shared data types

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

 采纳的回答

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 个评论

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.

请先登录,再进行评论。

更多回答(0 个)

类别

帮助中心File Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by