Invalid data type struct_eWYRzewnxs6WT01sFpzdQB.
Show older comments
I am getting the above error when i am trying to generate C-Code from a simulink model. I am not understanding which part of the model has the error as the error doesn't direct to any part of the model for error. I am trying to generate a c-code for ETAS INTECRIO compatible file(irt.tlc). The image of the error is attached in the below file.
Answers (1)
Harsh
on 9 Jan 2025
0 votes
Hi Tushar,
There could be several reasons for the error you are facing. To debug and resolve the issue, please follow the following steps –
- If the model contains custom datatype, then “CustomCast” function needs to be defined for it. Please refer to the following MATLAB answer for more information regarding it - https://www.mathworks.com/matlabcentral/answers/1808110-simulink-coder-fatal-the-data-type-can_datatype-is-not-supported-because-it-has-no-customcast-fun
- The code generator needs to be configured for non-finite data. Refer to the following documentation to understand how to configure the model - https://www.mathworks.com/help/rtw/gs/verify-whether-simulation-results-match-generated-executable-program-results.html#:~:text=Configure%20the%20code%20generator%20to%20produce%20nonfinite%20data%20(for%20example%2C%20NaN%20and%20Inf)%20and%20related%20operations.%20Click%20Code%20Generation%20%3E%20Interface.%20Confirm%20that%20parameter%20Support%3A%20non%2Dfinite%20numbers%20is%20selected
Hope this resolves your query. Happy coding!
Categories
Find more on Embedded Coder in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!