S32 SDK MISRA-C: 2012 compliancy

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

S32 SDK MISRA-C: 2012 compliancy

跳至解决方案
3,786 次查看
d_shivamkumar
Contributor III

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!!

标签 (1)
0 项奖励
回复
1 解答
3,760 次查看
hungnguyenphi
NXP Employee
NXP Employee

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.

hungnguyenphi_0-1635739829675.png

 

Best regards,

Hung

在原帖中查看解决方案

2 回复数
3,761 次查看
hungnguyenphi
NXP Employee
NXP Employee

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.

hungnguyenphi_0-1635739829675.png

 

Best regards,

Hung

1,274 次查看
jleveque
Contributor I

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.

0 项奖励
回复