I am using the MCAL of S32K14x, but I found that some macros in the core code are not defined, such as "MCAL_FAULT_INJECTION_POINT(T_WDG_INJ_TG_0)" used in the "Wdg_ChannelTrigger" function in the wdg module. "T_WDG_INJ_TG_0" cannot find its definition. By searching through the entire file, I found that "MCAL_FAULT_INJECTION_POINT(lable)" is defined in the Mcal.h file, Used to perform Compiler abstraction for MCAL Fault Injection tests. Can you tell me what "Compiler abstraction for MCAL Fault Injection tests "means and where" T_WDG_INJ_TG_0 "is defined.
The relevant code is as follows:
Hi @Zhai ,
Purpose of fault injection tests is to validate requirements coming from driver FMEA, requirements for error handling not testable only with use of driver function calls or increasing code coverage by activating code paths not reachable without fault creation.
So, T_WDG_INJ_TG_0 is defined in the cmm file that created by tester.
MCAL_FAULT_INJECTION_POINT macro expansion needs to be enabled by –d MCAL_ENABLE_FAULT_INJECTION option defined only in makefiles for fault injection tests, i.e. by default preprocessor does not include them in the code.
Best regards,
Nhi
Hi @Zhai ,
I found it in internal link of NXP. So, I don't know how to share with you. But, if you have any question relate to this, please let me know, I'll try to find it.
Best regards,
Nhi
Hi Zhai,
This is an example about fault injection test:
It changes variable's value that hard to create to set value of that variable.
Best regards,
Nhi