S32 SDK MISRA-C: 2012 compliancy

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

S32 SDK MISRA-C: 2012 compliancy

Jump to solution
3,833 Views
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!!

Labels (1)
0 Kudos
Reply
1 Solution
3,807 Views
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

View solution in original post

2 Replies
3,808 Views
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,321 Views
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 Kudos
Reply