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

1 次查看(过去 30 天)
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

采纳的回答

Michael
Michael 2023-9-1
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

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Simulink Coder 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by