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?
Ältere Kommentare anzeigen
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
Antworten (3)
Kaustubha Govind
am 2 Nov. 2012
0 Stimmen
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
am 2 Nov. 2012
0 Stimmen
Alireza
am 3 Nov. 2012
0 Stimmen
1 Kommentar
Kaustubha Govind
am 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.
Kategorien
Mehr zu Simulink Coder finden Sie in Hilfe-Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!