Problem with code reusabilty of inlined S-Function
4 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
edward gaoo
am 24 Okt. 2019
Kommentiert: edward gaoo
am 24 Okt. 2019
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]
0 Kommentare
Akzeptierte Antwort
galaxy
am 24 Okt. 2019
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);
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Code Generation for Custom Blocks finden Sie in Help Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!