I have some level 2 sfunctions in my system to wrap my C/C++ functions. All of these functions are fixed and I don't change them. Is it possible to avoid code generation of these function each time that I build an application for the xpctarget?
Mostrar comentarios más antiguos
Hello,
I am trying to compile and a build a Simulink system as an xpctarget application. My system has some level-2 Sfunctions that I use to wrap some of my C/C++ functions. One of these functions is huge and each time that I change my system and try to build the application it takes a long time to do code generation for that sfunction. (compilationa and linking are pretty fast since I use static libraries of my functions.)
Is there a possibility that once the code is generated for the sfunction, the next time somehow avoid code generation for that sfunction. Or, I separately generate code for the sfunction once and each time just using the generated code.
Thanks for your help,
Reza
Respuestas (3)
Kaustubha Govind
el 2 de Nov. de 2012
0 votos
I think the only way to bypass code-generation for one part of the model is to using a Model Reference block. Try putting your S-function is a separate model and reference that model from the main model. I think if the generated code for the referenced model already exists, Simulink Coder won't attempt to generate code again.
Alireza
el 2 de Nov. de 2012
0 votos
Alireza
el 3 de Nov. de 2012
0 votos
1 comentario
Kaustubha Govind
el 5 de Nov. de 2012
Have you already written a TLC file for your S-function? From the error message, it looks like you need to do so. Please see S-Function Inlining.
Categorías
Más información sobre Simulink Coder en Centro de ayuda y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!