MATLAB: Am I not able to transmit data through the Serial port when using Open Watcom 1.3 in xPC Target 2.9 (R2006a)

Simulink Real-Time

In my model I use the Baseboard RS232 block to output an ASCII string through the Serial port of my target machine. On the receiver side I simply receive nothing. There is no error message or so.
Receiving data through the RS232 port works fine in the same model on the same target machine.

Best Answer

This issue is related to the compiler options provided to the Open Watcom 1.3 during compilation of the model source code.
To solve the issue you need to specify an additional option for the Real-Time Workshop build process. In order to do so:
1) Open the Configuration Parameters of your model
2) Navigate to the Real-Time Workshop pane
3) In the Make Command line add
OPT_OPTS="-of"
4) Click OK to close the dialog
5) Build the model
Please note that upgrading to a newer version of xPC Target, e.g. xPC Target 3.0 (R2006b) or later resolves the issue.