Effacer les filtres
Effacer les filtres

Doxygen comments in code generated with Simulink Embedded Coder

21 vues (au cours des 30 derniers jours)
Tomaso Poggi
Tomaso Poggi le 17 Mai 2022
Commenté : Pablo le 10 Mai 2024
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 commentaire
Pablo
Pablo le 10 Mai 2024
Is there any advance in this feature? It is already possible to integrate doxygen style comments in Embedded Coder?

Connectez-vous pour commenter.

Réponse acceptée

Tomaso Poggi
Tomaso Poggi le 30 Mai 2022
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.

Plus de réponses (0)

Catégories

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

Tags

Produits


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by