How can I specify the directory where my S-function is generated using Real-Time Workshop's S-Function target?
13 vues (au cours des 30 derniers jours)
Afficher commentaires plus anciens
I want the generated mexw32 file to go in a non-default location. I would like to know how I can specify the location.
Réponse acceptée
MathWorks Support Team
le 27 Juin 2009
To set the output directory of your S-function target, modify the appropriate template makefile (TMF).
1. Find the appropriate TMF file in $MATLAB\rtw\c\rtwsfcn\
where $MATLAB is the MATLAB root directory on your machine, as returned by typing
matlabroot
at the MATLAB Command Prompt.
The filename will be rtwsfcn_(compiler).tmf. If you are using Visual Studio it will be rtwsfcn_vc.tmf, or if you are using the MATLAB default LCC, it will be rtwsfcn_lcc.tmf.
2. Copy or rename the TMF file to rtwfscn_(compiler)2.tmf.
3. Open rtwfscn_(compiler)2.tmf in the editor, and search for "-outdir".
4. There will be a line in the Rules section where it sets the MEX_FLAGS, and on one line will be:
-outdir ..
5. Replace the .. with the directory where you want the mexw32 file to be generated.
6. In the Real-Time Workshop options section of the Configuration Parameters dialog, set the TMF file to rtwfscn_(compiler)2.tmf instead of rtwsfcn_default_tmf.
7. When you build, the temporary directories will be generated in the working directory, but the S-function file will go to the location you specified for -outdir.
0 commentaires
Plus de réponses (0)
Voir également
Catégories
En savoir plus sur Simulink Coder dans Help Center et File Exchange
Produits
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!