필터 지우기
필터 지우기

If I set up the Hardware board in Hardware Implementation, can't I turn ON the "Generate and example main program" setting in Templates?

조회 수: 7 (최근 30일)
Specific hardware was set in Configuration Parameter --> Hardware Implementation --> Hardware board.
Code Generation --> System target file was set to ert.tlc.
If you turn on "Generate an example main program" in Code Generation --> Templates --> Custom Templates,
<The 'GenerateSampleERTMain' model parameter is set to 'on', but your hardware board requires it to be set to 'off' . Use 'set_param' command to set the 'GenerateSampleERTMain' model parameter to 'off.>" Error occurs.
If I set up the Hardware board in Hardware Implementation, can't I turn ON the "Generate and example main program" setting in Templates?

답변 (1개)

Poorna
Poorna 2024년 5월 3일
Hi,
There are certain restrictions that need to be honoured when trying to generate C code to deploy on specific targets. When a model uses certain service interfaces then the model configuration is restricted so that "GenerateSampleERTMain' is set to false. This mostly depends on the hardware and the modeling aspects.
You can find more information below on the list of restrictions and constraints that are imposed when the generated code uses service interfaces:
Hope this Helps!
  댓글 수: 1
효진
효진 2024년 5월 8일
Poorna,
Thank you for your reply.
Looking at the link page you provided, it looks like there are a lot of changes starting from the R2022b version. Can I find the same restrictions in the 2022a version?
(The version I tested was 2022a.)
The reason I tried to "Generate an example main program" above is because I was creating and using a custom target hardware package and wanted to change part of the generated ert_main.c code.
Is there a way to change the generated ert_main.c to the code user wants?

댓글을 달려면 로그인하십시오.

카테고리

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

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by