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

25 visualizaciones (últimos 30 días)
Afraa Ibtissem Derbal
Afraa Ibtissem Derbal el 15 de Nov. de 2024 a las 10:23
Respondida: Yash el 16 de Nov. de 2024 a las 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 !

Respuestas (1)

Yash
Yash el 16 de Nov. de 2024 a las 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:

Categorías

Más información sobre Simulink Coder en Help Center y File Exchange.

Productos


Versión

R2021b

Community Treasure Hunt

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

Start Hunting!

Translated by