Is it possible to obtain a debuggable S-function which is generated automatically by RTW?

1 view (last 30 days)
I'm using Matlab Real-Time Workshop in several versions of Matlab (2007a, 2007b, 2009a) with Microsoft Visual Studio 2008. I'm building s-functions from simulink models. While building S-Functions automatically by RTW, is there any option in configuration parameters dialog of models that make possible to obtain debuggable s-functions?
I set Compiler Optimization level as "Custom" and I entered some flags(/Zi,/DNDEBUG,etc) in "custom compiler optimization flags" but I couldn't achieve to get a debuggable s-function.
Is there any way to do this?

Answers (1)

Guy Rouleau
Guy Rouleau on 7 Nov 2013
In the generated makefile, search for "debug", you should find some comments explaining what to do. If you can find it, you should find the OPT flags passed to the compiler... add yours there. Once you modified the makefile, re-run the bat-file and it should generate a debuggable mex-file with the pdb file.

Categories

Find more on Simulink Coder in Help Center and File Exchange

Community Treasure Hunt

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

Start Hunting!