Disable generation of header files for Function Caller

조회 수: 2 (최근 30일)
Shamoil
Shamoil 2025년 3월 14일
댓글: Shamoil 2025년 3월 20일
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