CMSIS-Core (Cortex-A)  
CMSIS-Core support for Cortex-A processor-based devices
 
Loading...
Searching...
No Matches
MISRA-C Deviations

CMSIS-Core (Cortex-A) uses the common coding rules for CMSIS components that are documented in CMSIS Introduction.

CMSIS-Core (Cortex-A) violates the following MISRA-C:2012 rules:

  • Directive 4.9, function-like macro defined.
    • Violated since function-like macros are used to generate more efficient code.
  • Rule 11.4, A conversion should not be performed between a pointer to object and an integer type.
    • Violated because core register access converts between pointer and integer types, including casts from unsigned long to pointers.
  • Rule 11.6, A cast shall not be performed between pointer to void and an arithmetic type.
    • Violated by cache-maintenance code that converts a void pointer to uint32_t to address instruction-cache lines.
  • Rule 13.5, side effects on right hand side of logical operator.
    • Violated because of shift operand is used in macros and functions.
  • Rule 14.4, The controlling expression of an if statement and the controlling expression of an iteration-statement shall have an essentially Boolean type.
    • Violated where register bitmask results are used directly as controlling expressions. A zero result means the tested bits are clear; a nonzero result means at least one tested bit is set. This follows standard C semantics and keeps register checks concise.
  • Rule 15.5, return statement before end of function.
    • Violated to simplify code logic.
  • Rule 20.10, The # and ## preprocessor operators should not be used.
    • Violated since function-like macros concatenate tokens to form field names and stringify operands to build assembler instructions.
  • Rule 21.1, #define and #undef shall not be used on a reserved identifier or reserved macro name.
    • Violated since macros with leading underscores are used.