Model Reference and shared data types

조회 수: 5 (최근 30일)
Peter
Peter 2012년 7월 27일
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

채택된 답변

Kaustubha Govind
Kaustubha Govind 2012년 7월 30일
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
Peter
Peter 2012년 7월 30일
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개)

카테고리

Help CenterFile 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