1 /** \page coreMISRA_Exceptions_pg MISRA-C Deviations
2 CMSIS-Core (Cortex-M) uses the common coding rules for CMSIS components that are documented under
3 <a href="../../General/html/index.html"><b>Introduction</b></a>.
6 CMSIS-Core (Cortex-M) violates the following MISRA-C:2004 rules:
8 - Required Rule 8.5, object/function definition in header file.<br>
9 Violated since function definitions in header files are used for function inlining'.
11 - Advisory Rule 12.4, Side effects on right hand side of logical operator.<br>
12 Violated because volatile is used for core register definitions.
14 - Advisory Rule 14.7, Return statement before end of function.<br>
15 Violated to simplify code logic.
17 - Required Rule 18.4, declaration of union type or object of union type: '{...}'.<br>
18 Violated since unions are used for effective representation of core registers.
20 - Advisory Rule 19.4, Disallowed definition for macro.<br>
21 Violated since macros are used for assembler keywords.
23 - Advisory Rule 19.7, Function-like macro defined.<br>
24 Violated since function-like macros are used to generate more efficient code.
26 - Advisory Rule 19.16, all preprocessing directives must be valid.<br>
27 Violated to set default settings for macros.
30 CMSIS-Core (Cortex-M) violates the following MISRA-C:2012 rules:
32 - Directive 4.9, function-like macro defined.<br>
33 Violated since function-like macros are used to generate more efficient code.
35 - Rule 1.3, multiple use of '#/##' operators in macro definition.<br>
36 Violated since function-like macros are used to generate more efficient code.
38 - Rule 11.4, conversion between a pointer and integer type.<br>
39 Violated because of core register access.
41 - Rule 11.6, cast from unsigned long to pointer.<br>
42 Violated because of core register access.
44 - Rule 13.5, side effects on right hand side of logical operator.<br>
45 Violated because of shift operand is used in macros and functions.
47 - Rule 14.4, conditional expression should have essentially Boolean type.<br>
48 Violated since macros with several instructions are used.
50 - Rule 15.5, return statement before end of function.<br>
51 Violated to simplify code logic.
53 - Rule 20.10, '#/##' operators used.<br>
54 Violated since function-like macros are used to generate more efficient code.
56 - Rule 21.1, reserved to the compiler.<br>
57 Violated since macros with leading underscores are used.
61 <device>.h files generated by <b>SVDConv.exe</b> violate the following MISRA-C:2004 rules:
63 - Advisory Rule 20.2, Re-use of C90 identifier pattern.<br>
64 Violated since CMSIS macros begin with '__'. Since CMSIS is developed and verified with various compilers this approach is acceptable and avoids conflicts with user symbols.
66 - Advisory Rule 19.1, Declaration before \#include.<br>
67 Violated since Interrupt Number Definition Type (IRQn_Type) must be defined before including the core header file.