필터 지우기
필터 지우기

Doxygen comments in code generated with Simulink Embedded Coder

조회 수: 21 (최근 30일)
Tomaso Poggi
Tomaso Poggi 2022년 5월 17일
댓글: Pablo 2024년 5월 10일
I am using Embedded Coder to generate C code for a model. My model contains several busses that are translated to struct typedefs in C.
As expected, the "Description" field of each signal in the bus is transalted into a comment in the C code.
I would like the comment to have a doxygen style, that is it should be in the form:
/** My comment */
By looking into the help, I saw that in Simulink there is the possibility to do something similar by creeating a custom CGT file (see this page). Anyway, the comment style only applies to file banners, functions banners and file trailers, while comments to typedefs are left in a classic style.
I also found that it is possible to insert doxygen-like comments for typedefs in MATLAB generated code (see this page). However, I cannot manage to do the same for code generated from a Simulink model. I tried to add a "Type Definitions" section to my custom CGT file but nothing happened. In particular I added the following lines to my custom CGT:
%% Type Definitions
<TypeDefinitionsBanner style="doxygen_qt">
Type Definitions
</TypeDefinitionsBanner>
Any suggestion?
Thnak you.
  댓글 수: 1
Pablo
Pablo 2024년 5월 10일
Is there any advance in this feature? It is already possible to integrate doxygen style comments in Embedded Coder?

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

채택된 답변

Tomaso Poggi
Tomaso Poggi 2022년 5월 30일
I contacted the Mthworks support service and it turned out that at the moment there is no way of accomplishing this workflow by editing the CGT files. Anyway, they opened an Enhancement request with the Development, so the feature might be available in the future.

추가 답변 (0개)

카테고리

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

태그

제품


릴리스

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by