Typecast (Embedded coder)

12 ビュー (過去 30 日間)
Bob Snyder
Bob Snyder 2020 年 9 月 2 日
回答済み: Bob Snyder 2020 年 9 月 2 日
I have the following code as a simple test:
byte1 = in_data(5);
byte2 = in_data(6);
byte3 = in_data(7);
byte4 = in_data(8);
X=uint8([byte1 byte2 byte3 byte4]);
az_gyro=typecast(X,'single');
When I try to 'Build/Deploy' to my hardware I get the following:
"For code generation, integer input or result classes for TYPECAST must map directly to a C type in the target hardware. The class uint8 does not map to a 8-bit C type. "
What is happening here?
Bob S.
  1 件のコメント
James Tursa
James Tursa 2020 年 9 月 2 日
編集済み: James Tursa 2020 年 9 月 2 日
Good question. Seems like it should easily map to unsigned char. What is the target hardware?

サインインしてコメントする。

回答 (1 件)

Bob Snyder
Bob Snyder 2020 年 9 月 2 日
James,
The target is a TI F28388D.
Bob S.

カテゴリ

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