problem for using AMMCLIB when generating code: can not find .tlc file

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

problem for using AMMCLIB when generating code: can not find .tlc file

1,431件の閲覧回数
xiaobo1982
Contributor I

when I use AMMCLIB in sumulink, simulating the model is fine, but when I build the model and generating code, following error is appeared:

S-function 'MLIB_Add_SF_F16' in 'untitled/MLIB_Add_F16/MLIB_Add_SF' specifies option SS_OPTION_SFUNCTION_INLINED_FOR_RTW however a 'MLIB_Add_SF_F16.tlc' file could not be located in the current working directory, the S-function directory 'D:\Program Files\MATLAB\R2017a\toolbox\nxp\mlib\bam_f16', or the directory 'D:\Program Files\MATLAB\R2017a\toolbox\nxp\mlib\bam_f16\tlc_c'

I searched the lib documents, but no tlc file is found.

please help me for this issue!

Thanks!!!

lib.PNG

model.PNG

ラベル(1)
0 件の賞賛
3 返答(返信)

1,332件の閲覧回数
j_wale_3
Contributor II

Hi Daniel,

I have a related issue, which I hope you can help with.

Using the MBDT, it is possible to build code and run it on the MPC5744P target directly from Simulink. However, when importing the generated source files into S32DS, any references to functions in the GMCLIB produce linker errors.

I notice in the Simulink coder output that the GMCLIB functions (e.g. GMCLIB_Clark_FLT), are not explicitly referenced in the header files of the code modules that call the functions, but the compiler accepts this - so it looks like they are treated implicitly as extern function types. However, the build process used by the Simulink autocoder can cope with this, but S32DS cannot. Can you recommend a way to allow successful linking in S32DS? Perhaps forcing Simulink to explicity include function prototypes for GMCLIB functions?

Thanks,

John.

0 件の賞賛

1,332件の閲覧回数
constantinrazva
NXP Employee
NXP Employee

Hello j.wale.3@warwick.ac.uk,

Unfortunately with the new version of S32 Design Studio there were some backward compatibility issues - most likely it is missing the library linkage. You can try and add it manually by right clicking on the project, then clicking on Properties.

From there you can follow the image below: go to C/C++ Build -> Settings -> Standard S32DS C Linker -> Libraries. There you should add ":MPC574xP_AMMCLIB.a" [just like this].

Let us know if you have issues with these steps.

pastedImage_2.png

Kind regards,

Razvan.

0 件の賞賛

1,332件の閲覧回数
dumitru-daniel_
NXP Employee
NXP Employee

Hi xiaobo1982@163.com‌,

That is normal. You are using the stand alone version of the AMMCLIB package which per today status includes only the simulation capabilities.

If you want to exercise the code generation capabilities, you need to install the entire Model Based Design Toolbox - that incorporates the AMMCLIB and adds on top of that the code generation capabilities.

Please download and install the appropriate package from: Model-Based Design Toolbox | NXP 

Hope this helps!

Daniel

0 件の賞賛