필터 지우기
필터 지우기

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

조회 수: 3 (최근 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