I have created a Level-2 M-File S-Function which internally calls a C MEX function. This works fine in normal simulink, but is it possible to deploy this to a speedgoat real