I am attempting to generate C code from my Simulink model. I have a parameter (external variable with direct access) defined in a hand-coded header file as:
SInt16_T EOLFillTimeLookup[2][2];
This parameter is a 2×2 matrix in Simulink but when I generate code, the generated code is expecting a 1D array instead of a 2D array.
For example, when passing a pointer to this parameter to an interpolate function the code uses:
&(EOLFillTimeLookup[0])
I would expect it to be:
&(EOLFillTimeLookup[0][0])
I realize these are functionally equivalent, but this is causing compiler warnings. Is there a way to tell Real-Time Workshop to treat my parameter as a 2D array?
Best Answer