Effacer les filtres
Effacer les filtres

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 vues (au cours des 30 derniers jours)
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?

Réponses (1)

Poorna
Poorna le 3 Mai 2024
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 commentaire
효진
효진 le 8 Mai 2024
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?

Connectez-vous pour commenter.

Catégories

En savoir plus sur Deployment, Integration, and Supported Hardware dans Help Center et File Exchange

Produits


Version

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by