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

6 visualizaciones (últimos 30 días)
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.

Respuesta aceptada

Andy Bartlett
Andy Bartlett el 22 de Abr. de 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.

Más respuestas (1)

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

Categorías

Más información sobre Simulink Coder en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2017b

Community Treasure Hunt

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

Start Hunting!

Translated by