How do I build my model that contains S-Function block built with multiple C source files if the source files are not published using Real-Time Workshop?
8 views (last 30 days)
Show older comments
MathWorks Support Team
on 7 Apr 2015
Edited: MathWorks Support Team
on 7 Apr 2015
I would like to know How to build my model that contains S-Function block built with multiple C source files if the source files are not published using Real-Time Workshop.
Accepted Answer
MathWorks Support Team
on 7 Apr 2015
1. The user who created the model performs the following steps:
1-1. At the part of the "S-Function modules" in S-Function block, write Names of C source files used when doing MEX compile.
1-2. Build the model which contains the S-Function using Real-Time Workshop.
1-3. Copy S-FunctionName.obj and all C-SourceName.obj files from RTW folder(**),
ans send them with model file and MEX-file of S-Function.
2. At the receiver’s end, once you have these files, follow the steps below:
2-1. Save the model file and MEX-file on the same folder.
2-2. In the above folder, create modelname_targetname_rtw folder, and save S-FunctionName.obj and all C-SourceName.obj files into the folder.
2-3. Build the model.
) RTW folder means the folder that is displayed with the modelname_targetname_rtw.
For example, if the model name is GRT target in mymodel.mdl, will mymodel_grt_rtw.
0 Comments
More Answers (0)
See Also
Categories
Find more on Simulink Coder in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!