argument of type "int64_t" is incompatible with parameter of type "int64m_T" - Static code metrics error report

12 ビュー (過去 30 日間)
Hello,
We are trying to build the environment for our simulink model . While trying to generate code, one of the interface of int64 datatype ( in Simulink model) is getting generated in code as int64m_T (supposed to be int64_T). Would someone suggest any workaround how to get in generated code as int64_T in this case? We tried force typecasting inside the function but not helpful in achieving int64 datatype.
Also we found this is occuring with Hardware Device Type Infineon->TriCore. (In Intel->x86-64 (Windows64) it is generated as int64_T). Please find the error report below.

採用された回答

Andy Bartlett
Andy Bartlett 2021 年 4 月 22 日
It is likely the solution is really easy.
Just check that the specified production hardware target is correctly configured for your target. Make sure that all the integer sizes agree with the C compiler you will use for your target. Also make sure the checkbox "Support long long" is appropriately set.
MATLAB Coder also has the same configurations for setting production target integer sizes and allowing use of the long long type.
TLDR background
When an integer or fixed-point type used in your model is bigger than the longest integer type that your target C compiler provides, then multi-word types will be used in the generated code.
These multi-word typedefs will have names like int64m_T, int96m_T, int128m_T, etc.
The appearance of int64m_T indicates that as configured for on your Simulink model or MATLAB Coder project, the biggest integer available for the C compiler is less than 64 bits.

その他の回答 (1 件)

Vijayabharathi J
Vijayabharathi J 2021 年 4 月 26 日
Thanks for your support. Once we checked the "Support long long" in configuration setting, environment build successfully.

カテゴリ

Help Center および File ExchangeSimulink Coder についてさらに検索

製品


リリース

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by