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

조회 수: 2 (최근 30일)
Nedelcu Valentin
Nedelcu Valentin 2018년 1월 16일
답변: Mark McBroom 2018년 2월 25일
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
Erik Voigt
Erik Voigt 2018년 2월 2일
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

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

답변 (1개)

Mark McBroom
Mark McBroom 2018년 2월 25일
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

카테고리

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

Community Treasure Hunt

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

Start Hunting!

Translated by