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?
Mostra commenti meno recenti
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
Risposte (3)
Kaustubha Govind
il 2 Nov 2012
0 voti
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
il 2 Nov 2012
0 voti
Alireza
il 3 Nov 2012
0 voti
1 Commento
Kaustubha Govind
il 5 Nov 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.
Categorie
Scopri di più su Simulink Coder in Centro assistenza e File Exchange
Prodotti
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!