C code---> sfunction --> Xpc Target with legacy_code

1 回表示 (過去 30 日間)
Paul
Paul 2014 年 1 月 22 日
回答済み: Suneesh 2014 年 1 月 22 日
Hi I'm trying to use the legacy code tool to create a s function from C code, that then can be loaded onto a target machine and ran.
I worked through the example on mathworks website:
I used the example to create an s function but then attempted to use the model wizard to compile the simulink model into my target machine but it comes up with the error :
S-function 'ex_sfun_doubleit' in 'untitled/ex_sfun_doubleit' specifies option SS_OPTION_SFUNCTION_INLINED_FOR_RTW however a 'ex_sfun_doubleit.tlc' file could not be located in the current working directory, the S-function directory 'C:\Users\HIL\Documents\MATLAB\LEGACY_TEST', or the directory 'C:\Users\HIL\Documents\MATLAB\LEGACY_TEST\tlc_c'
can some one explain ?
  1 件のコメント
Suneesh
Suneesh 2014 年 1 月 22 日
What is a "model wizard"?

サインインしてコメントする。

採用された回答

Suneesh
Suneesh 2014 年 1 月 22 日
1. To generate a TLC file for the model shown at the end of that example, enter the following command:
legacy_code('sfcn_tlc_generate', def);
2. It is also possible to set SS_OPTION_SFUNCTION_INLINED_FOR_RTW to false in the generated S-Function, but I am not able to remember the option. A google search perhaps....

その他の回答 (0 件)

カテゴリ

Help Center および File ExchangeTarget Computer Setup についてさらに検索

Community Treasure Hunt

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

Start Hunting!

Translated by