MATLAB Answers

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

6 views (last 30 days)
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.

Accepted Answer

Andy Bartlett
Andy Bartlett on 22 Apr 2021
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.

More Answers (1)

Vijayabharathi J
Vijayabharathi J on 26 Apr 2021
Thanks for your support. Once we checked the "Support long long" in configuration setting, environment build successfully.

Products


Release

R2017b

Community Treasure Hunt

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

Start Hunting!