Error:Unable to find S-function module 'MD_9_Speed_Squawk_RC_'. S-function modules must exist as either source files or pre-compiled object files on the MATLAB path.

I trying to run a co-simulation between AMEsim and MATLAB Simulink on a TI Delfino F28379D hardware.
My hardware settings are good and well.
But I am getting this error while doing build, deploy of C-code on hardware in simulink.
"Error:Unable to find S-function module 'MD_9_Speed_Squawk_RC_'. S-function modules must exist as either source files or pre-compiled object files on the MATLAB path"
I checked the path where simulink model and amesim model exist in my system. I do have a MD_9_Speed_Squawk_RC_.mexw64 file which is required S-function for the code- generation.
I am not sure how to fix this error. Any help would be appreciated.

2 件のコメント

Isha
Isha 2025 年 9 月 15 日
Hello,
The “.mexw64” file is a Windows-hosted binary and is used only for simulation on your PC.
When you build code for deployment to hardware, Simulink needs C source code “(.c, .cpp)” for code generation, or a compatible TLC (Target Language Compiler) file that tells how to generate code from that S-function.
In order to generate C/C++ code from an MFile S-Function, you must provide a TLC file.
Hope this help.
Dynamo
Dynamo 2025 年 9 月 15 日
Hello @Isha,
Thank you for your comment on this thread. I understand that I need a C/C++ code from an MFile S-Function to run my control algorithm on external board. The problem is I don't understand how to do it. The link you shared here I have gone through it in past too, but I was not able to follow it.
Is there any step by step guide that you know of? or simple examples that I use to learn it?

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

回答 (0 件)

カテゴリ

ヘルプ センター および File ExchangeSimulink Coder についてさらに検索

製品

リリース

R2024b

質問済み:

2025 年 9 月 5 日

コメント済み:

2025 年 9 月 15 日

Community Treasure Hunt

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

Start Hunting!

Translated by