argument of type "int64_t" is incompatible with parameter of type "int64m_T" - Static code metrics error report
6 visualizzazioni (ultimi 30 giorni)
Mostra commenti meno recenti
Vijayabharathi J
il 21 Apr 2021
Risposto: Vijayabharathi J
il 26 Apr 2021
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.
0 Commenti
Risposta accettata
Andy Bartlett
il 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.
The post "How to Dramatically Increase Efficiency of Simulink Generated Code in Two Clicks!" illustrates the Simulink dialog to use.
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.
0 Commenti
Più risposte (1)
Vedere anche
Categorie
Scopri di più su Simulink Coder in Help Center e File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!