Using Embedded Coder, how can I customize the typedefs generated in rtwtypes.h?
59 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
MathWorks Support Team
am 20 Jun. 2018
Bearbeitet: MathWorks Support Team
am 22 Mai 2020
Using Embedded Coder, how can I customize the typedefs generated in rtwtypes.h?
Akzeptierte Antwort
MathWorks Support Team
am 22 Mai 2020
Bearbeitet: MathWorks Support Team
am 22 Mai 2020
The 'rtwtypes.h' header file generated by Embedded Coder defines the mapping between Simulink data types and primitive C/C++ data types. Embedded Coder makes such decisions based on the word length of target hardware code generation to make sure generated code leads to the same result as in simulation. This file should not be manually edited for customization.
Although you should not manually customize this file, you can still customize your typedefs. In some cases customization is needed so that generated code aligns with coding standards. In this case, use data type replacement.
Data type replacement allows you to import customized data type aliases defined in your own header files and use them to define Simulink data types in generated code. If a Simulink data type is defined with an alias, then its definition in 'rtwtypes.h' is not used. Instead, the compiler goes to the custom header file for the definition.
For more information about data type replacement, please see the following reference:
0 Kommentare
Weitere Antworten (0)
Siehe auch
Kategorien
Mehr zu Simulink Coder finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!