How can I include a block annotations as comments in generated code?

2 Ansichten (letzte 30 Tage)
Nedelcu Valentin
Nedelcu Valentin am 16 Jan. 2018
Beantwortet: Mark McBroom am 25 Feb. 2018
I have a library block for which I set as annotation the library version. It appears in the model but when I generate code using Embedded Coder, this annotation is not specified in the generated code. Is there any possibility that I can include this annotation as a comment in the code?
  1 Kommentar
Erik Voigt
Erik Voigt am 2 Feb. 2018
Hi I am also looking for this. We need it for technical debt metrics; where we want to trace "ToDo", "FixMe" and so... I will ask our Mathworks consultant. kr Erik

Melden Sie sich an, um zu kommentieren.

Antworten (1)

Mark McBroom
Mark McBroom am 25 Feb. 2018
Yes. Check the "Simulink block comments" option on the Code Generation - Comments tab. There is also a very good example that comes with Simulink/Embedded Coder demontrating all of the various options for comments in the generated code. Type the following at the MATLAB prompt:
rtwdemo_comments

Kategorien

Mehr zu Deployment, Integration, and Supported Hardware finden Sie in Help Center und File Exchange

Produkte

Community Treasure Hunt

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

Start Hunting!

Translated by