MATLAB crash when simulating a generated FMU in Simulink Compiler

10 views (last 30 days)
When I created a FMU file by Simulink Compiler and run it on my Simulink model, MATLAB crashed without any error messages and log files.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 9 Aug 2022
Edited: MathWorks Support Team on 9 Aug 2022
There is a bug in Simulink Compiler 1.5 (R2022b) due to native lcc compiler to aid inhouse products such as Stateflow and MATLAB Function Block to simulate.
To work around the issue, please install one of supported C Compilers like MinGW. 
For all supported compilers, see
Note: If you use Simulink Coder, you can verify the compiler used for code generation:
In the Configuration Parameters window(Ctrl+E), you can go to Code Generation -> Build process -> Toolchain Settings -> Toolchain Or  In the MATLAB Command prompt(commandline): get_param('modelname', 'Toolchain')
  1 Comment
Wenhan Huang
Wenhan Huang on 8 Aug 2022
User can verify the compiler used for code generation:
in UI, they can go to Model Settings->Code Generation ->Toolchain Settings -> Toolchain
or commandline: get_param('modelname', 'Toolchain')
For all supported compiler, see

Sign in to comment.

More Answers (0)


No tags entered yet.




Community Treasure Hunt

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

Start Hunting!