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

2 次查看(过去 30 天)
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.

采纳的回答

Mark McBroom
Mark McBroom 2021-10-13
  1. 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
  2. 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
The above scripts can then be called from a CI system whenever the source code for your s-functions changes.
  3 个评论
Mark McBroom
Mark McBroom 2021-10-13
There is no built-in method for controlling. Some customers place on a shared drive(s) that all users point to. Others commit to CM tool and the have users pull new version when convenient.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Block and Blockset Authoring 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by