Protect Code for Third Party Deployment
조회 수: 2(최근 30일)
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:
- Use MATLAB Coder or rewrite code in C using MATLAB API and supply a MEX function;
- Use MATLAB Compiler to create a linked library, standalone executable, CTF (does not seem to be possible for this specific use case);
- 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?
Mark McBroom 2022년 4월 22일
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.