Borrar filtros
Borrar filtros

Target Language Compiler (TLC) alternatives for custom inline L2 sfunctions in Simulink.

3 visualizaciones (últimos 30 días)
Hi everyone,
I was wandering if there is any alternative to .tlc language and files, ideally Matlab code based, for inlining L2 C/CPP sfunctions in Simulink for custom code generation with Simulink Coder.
As I'm developing a custom Simulink Library for a specific target I would like to be able to encrypt all implementation .p style. Avoiding the somehow cryptic tlc coding altogether would be a nice property as well!
Best,
Konstantinos

Respuesta aceptada

Michael
Michael el 1 de Sept. de 2023
As far as I know there is no possibility to generate C/C++ code from a Level -2 MATLAB S-Function without writing an associated TLC file. I think if you want to design a library with additional code generation support you have 4 possibilities:
  • using S-Function blocks and write your functionality only in C/C++ which runs in Simulink and on the target system (non-inlined S-Function)
  • using S-Function blocks and write your functionality in C/C++ for running in Simulink and provide a TLC file used by the code generator (fully inlined S-Function)
  • using Level 2 MATLAB S-Functions blocks and write your functionality in MATLAB language for running in Simulink and provide a TLC file used by the code generator
  • using MATLAB Function block and write your functionality only in MATLAB language for running in Simulink and as input for the code generator. You must ensure that you are using only functions and functionality from MATLAB which are supporting code generation. In this case it is also possible to deliver a .p - file which is "encrypted" but note the generated C/C++ code from such a block is not encrypted

Más respuestas (0)

Categorías

Más información sobre Simulink Coder en Help Center y File Exchange.

Community Treasure Hunt

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

Start Hunting!

Translated by