I want to force Real-Time Workshop to export constants that are defined in a MATLAB file associated with a top-level model. I want a MATLAB file to define the variables as in the example below:
K_TRUE = boolean(1);K_FALSE = boolean(0);
I also want the variables to appear in the generated header file as follows:
extern const boolean_T K_FALSE; /* Variable: K_FALSE * '<S2>/K_FALSE' */ extern const boolean_T K_TRUE; /* Variable: K_TRUE * '<S2>/K_TRUE' */
I need the variables to appear in the header file even if they are not used in the Simulink model, but Real-Time Workshop excludes them.
Best Answer