Build S function block

조회 수: 2 (최근 30일)
Kidus Guye
Kidus Guye 2017년 9월 1일
답변: Julia Antoniou 2017년 9월 6일
I have s function and I want to build this function and deploy it into an hardware (which is a parrot/drone for this case). But when i tried to build the s function block it asks me for .tlc file. I am just wondering if there is any other way I can build the file without creating .tlc file. Can one use embedded coder and by pass this problem??? I am kind of new for simulink and code generation.

채택된 답변

Julia Antoniou
Julia Antoniou 2017년 9월 6일
Hi Kidus,
Generating code for a model that has an S-function does require you to provide a TLC file. When a model is built, it assumes the generated code will be used in a MATLAB-free environment. Under that assumption, the coder needs to know how it can inline the code of your S-function in the generated C code. An S-function TLC file tells the coder how to do this.
There are many resources within the MATLAB documentation that can guide you on how to write TLC files for S-functions. I would recommend starting with this documentation page to learn more about inlining S-functions: https://www.mathworks.com/help/releases/R2017a/rtw/tlc/inlining-s-functions.html.
Another documentation page that would be helpful is this tutorial on creating TLC files for S-function blocks and generating code. https://www.mathworks.com/help/rtw/tlc/inlining-s-functions-with-tlc.html

추가 답변 (0개)

카테고리

Help CenterFile Exchange에서 Target Language Compiler에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by