- Write a MATLAB script that Uses the mex() function to compile and link source code for each S-function into a mex function ( you could also use the legacy_code tool to do this
- If you have a fixed list of S-Function blocks, I would recommend just creating the blocks and mask manually. However, you can also script this using the create_system(), add_block() and set_param() functions to automate the creation of your Simulink Library
What is the best way to distribute a custom simulink library using C++ S-Function blocks to multiple users? Preferably using some form of CI/CD pipeline
6 views (last 30 days)
Show older comments
I'm looking for a way to distribute a custom simulink library which has multiple C++ S-function blocks to multiple users. Is there a way to automatically build, package the MEX S-function blocks and their masks, and deploy them as a library usable by multiple users.
The pipeline (if possible) would go something like {cpp source code} -> {mex binaries} -> {library of S-function blocks} -> people can use the latest version of this library.
0 Comments
Accepted Answer
Mark McBroom
on 13 Oct 2021
The above scripts can then be called from a CI system whenever the source code for your s-functions changes.
More Answers (0)
See Also
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!