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

2 visualizaciones (últimos 30 días)
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.

Respuestas (0)

Categorías

Más información sobre Test Execution en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2017a

Community Treasure Hunt

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

Start Hunting!

Translated by