Simulink Coder Error: Error occurred when generating rtwtypes.h
Ältere Kommentare anzeigen
Dear all,
I have 1 model which created by MATLAB 2015a. It ran and generated code succesful.
Now I want to build by MATLAB 2019b, error occurred as following:
Error: Simulink Coder Error: Error occurred when generating rtwtypes.h: The structure argument 'configInfo' contains invalid fields, expected fieldnames are: GenDirectory PurelyIntegerCode SupportComplex MaxMultiwordBits ModelName
I don't know why. How to fix it??
4 Kommentare
Spencer Chen
am 22 Apr. 2020
It maybe that you need to update/replace some of the old blocks for the new version of Matlab/Simulink. There's a "Upgrade Advisor" tool hiddent somewhere in the menus that may help you.
Blessings,
Spencer
Rainer Moser
am 21 Okt. 2021
Check if your file genRTWTYPESDOTH.m is up-to-date by comparing with the 2021b file.
昌龍 楊
am 8 Apr. 2022
I got a same error message. Did you solve it?
Yuki Deguchi
am 19 Jan. 2023
It was caused by a path to an older version of genRTWTYPESDOTH.m.
Removing it from the path solved the problem.
Antworten (1)
Pooja Kumari
am 7 Okt. 2024
Bearbeitet: Pooja Kumari
am 7 Okt. 2024
Hi galaxy,
I understand that you are facing Simulink Coder error when generating rtwtypes.h.
This error is thrown by "genRTWTYPESDOTH," which is sometimes used to customize the "rtwtypes.h" file. Check if MATLAB is finding "genRTWTYPESDOTH" in the default location by executing
>> which genRTWTYPESDOTH
at the MATLAB prompt. The default location is $MATLAB/toolbox/rtw/rtw/genRTWTYPESDOTH.p, where $MATLAB is the directory in which MATLAB is installed.
If the "genRTWTYPESDOTH" is found in a non-default location in that case, you have two options for how to proceed:
- If the customized version of "genRTWTYPESDOTH" is not needed, remove it from the MATLAB path by renaming or deleting it. This helps resolve the error.
- If the customized version is needed, you can debug it by comparing it to the default version of the file. You can find the non-obfuscated version of the default file at $MATLAB/toolbox/rtw/rtw/genRTWTYPESDOTH.m.
Hope this helps!
Kategorien
Mehr zu Simulink Coder finden Sie in Hilfe-Center und File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!