Can I reduce the size of Model_data.c file generated by Embdded Coder?

8 次查看(过去 30 天)
When generate C/C++ code with Embdded Coder, output of some block in some Toolbox has Model_data.c file more than 100 Mb
Can I reduce Model_data.c file size by changing some configuration in Simulink?

回答(1 个)

Pratyush Swain
Pratyush Swain 2023-11-27
Hi 재욱 임,
To reduce or optimize the size of the C file generated by Embedded Coder, consider the following strategies:
1-Split the generated files - Instruct the embedded coder to create multiple files as its output, rather than putting every function in the same C file.For more information please refer to https://www.mathworks.com/matlabcentral/answers/93591-can-i-separate-or-split-large-generated-files-into-smaller-files-created-by-simulink-coder-8-0-r201
2-Code Generation Settings - Adjust or modify the code generation settings to optimize the generated code. Plese refer https://www.mathworks.com/help/ecoder/ug/generating-code-using-embedded-coder.html
3-Subsystem Partitioning - If your model has large subsystems, consider partitioning them into smaller, more manageable subsystems.
Hope this helps.

类别

Help CenterFile Exchange 中查找有关 Deployment, Integration, and Supported Hardware 的更多信息

产品


版本

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by