Disable generation of header files for Function Caller

6 次查看(过去 30 天)
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.

采纳的回答

Pratyush Swain
Pratyush Swain 2025-3-18
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 个评论
Shamoil
Shamoil 2025-3-20
Thanks Pratyush, we need to continue using r2022b for our toolchain, so I will have to workaround this solution somehow. Thanks for your answer.

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by