When using custom code in Simulink, how do I look at stack trace information from a custom code crash?
9 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 13 de Oct. de 2017
Respondida: MathWorks Support Team
el 18 de En. de 2018
When using custom code in Simulink, how do I look at stack trace information from a custom code crash?
Respuesta aceptada
MathWorks Support Team
el 13 de Oct. de 2017
Use a MATLAB Function Block in your model containing the following code:
coder.updateBuildInfo('addCompileFlags', '/Zi');
coder.updateBuildInfo('addLinkFlags', '/DEBUG');
Change the compile and link flags to be the appropriate flags for your compiler to produce debugging symbols.
Upon simulation, debugging symbols (if created as a separate file) will be produced in the directory (where <model> is the name of your model):
<currentFolder>\slprj\_sfprj\<model>\_self\sfun\src\
From the stack trace that appears in the Details view of the MATLAB crash window, use a tool that can read debugging symbols to determine the function and line number of each frame in the stack trace.
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Simulink Environment Customization en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!