The model happens error during SIL test, which call external C function or include extern header file.

The model happens error during SIL test, which call external C function or include extern header file.
1.In simulink model,the stateflow has call extern C function,When executing Model Advisor,MIL test,code generation,there has no problem,however when executing SIL test,there has error showed below:
MonThIgbtOTlib.lib(MonThIgbtOT.obj):error LNK2019:can not resolve external symbol LIB_C0ASILA_DbcRstEv,the symbol is reference in oakkxkjszn
MonThIgbtOTlib.lib(MonThIgbtOT.obj):error LNK2019:can not resolve external symbol LIB_C0ASILA_DbcCntT,the symbol is reference in oakkxkjszn
MonThIgbtOTlib.lib(MonThIgbtOT.obj):error LNK2019:can not resolve external symbol LIB_C0ASILA_DbcClrCntT,the symbol is reference in oakkxkjszn
The external symbols that can not be resolved are functions define in external .c file.
2. In simulink model,adding code in Custom code->Source file,When executing Model Advisor,MIL test,code generation,there has no problem,however when executing SIL test,there has error showed below:
MFTHRead.c
..\..\MFTHRead.c(20):fatal error C1083:can not open file”MemMap.h”:No such file or directory
The add code in Custom code->Source file is showed below:
#define START _SEC_SOFTWAREINFO
#include “MemMap.h”
volatile const unit32 SwcShortName_RTE_VERSION = RTE_VERSION
#define STOP _SEC_SOFTWAREINFO
#include “MemMap.h”
Note:The SIL test environment is Win7+MatlabR2017a+VC2015
Provide examples to solve SIL test problems mentioned above is the best.

回答(0 个)

类别

帮助中心File Exchange 中查找有关 Results, Reporting, and Test File Management 的更多信息

产品

版本

R2017a

提问:

2019-12-30

Community Treasure Hunt

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

Start Hunting!

Translated by