Can I provide pre-compiled proprietary S-Functions with a Simulink model to be used in Real-Time Workshop 5.0 (R13)?
6 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
MathWorks Support Team
el 27 de Jun. de 2009
Editada: MathWorks Support Team
el 29 de Mzo. de 2024
I have a Simulink model which contains a proprietary C-MEX S-Function. I would like to distribute the S-Function in proprietary form so that it can be used with Real-Time Workshop.
Respuesta aceptada
MathWorks Support Team
el 29 de Mzo. de 2024
Editada: MathWorks Support Team
el 29 de Mzo. de 2024
This is not a trivial task, since it requires an extensive knowledge of Real-Time Workshop 5.0 (R13) code generation.
To do this, you will need to do the following:
1. Write a TLC-file that calls your proprietary S-functions to generate code from the S-Fcn block.
2. Provide the object files for each platform/compiler combination that the end users might be using.
3. Write a custom template make file (.tmf) which links your object files to the RTW executable. You can use one of the make files shipped with MATLAB and modify it as necessary.
For more information execute the following commands in the MATLAB command window:
Code Generation and the Build Process
web([docroot '/toolbox/rtw/rtw_ug/make2.html'])
Customizing the Build Process
web([docroot '/toolbox/rtw/rtw_ug/target10.html'])
For information on how to write TLCs refer to the following section in the documentation:
Target Language Compiler (Real-Time Workshop)https://www.mathworks.com/help/rtw/target-language-compiler.html
The 'timestwo' s-function demo model 'sfcndemo_timestwo' uses the TLC file 'timestwo.tlc', which is a good-starting point for writing TLCs. To open this model, type 'sfcndemo_timestwo' at the MATLAB Command Prompt. This model has a link to the 'timestwo.tlc' file.
For further information on various TLC directives and built-in functions, refer to the following section:
Directives and Built-In Functions (Real-Time Workshop)
https://www.mathworks.com/help/rtw/tlc/target-language-compiler-directives.html
0 comentarios
Más respuestas (0)
Ver también
Categorías
Más información sobre Simulink Coder en Help Center y File Exchange.
Productos
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!