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 Center および File ExchangeDeployment, 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