What causes an "Unable to load DLL dependency: KERNEL32.dll.GetFileSizeEx" error on the target screen when attempting to load an SLRT application in R2018b or prior?
조회 수: 35 (최근 30일)
이전 댓글 표시
MathWorks Support Team
2018년 10월 31일
편집: MathWorks Support Team
2023년 4월 5일
NOTE: This article is not relevant for newer Simulink Real-Time versions (R2019a or later).
When building a Simulink model for Simulink Real-Time (SLRT) with the latest version of Microsoft Visual Studio C++ 2017, the following error is shown on the target screen (or obtained using the command "tg.viewTargetScreen") when attempting to load the application.
ERROR: Unable to load DLL dependency: KERNEL32.dll.GetFileSizeEx
Loading C:\private\xpcosc.dlm failed with error 127
Error: Could not load model C:\private\xpcosc: 127
When running the command "slrttest" the error might appear as:
>> slrttest
### Simulink Real-Time Test Suite ### Host-Target interface is: TcpIp
### Test 1, Ping target computer 'TargetPC1' using system ping: ... OK
### Test 2, Ping target computer 'TargetPC1' using SLRTPINGTARGET: ... OK
### Test 3, Software reboot the target computer 'TargetPC1': ...... OK
### Test 4, Build and download a Simulink Real-Time application using model slrttestmdl to target computer 'TargetPC1': ...Warning: Error occurred while executing the listener callback for event Loaded defined for class
MathWorks.xPCTarget.FrameWork.xPCTargetPC:
Error using SimulinkRealTime.target/XCPLoadedCB
Enter a valid application name
> In SimulinkRealTime.target/loa
In slrttest (line 212) OK
### Test 5, Check host-target command communications with 'TargetPC1': ... FAILED
When building a model for SLRT, you may see the following warnings and errors:
### Download model onto target: TargetPC1Warning: Error occurred while executing the listener callback for event Loaded defined for class
MathWorks.xPCTarget.FrameWork.xPCTargetPC:
Error using SimulinkRealTime.target/XCPLoadedCB
Enter a valid application name
### Create SimulinkRealTime.target object tgError using coder.internal.callMakeHook
The call to slrt_make_rtw_hook, during the exit hook generated the following error:
Invalid Simulink object name: loader
The build process will terminate as a result.<...>
Caused by:
Error using dispIfVerbose (line 31)
Invalid Simulink object name: loader
Error using dispIfVerbose (line 31)
No block diagram 'loader' is loaded.
Additionally, the following warning may appear in Diagnostic Viewer:
Warning: Streaming to SDI is not available: Could not connect to XCP slave: XCP Master internal error: Connect failed
채택된 답변
MathWorks Support Team
2023년 4월 5일
편집: MathWorks Support Team
2022년 1월 3일
Please refer to the following bug report for fixes and workarounds:
댓글 수: 1
Stefanie Schwarz
2020년 5월 14일
If the above does not help, please contact MathWorks Technical Support for further assistance: https://www.mathworks.com/support/contact_us.html
추가 답변 (0개)
참고 항목
카테고리
Help Center 및 File Exchange에서 Multicore Processor Targets에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!