I am trying to run static analysis on my application running on S32K144 (with SDK). I've read that the SDK is MISRA-C: 2012 compliant, but when I'm trying to run static analysis I'm getting so many violations that are there in the SDK.
Please guide me on what went wrong!!
已解决! 转到解答。
Hello @d_shivamkumar ,
I would like to answer your question. The SDK driver is MISRA-C: 2012 compliant, but we also document in the user manual that the driver still contains Violations of MISRA C 2012. It also has a comment/justification on top of each source/header file. Please see below picture for more information.
Best regards,
Hung
Hello @d_shivamkumar ,
I would like to answer your question. The SDK driver is MISRA-C: 2012 compliant, but we also document in the user manual that the driver still contains Violations of MISRA C 2012. It also has a comment/justification on top of each source/header file. Please see below picture for more information.
Best regards,
Hung
It appears as though this is not true. I am seeing thousands of MISRA-C 2012 violations in RTD 3.0.0 (build version S32K3_RTD_3_0_0_D2303_ASR_REL_4_7_REV_0000_20230331) and no comments with justifications for the deviations in the source files.
One file for example, is PlatformSDK_S32K3/BaseNXP/include/Compiler.h. This file contains multiple violations of Rule 20.7 (parameter of function-like macro must be enclosed in parentheses), yet there is no comment regarding MISRA-C in the file.
Another example is S32DS_Project/RTD/include/Adc_Sar_Ip_Irq.h. Here, there are numerous violations of Rule 10.4 (Usual arithmetic conversions performed on operands with different essential type categories), and again, there is no comment regarding MISRA-C in the file.
There are many other files with similar problems.