Simulink Protected Model and coder.cevel()

조회 수: 2 (최근 30일)
Joel Handy
Joel Handy 2022년 2월 16일
편집: Infinite_king 2024년 2월 8일
I'm trying to create a protected model from a Simulink model contained embedded matlab functions using coder.ceval() to pull in custom C code. When I do, I get an error, "Identical charts with different custom code settings are not supported." There error is pretty cryptic and doesnt point to any particular location. I had to systematically remove bits of my model until I zeroed in on which blocks were causing the error.
Has anybody had any success using coder.ceval in a protected simulink model?

답변 (1개)

Infinite_king
Infinite_king 2024년 2월 8일
편집: Infinite_king 2024년 2월 8일
Hi Joel Handy,
To generate a protected model, try setting the dependent source files and header files information separately for each 'MATLAB function' block utilizing 'coder.ceval'.
To possibly resolve the issue follow the below troubleshooting steps,
  1. In the configuration setting, disable the 'Import custom code'. Refer the following documentation for more information, https://www.mathworks.com/help/simulink/gui/parse-custom-code-symbols.html
  2. Enable 'Include custom code for referenced models' in configuration settings. Refer the following documentation for more information https://www.mathworks.com/help/simulink/gui/includecustomcodeforreferencedmodels.html
  3. For each 'MATLAB function' block, include the dependent source files and headers. Refer the following documentation for more information https://www.mathworks.com/help/coder/ug/customizing-the-post-code-generation-build-process.html
Hope this is helpful.

카테고리

Help CenterFile Exchange에서 Deployment, Integration, and Supported Hardware에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by