How to run SIL of a model including s-functions based on c++ code
1 次查看(过去 30 天)
显示 更早的评论
I have a model using S-functions. The s-function is based on existing C++ code and the integration of this code into s-functions was done using legacy code. Until here everything works well. The problem is when i try to run the model as reference model in software in the Loop mode. In this case the compiler is not capable of finding the source code of the s-functions. It works when i copy the source code to the directory where i'm working at, but i don't want that. I need the compiler to find the source code in a specific directory struture, where the code is placed.
Regards,
Rodrigo
2 个评论
Mukund Sankaran
2018-12-10
Perhaps the search path needs to be modified to include the path to the custom C/C++ code so the compiler can find it ?
回答(2 个)
Mark McBroom
2019-1-11
when you used legacy_code tool to create s-function, did you use the
legacy_code('rtwmakecfg_generate', specs)
option to create an rtwmakecfg.m file? This file will add path information for S-Function source and header files to the make file used to build the SIL mode target.
0 个评论
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!