Embedded Coder and "TRUE" or "true" definition

조회 수: 7 (최근 30일)
Massimiliano Sturla
Massimiliano Sturla 2016년 2월 24일
답변: Michael Martin 2018년 4월 30일
Hi to all! I'm generating c++ code from a simulink stateflowusing Embedded coder package (simulink coder) I have and old version (that was generated 1 years ago from another person) that is quite different. Some file that were generated are: - chart.cpp - ert_maiin.cpp that are perfect (except for date) equals! But some file, like rtwtype.h are very different...
One important thing is that in old version is generated a code for uppercase TRUE/FALSE definition and in the new version a lowercase of true/false definition. another difference is naming define constant that use or not the underscore "_" before the define-name
So there is any trick to generate the "old" mode definition?
Thanks, Massimiliano
  댓글 수: 1
Fang Li
Fang Li 2016년 12월 22일
I'm looking for the solution too.

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

답변 (1개)

Michael Martin
Michael Martin 2018년 4월 30일
To change the case definition:
Navigate to "Code Generation" either from the simulations tab in Simulink, or from model explorer. Under "Code Generation", select "Data Type Replacement".
Next click the ellipsis (...) fro "Advanced parameters. In the Boolean false and true identifiers, type FALSE and TRUE, respectively.
- Michael

카테고리

Help CenterFile Exchange에서 Simulink Coder에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by