When using custom code in Simulink, how do I look at stack trace information from a custom code crash?
조회 수: 8 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2017년 10월 13일
답변: MathWorks Support Team
2018년 1월 18일
When using custom code in Simulink, how do I look at stack trace information from a custom code crash?
채택된 답변
MathWorks Support Team
2017년 10월 13일
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
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Environment Customization에 대해 자세히 알아보기
제품
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!