- Open model settings (Ctrl+E).
- Go to Code Generation.
- Go to Optimization and disable the "Enable local block output" and "Reuse local block outputs."
freezing issue while generate a code using slbuild
30 views (last 30 days)
Show older comments
Dear Technical Support Team,
Sub: freezing the laptop while using "slbuild"
When we are update( Ctrl+D) the simulink model no error, no warning message, the model is updating.
When we are generate a code using "slbuild", I am facing system freezing issue.
I have analyzed the simulink model in Matlab R2020b and Matlab R2022b software. Unable to see any error message.
Unable to move the curser, forcefully shutdown the machine.
Can you please help me out, how to resolve the issue.
Thanks & Regards,
Saravanan
0 Comments
Answers (1)
Atharva
on 13 Sep 2023
Hey Saravan,
I understand that MATLAB freezes on generating code using "slbuild".
This freezing issue is a known limitation of Code Generation process for optimizing and emitting code phase.
To resolve this issue, please follow the following steps as a workaround:
I hope this helps!
1 Comment
Viktor
about 8 hours ago
Edited: Viktor
about 3 hours ago
Hello,
I am still getting the above mentioned freezing issue in Matlab R2025b. The issue seems to appear when my model contains too many subsystem references. Although the above fix circumvents the issue, it instead leads to really bad code generation. For instance:
- A bus containing with the type set to a large bus object going through 78 different subsystem references gets declared 78 times (was 1 declaration with "Enable local block output" On).
- Type aliasing of "single" as "FLOAT32" leads to complex types not being code generated properly. Instead of "creal32_t" I get "cFLOAT32" in the generated code, specifically for custom library blocks containing real-imag-to-compex.
Mind that none of these issues were present with "Enable local block output" turned on.
Would mathworks kindly fix the issue with the size of models for code generation?
See Also
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!