How to configure the encoder to use C-code standard data type keywords?

1 view (last 30 days)
I am trying to get the autogenerated C-code from my model to "look" a certain way. One thing I would like to change is the type definition keywords that it uses. I want the code to use the standard, primary C-code type definition keywords but the configuration tool will not let me use them because the are "protected" keywords. The encoder uses its own set of default keywords (separate from the Simulink defaults) that are defined as "synonyms" for the standard, primary C-code keywords in the "rtwtypes.h" file using "typedef" statements. See examples below.
Is there a way to let me choose the keywords I want to show up in the code? Thank you!

Answers (1)

Mark McBroom
Mark McBroom on 12 Mar 2025
You can use standard C99 data types in the generated code. See this link: https://www.mathworks.com/help/ecoder/ug/control-data-type-names-in-generated-code.html
Thanks.
Mark.

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products


Release

R2019a

Community Treasure Hunt

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

Start Hunting!