How can I suppress the inclusion of legacy code source files while generating code for my S-function block in Real-Time Workshop 7.2 (R2008b)?

1 view (last 30 days)
I have a model that utilizes legacy code via an S-function block generated using 'legacy code tool'. I would like to know if there is any way to suppress the inclusion of the related legacy code file when generating code using 'packNGo' command. I need this since the bigger project in which I am going to incorporate the generated code has all the relevant files included.

Accepted Answer

MathWorks Support Team
MathWorks Support Team on 22 Feb 2010
You can suppress the inclusion of the legacy code source file in the 'packNGo' generated zip file by appropriately modifying the TLC for the S-function. The Legacy Code Tool creates a TLC file for the S-function block. Within this TLC, you can comment out the lines:
%<LibAddToCommonIncludes("<headerfile.h>")>
%<LibAddToModelSources("<sourcefile.c>")>
where 'headerfile.h' and 'sourcefile.c' are the header and source files specified by the legacy code tool data structure.
Now when you generate code with the 'packNGo' option, the legacy code will not be included in the zip folder.

More Answers (0)

Categories

Find more on Simulink Coder in Help Center and File Exchange

Products


Release

R2008b

Community Treasure Hunt

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

Start Hunting!