MATLAB: Are there any known problems with Microsoft Visual C 7.0 or 7.1 and xPC Target 2.0.1 (R13SP1)

77.07.1cmicrosoftmsvcnetoptimizerpci-6071eSimulink Real-Timetargetvcvisualxpc

I would like to know if there are any known problems with Microsoft Visual C 7.0 or 7.1 and xPC Target 2.0.1 (R13SP1).

Best Answer

In Visual C 7.0 and 7.1, the optimizer is known to be a lot more aggressive and the Volatile storage class is needed in more places. This behavior seems to have affected drivers for National Instrument boards more than most. You can turn the optimizer off to work around this behavior with the following steps:
1. On the Simulation Parameters dialog -- > Real-Time Workshop tab -- > Target configuration page, look for the Make command.
2. The default reads "make_rtw". Add the following OPTS="/c /Od /nologo" so the line reads as the following:
make_rtw OPTS="/c /Od /nologo"
As a side-note, the double quotes are significant because of the spaces in the argument.