Problem with code reusabilty of inlined S-Function

조회 수: 2 (최근 30일)
edward gaoo
edward gaoo 2019년 10월 24일
댓글: edward gaoo 2019년 10월 24일
when I building a simlink project with matlab2019a, The report prompts the following errors
The following block contains an S-Function that does not conform to Code Reuse restrictions. The S-Function block (a) should have a TLC implementation and (b) should set the option 'SS_OPTION_WORKS_WITH_CODE_REUSE'. [testmodel2/out_OutSignalCondition_lib/Init_PWM/fcn_PWMPEEPmax_uP2/fpga_interface]

채택된 답변

galaxy
galaxy 2019년 10월 24일
You need to add ssSetOptions in mdlInitializeSizes(SimStruct *S) function in your C S function as following.
ssSetOptions(S,
SS_OPTION_WORKS_WITH_CODE_REUSE |
SS_OPTION_EXCEPTION_FREE_CODE |
SS_OPTION_USE_TLC_WITH_ACCELERATOR);
  댓글 수: 1
edward gaoo
edward gaoo 2019년 10월 24일
I use TI C2000 support package. S-function is not defined by myself, so I don't know where to add ssSetOptions to C S Function
Do you have any good suggestions

댓글을 달려면 로그인하십시오.

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Introduction to Installation and Licensing에 대해 자세히 알아보기

제품


릴리스

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by