|
"Cyrock User" <razor4045@gmail.com> wrote in message
<g1gg1t$fhk$1@fred.mathworks.com>...
> To create a .mex32 or a dll from a simulink model that
> contains an S-function with C-code, should I:
>
> -First create a mex32 file for the S-function though the
> mex compiler?
> -Use the legacy_code function somehow?
> -Directly use the Build-Subsystem RTW command?
>
> I am quite lost. It is not very clear in the documentation.
>
> Right now if have a .c file obtained through the S-
> function builder, which compiles and runs in the Simulink
> model, but I cant manage to compile the Simulink model.
>
> Thanks
Generally, what you have done should work. Put your code in
the S-function builder, see if it builds, then generate an
S-function from the whole system . The only other thing I
would do is to check the "Generate TLC Wrapper" option in
the S-Function Builder.
What I'd do to pinpoint the problem (and you've probably
tried these) are:
*Build the rest of the model without the S-function
*Build the model with only the S-function in it.
If none of these work, you should probably give us more
specifics about what it is that you are writing and what
error messages you are getting.
HTH,
Omur Bas
www.promodsoftware.com.tr
|