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 \ifnot FuSaRTS <a href="../../General/html/index.html"><b>Introduction</b></a> \endif \if FuSaRTS <a href="../../Safety/html/index.html#CodingRules"><b>Coding Rules</b></a> \endif.
6 /* MISRA-C:2004 no longer included in build
7 CMSIS-Core (Cortex-M) violates the following MISRA-C:2004 rules:
9 - Required Rule 8.5, object/function definition in header file.<br>
10 Violated since function definitions in header files are used for function inlining'.
12 - Advisory Rule 12.4, Side effects on right hand side of logical operator.<br>
13 Violated because volatile is used for core register definitions.
15 - Advisory Rule 14.7, Return statement before end of function.<br>
16 Violated to simplify code logic.
18 - Required Rule 18.4, declaration of union type or object of union type: '{...}'.<br>
19 Violated since unions are used for effective representation of core registers.
21 - Advisory Rule 19.4, Disallowed definition for macro.<br>
22 Violated since macros are used for assembler keywords.
24 - Advisory Rule 19.7, Function-like macro defined.<br>
25 Violated since function-like macros are used to generate more efficient code.
27 - Advisory Rule 19.16, all preprocessing directives must be valid.<br>
28 Violated to set default settings for macros.
32 CMSIS-Core (Cortex-M) violates the following MISRA-C:2012 rules:
34 - Directive 4.9, function-like macro defined.<br>
35 Violated since function-like macros are used to generate more efficient code.
37 - Rule 1.3, multiple use of '#/##' operators in macro definition.<br>
38 Violated since function-like macros are used to generate more efficient code.
40 - Rule 11.4, conversion between a pointer and integer type.<br>
41 Violated because of core register access.
43 - Rule 11.6, cast from unsigned long to pointer.<br>
44 Violated because of core register access.
46 - Rule 13.5, side effects on right hand side of logical operator.<br>
47 Violated because of shift operand is used in macros and functions.
49 - Rule 14.4, conditional expression should have essentially Boolean type.<br>
50 Violated since macros with several instructions are used.
52 - Rule 15.5, return statement before end of function.<br>
53 Violated to simplify code logic.
55 - Rule 20.10, '#/##' operators used.<br>
56 Violated since function-like macros are used to generate more efficient code.
58 - Rule 21.1, reserved to the compiler.<br>
59 Violated since macros with leading underscores are used.
63 <device>.h files generated by <b>SVDConv.exe</b> violate the following MISRA-C:2004 rules:
65 - Advisory Rule 20.2, Re-use of C90 identifier pattern.<br>
66 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.
68 - Advisory Rule 19.1, Declaration before \#include.<br>
69 Violated since Interrupt Number Definition Type (IRQn_Type) must be defined before including the core header file.