Disable generation of header files for Function Caller

10 vues (au cours des 30 derniers jours)
Shamoil
Shamoil le 14 Mar 2025
Commenté : Shamoil le 20 Mar 2025
Hi,
How can I disable generation of multiple header files for each Function Caller I add when using the simulink embedded coder?
I essentially would like the extern function definition to be within SwcApplMaster.c itself to keep the code footprint small.
I am using a dsPIC33 as the target. Thanks.

Réponse acceptée

Pratyush Swain
Pratyush Swain le 18 Mar 2025
Hi Shamoil,
If the Simulink function corresponding to the function caller block is in the same model, the header file name can be configured through defining a function customization template for the Simulink function and setting header and source file names (However this is available only since R2023b).
To create a function customization template, follow these steps:
  1. In the model, set model configuration parameter System target file to ert.tlc. To use a function customization template, you must use an ERT-based system target file.
  2. In the Simulink Editor, open the Embedded Coder app and open the Embedded Coder Dictionary.
  3. In the Embedded Coder Dictionary, on the Function Customization Template tab, click Create.
  4. For the new function template, set these properties: Name, Header File, Definition File
This way, the function caller block in the model will use the same header file name as the Simulink function.
  1 commentaire
Shamoil
Shamoil le 20 Mar 2025
Thanks Pratyush, we need to continue using r2022b for our toolchain, so I will have to workaround this solution somehow. Thanks for your answer.

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

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

Produits


Version

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by