MATLAB: Does the rt_nonfinite.c file generated using GRT not use the byteordering specified in the hardware implementation pane

simulink coder

I have a Simulink model which is configured to generate code with GRT target. I also specified the ByteOrdering property to be "LittleEndian" in the "Hardware Implemenation Pane" of the configuration parameters dialog box and I generate code for the model. However when I open the "rt_nonfinite.c" file generated during the build process, I find the following code:
uint16_T one = 1;
enum {
LittleEndian,
BigEndian
} machByteOrder = (*((uint8_T *) &one) == 1) ? LittleEndian : BigEndian;

Best Answer

The ability to use the specifications from the "Hardware Implementation Pane" to generate code for the "rt_nonfinite.c" is not available with the GRT target of the Real-Time Workshop.
As a workaround, use the Embedded Real-Time target to specify the hardware parameters in the "Hardware Implementation Pane"