Why does Accelerator Mode not include file(s) provided in the custom code configurations?
조회 수: 7 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2020년 2월 28일
편집: MathWorks Support Team
2020년 5월 26일
I have a model which includes an S-function block that requires certain libraries. This libraries are included in the "Code Generation > Custom Code" section. The model is not able to link the associated files when running in accelerator mode, but works fine in rapid accelerator mode. I see an error such as:
====================== Error below ======================
fatal error C1083: Cannot open include file: 'myHeader.h': No such file or directory
채택된 답변
MathWorks Support Team
2020년 5월 26일
편집: MathWorks Support Team
2020년 5월 26일
We have identified two ways of having your required files linked while running in accelerator mode. I have listed these below:
1. Manually edit the makeInfo.includePath and makeInfo.sources section of the file "libs\timesn\rtwmakecfg.m" to reflect the following:
makeInfo.includePath = {pwd};
makeInfo.sources = {'filename1', 'filename2'};
Note: if you have a custom S-function created without the S-function builder, you may need to create the rtwmakecfg.m manually and put it in the same directory as the S-function itself. To have an additional include directory, the function would look like:
function makeInfo = rtwmakecfg()
makeInfo.Name = 'MyCustomConfig';
makeInfo.includePath = {'YOUR_PATH_NAME'};
end
2. Build the S-Function using S-Function builder block and under the libraries pane, include the following:
...\filename1
...\filename2
Note: include the full path to the source files
Note: define the input and output data types under the data properties pane
댓글 수: 0
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Simulink Environment Customization에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!