How do I debug S-functions generated using the legacy code tool in Simulink 6.5 (R2006b)?

I need to debug my S-function which I created using the following command:
legacy_code('sfcn_cmex_generate', def);
legacy_code('compile',def);
where, def contains the legacy code tool data structure.

 Accepted Answer

This bug has been fixed in Release 2007b (R2007b). For previous product releases, read below for any possible workarounds:
To create a debuggable S-function, pass the '-g' switch to the LEGACY_CODE command as follows:
legacy_code('sfcn_cmex_generate', def);
legacy_code('compile',def,'-g');

More Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products

Release

R2006b

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!