When running a simulation with 'measure task stack usage' setting in SIL mode compilation errors stop the SIL simulation, how can I fix it?

6 次查看(过去 30 天)
When running a simulation with 'measure task stack usage' setting in SIL mode compilation errors stop the SIL simulation, I am using MinGW compiler and following is the error message.
D:/unitlevelanalysis/VehModMngt/Source/CodeGen/VehModMngt_ac_autosar_rtw/coderassumptions/lib/VehModMngt_ac_ca.lib -Wl,--end-group -lws2_32 xil_interface.obj:xil_interface.c:(.text+0xc1): undefined reference to `xilProfilingTimerFreeze' xil_interface.obj:xil_interface.c:(.text+0xf3): undefined reference to `xilProfilingTimerUnFreeze' xil_interface.obj:xil_interface.c:(.text+0x11e): undefined reference to `xilProfilingTimerFreeze' xil_interface.obj:xil_interface.c:(.text+0x150): undefined reference to `xilProfilingTimerUnFreeze' collect2.exe: error: ld returned 1 exit status gmake: *** [VehModMngt_ac.exe] Error 1 D:\unitlevelanalysis\VehModMngt\Source\CodeGen\VehModMngt_ac_autosar_rtw\sil>echo The make command returned an error of 2 The make command returned an error of 2 D:\unitlevelanalysis\VehModMngt\Source\CodeGen\VehModMngt_ac_autosar_rtw\sil>exit /B 1

回答(1 个)

Rasmita
Rasmita 2023-4-12
Hi Advait,
It is my understanding that, you are trying to simulate with ‘measure task stack usage’ in SIL mode and you are getting above mentioned compilation error in the ‘MinGW compiler.
The error message you're seeing is related to linker errors when trying to build the SIL executable with profiling enabled. It seems that the linker is not able to find the definitions for some functions related to profiling ('xilProfilingTimerFreeze', 'xilProfilingTimerUnFreeze') that are included in the 'xil_interface.obj' object file.
One possible solution could be to ensure that you are linking against the correct libraries that define these functions. You may also need to check that the libraries are correctly installed and their paths are included in the linker search path. Additionally, make sure that the required header files are included in the build.
For more information, please refer to the below documentation links:
Hope this helps!
Regards,
Rasmita

类别

Help CenterFile Exchange 中查找有关 Test Model Components 的更多信息

产品


版本

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by