Protect Code for Third Party Deployment

I have a MATLAB script that will be used by a third party contractor to be further developed and placed onto an embedded system. More specifically, the third party will be using our code in a Simulink model that will be integrated onto the embedded system. I have tried to look into several options for distributing my code, however I am not sure the correct path to take. From my understanding, the Simulink model that will be developed will be coded into C/C++ by MATLAB Coder and flashed to the embedded system. Here are the options I have considered so far:
  1. Use MATLAB Coder or rewrite code in C using MATLAB API and supply a MEX function;
  2. Use MATLAB Compiler to create a linked library, standalone executable, CTF (does not seem to be possible for this specific use case);
  3. Deploy the source code as P-code (not recommended by Mathworks to protect IP from third parties).
Also, one of the main issues is that I am not sure of how to prepare my MATLAB script for use in Simulink flow. Is there anything additional that I need to do to my code other than provide a basic function that takes inputs and gives outputs?
Has anyone encountered this sort of issue and may have recommendations for code protection?

回答 (1 件)

Mark McBroom
Mark McBroom 2022 年 4 月 22 日

0 投票

Another option would be to put your MATLAB code into a SImulink model via a MATLAB Function block and then distribute the Simulink model as a protected model to the third party. https://www.mathworks.com/help/rtw/ug/create-a-protected-model-using-the-model-block-context-menu.html#:~:text=To%20create%20a%20protected%20model%20from%20a%20referenced,Generate%20Protected%20Model%20From%20Selected%20Model%20%20Block.

カテゴリ

ヘルプ センター および File ExchangeDeployment, Integration, and Supported Hardware についてさらに検索

質問済み:

2019 年 11 月 18 日

回答済み:

2022 年 4 月 22 日

Community Treasure Hunt

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

Start Hunting!

Translated by