]> begriffs open source - cmsis/blob - CMSIS/Documentation/Doxygen/Core/src/misra.md
CMSIS-Core(M) Doc: added info about deprecated symbols.
[cmsis] / CMSIS / Documentation / Doxygen / Core / src / misra.md
1 # MISRA-C Deviations {#coreMISRA_Exceptions_pg}
2
3 CMSIS-Core (Cortex-M) uses the common coding rules for CMSIS components that are documented in [CMSIS Introduction](../General/index.html).
4
5 CMSIS-Core (Cortex-M) violates the following MISRA-C:2012 rules:
6
7  - Directive 4.9, function-like macro defined.
8    - Violated since function-like macros are used to generate more efficient code.
9
10  - Rule 1.3, multiple use of '#/##' operators in macro definition.
11    - Violated since function-like macros are used to generate more efficient code.
12
13  - Rule 11.4, conversion between a pointer and integer type.
14    - Violated because of core register access.
15
16  - Rule 11.6, cast from unsigned long to pointer.
17    - Violated because of core register access.
18
19  - Rule 13.5, side effects on right hand side of logical operator.
20    - Violated because of shift operand is used in macros and functions.
21
22  - Rule 14.4, conditional expression should have essentially Boolean type.
23    - Violated since macros with several instructions are used.
24
25  - Rule 15.5, return statement before end of function.
26    - Violated to simplify code logic.
27
28  - Rule 20.10, '#/##' operators used.
29    - Violated since function-like macros are used to generate more efficient code.
30
31  - Rule 21.1, reserved to the compiler.
32    - Violated since macros with leading underscores are used.