Data Type Names in Generated Code

조회 수: 3 (최근 30일)
Rahul Prem Nazeer
Rahul Prem Nazeer 2014년 1월 16일
댓글: Bogdan Bodnarescu 2022년 1월 21일
Hi,
When I am generating code using embedded code (ver:6.3), the data types appear as follows.
unit8 -> uint8_T
boolean ->boolean_T
I want to replace the 'boolean_T' type with 'bool' by defining a Simulink.AliasType object in the base workspace and updating this to the configuration set. But I get the following error.
Error using rtwbuild (line 241) Potential conflicting usages of identifier 'bool': a data type of that name, and Language Keywords
Is it not possible to use 'bool' as a user defined data type name?
Thanks Rahul
  댓글 수: 2
Sarah Sullivan
Sarah Sullivan 2014년 4월 10일
'bool' is a reserved keyword for code generation. For more information, see Reserved Keywords.
Bogdan Bodnarescu
Bogdan Bodnarescu 2022년 1월 21일
Have you found a solution so far?
I am having the same problem.

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

답변 (1개)

Srijith Vijay
Srijith Vijay 2016년 7월 22일
이 답변에 Bogdan Bodnarescu 님이 플래그를 지정함
Hi,
For boolean, the replacement data type's BaseType must be either an 8-bit integer or an integer of the size displayed for Number of bits: int on the Hardware Implementation pane of the Configuration Parameters dialog box.

카테고리

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