How to keep only the header and source files after code generation ?

25 Ansichten (letzte 30 Tage)
Afraa Ibtissem Derbal
Afraa Ibtissem Derbal am 15 Nov. 2024 um 10:23
Beantwortet: Yash am 16 Nov. 2024 um 14:38
Hello ,
For the project I'm working on, I generate code for multiple model reference and I do the integration on a multicore board on an IDE? once i generate the code i have a lot of unneceessary files in the code generated folder.
Can this be optimised ? how can i tell simulink to only generate header and source files?
to be more clear i want to go from image A to Image B automaticaly.
Thank you !

Antworten (1)

Yash
Yash am 16 Nov. 2024 um 14:38
As far as I am aware there isn't a way to disallow code generation for files of a certain file type. You can use a custom script to delete unnecessary files of given type(s) by using the delete function:
delete *.mat
The above command deletes all files of type ".mat" in the current directory. You can do the same for other file types.
To optimize code generation, you might want to explore the settings available under "Code Generation > Optimization" and "Code Generation > Interface" in the Configuration Parameters. Note that by default Simulink Coder uses incremental code generation and incremental loading while generating code for model reference hierarchy [https://www.mathworks.com/help/releases/R2021b/rtw/ug/generate-code-for-model-reference-hierarchy.html]
Refer to these documentation for futher reading:

Kategorien

Mehr zu Simulink Coder finden Sie in Help Center und File Exchange

Produkte


Version

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by