From 1474f60da3ac5bf5bc04eddfea7e3d41b1932658 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Sun, 5 Feb 2017 14:10:07 +0000 Subject: MISRA-related fixes. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@10084 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/common/startup/ARMCMx/compilers/GCC/crt1.c | 2 +- os/common/startup/ARMCMx/devices/STM32F0xx/cmparams.h | 3 +++ os/common/startup/ARMCMx/devices/STM32F1xx/cmparams.h | 3 +++ os/common/startup/ARMCMx/devices/STM32F2xx/cmparams.h | 3 +++ os/common/startup/ARMCMx/devices/STM32F3xx/cmparams.h | 3 +++ os/common/startup/ARMCMx/devices/STM32F4xx/cmparams.h | 3 +++ os/common/startup/ARMCMx/devices/STM32F7xx/cmparams.h | 3 +++ os/common/startup/ARMCMx/devices/STM32L0xx/cmparams.h | 3 +++ os/common/startup/ARMCMx/devices/STM32L1xx/cmparams.h | 3 +++ os/common/startup/ARMCMx/devices/STM32L4xx/cmparams.h | 3 +++ 10 files changed, 28 insertions(+), 1 deletion(-) (limited to 'os/common/startup') diff --git a/os/common/startup/ARMCMx/compilers/GCC/crt1.c b/os/common/startup/ARMCMx/compilers/GCC/crt1.c index 1b05f083e..a5a7a0cff 100644 --- a/os/common/startup/ARMCMx/compilers/GCC/crt1.c +++ b/os/common/startup/ARMCMx/compilers/GCC/crt1.c @@ -135,7 +135,7 @@ __attribute__((weak)) /*lint -save -e9075 [8.4] All symbols are invoked from asm context.*/ void __core_init(void) { -#if __CORTEX_M == 7 +#if CORTEX_MODEL == 7 SCB_EnableICache(); SCB_EnableDCache(); #endif diff --git a/os/common/startup/ARMCMx/devices/STM32F0xx/cmparams.h b/os/common/startup/ARMCMx/devices/STM32F0xx/cmparams.h index 1ede485c9..a96e65cb6 100644 --- a/os/common/startup/ARMCMx/devices/STM32F0xx/cmparams.h +++ b/os/common/startup/ARMCMx/devices/STM32F0xx/cmparams.h @@ -71,6 +71,8 @@ assembler source files. We verify that the info matches instead.*/ #include "stm32f0xx.h" +/*lint -save -e9029 [10.4] Signedness comes from external files, it is + unpredictable but gives no problems.*/ #if CORTEX_MODEL != __CORTEX_M #error "CMSIS __CORTEX_M mismatch" #endif @@ -78,6 +80,7 @@ #if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS #error "CMSIS __NVIC_PRIO_BITS mismatch" #endif +/*lint -restore*/ #endif /* !defined(_FROM_ASM_) */ diff --git a/os/common/startup/ARMCMx/devices/STM32F1xx/cmparams.h b/os/common/startup/ARMCMx/devices/STM32F1xx/cmparams.h index b54f872f5..9f934fc1e 100644 --- a/os/common/startup/ARMCMx/devices/STM32F1xx/cmparams.h +++ b/os/common/startup/ARMCMx/devices/STM32F1xx/cmparams.h @@ -72,6 +72,8 @@ assembler source files. We verify that the info matches instead.*/ #include "stm32f1xx.h" +/*lint -save -e9029 [10.4] Signedness comes from external files, it is + unpredictable but gives no problems.*/ #if CORTEX_MODEL != __CORTEX_M #error "CMSIS __CORTEX_M mismatch" #endif @@ -79,6 +81,7 @@ #if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS #error "CMSIS __NVIC_PRIO_BITS mismatch" #endif +/*lint -restore*/ #endif /* !defined(_FROM_ASM_) */ diff --git a/os/common/startup/ARMCMx/devices/STM32F2xx/cmparams.h b/os/common/startup/ARMCMx/devices/STM32F2xx/cmparams.h index 4c92a3364..4685aa99d 100644 --- a/os/common/startup/ARMCMx/devices/STM32F2xx/cmparams.h +++ b/os/common/startup/ARMCMx/devices/STM32F2xx/cmparams.h @@ -66,6 +66,8 @@ assembler source files. We verify that the info matches instead.*/ #include "stm32f2xx.h" +/*lint -save -e9029 [10.4] Signedness comes from external files, it is + unpredictable but gives no problems.*/ #if CORTEX_MODEL != __CORTEX_M #error "CMSIS __CORTEX_M mismatch" #endif @@ -73,6 +75,7 @@ #if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS #error "CMSIS __NVIC_PRIO_BITS mismatch" #endif +/*lint -restore*/ #endif /* !defined(_FROM_ASM_) */ diff --git a/os/common/startup/ARMCMx/devices/STM32F3xx/cmparams.h b/os/common/startup/ARMCMx/devices/STM32F3xx/cmparams.h index 0064a5c63..3a96c655a 100644 --- a/os/common/startup/ARMCMx/devices/STM32F3xx/cmparams.h +++ b/os/common/startup/ARMCMx/devices/STM32F3xx/cmparams.h @@ -71,6 +71,8 @@ assembler source files. We verify that the info matches instead.*/ #include "stm32f3xx.h" +/*lint -save -e9029 [10.4] Signedness comes from external files, it is + unpredictable but gives no problems.*/ #if CORTEX_MODEL != __CORTEX_M #error "CMSIS __CORTEX_M mismatch" #endif @@ -82,6 +84,7 @@ #if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS #error "CMSIS __NVIC_PRIO_BITS mismatch" #endif +/*lint -restore*/ #endif /* !defined(_FROM_ASM_) */ diff --git a/os/common/startup/ARMCMx/devices/STM32F4xx/cmparams.h b/os/common/startup/ARMCMx/devices/STM32F4xx/cmparams.h index a0b785af0..bbe6e0312 100644 --- a/os/common/startup/ARMCMx/devices/STM32F4xx/cmparams.h +++ b/os/common/startup/ARMCMx/devices/STM32F4xx/cmparams.h @@ -73,6 +73,8 @@ assembler source files. We verify that the info matches instead.*/ #include "stm32f4xx.h" +/*lint -save -e9029 [10.4] Signedness comes from external files, it is + unpredictable but gives no problems.*/ #if CORTEX_MODEL != __CORTEX_M #error "CMSIS __CORTEX_M mismatch" #endif @@ -84,6 +86,7 @@ #if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS #error "CMSIS __NVIC_PRIO_BITS mismatch" #endif +/*lint -restore*/ #endif /* !defined(_FROM_ASM_) */ diff --git a/os/common/startup/ARMCMx/devices/STM32F7xx/cmparams.h b/os/common/startup/ARMCMx/devices/STM32F7xx/cmparams.h index 8fc73be10..e0bc65466 100644 --- a/os/common/startup/ARMCMx/devices/STM32F7xx/cmparams.h +++ b/os/common/startup/ARMCMx/devices/STM32F7xx/cmparams.h @@ -66,6 +66,8 @@ assembler source files. We verify that the info matches instead.*/ #include "stm32f7xx.h" +/*lint -save -e9029 [10.4] Signedness comes from external files, it is + unpredictable but gives no problems.*/ #if CORTEX_MODEL != __CORTEX_M #error "CMSIS __CORTEX_M mismatch" #endif @@ -77,6 +79,7 @@ #if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS #error "CMSIS __NVIC_PRIO_BITS mismatch" #endif +/*lint -restore*/ #endif /* !defined(_FROM_ASM_) */ diff --git a/os/common/startup/ARMCMx/devices/STM32L0xx/cmparams.h b/os/common/startup/ARMCMx/devices/STM32L0xx/cmparams.h index 86a675022..ac1d2a421 100644 --- a/os/common/startup/ARMCMx/devices/STM32L0xx/cmparams.h +++ b/os/common/startup/ARMCMx/devices/STM32L0xx/cmparams.h @@ -70,6 +70,8 @@ assembler source files. We verify that the info matches instead.*/ #include "stm32l0xx.h" +/*lint -save -e9029 [10.4] Signedness comes from external files, it is + unpredictable but gives no problems.*/ #if CORTEX_MODEL != __CORTEX_M #error "CMSIS __CORTEX_M mismatch" #endif @@ -77,6 +79,7 @@ #if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS #error "CMSIS __NVIC_PRIO_BITS mismatch" #endif +/*lint -restore*/ #endif /* !defined(_FROM_ASM_) */ diff --git a/os/common/startup/ARMCMx/devices/STM32L1xx/cmparams.h b/os/common/startup/ARMCMx/devices/STM32L1xx/cmparams.h index 099ec7636..706408ef7 100644 --- a/os/common/startup/ARMCMx/devices/STM32L1xx/cmparams.h +++ b/os/common/startup/ARMCMx/devices/STM32L1xx/cmparams.h @@ -76,6 +76,8 @@ assembler source files. We verify that the info matches instead.*/ #include "stm32l1xx.h" +/*lint -save -e9029 [10.4] Signedness comes from external files, it is + unpredictable but gives no problems.*/ #if CORTEX_MODEL != __CORTEX_M #error "CMSIS __CORTEX_M mismatch" #endif @@ -83,6 +85,7 @@ #if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS #error "CMSIS __NVIC_PRIO_BITS mismatch" #endif +/*lint -restore*/ /* Fix for yet another consistency error in ST headers.*/ #define SVCall_IRQn SVC_IRQn diff --git a/os/common/startup/ARMCMx/devices/STM32L4xx/cmparams.h b/os/common/startup/ARMCMx/devices/STM32L4xx/cmparams.h index d12aa8e53..95a4f5f7e 100644 --- a/os/common/startup/ARMCMx/devices/STM32L4xx/cmparams.h +++ b/os/common/startup/ARMCMx/devices/STM32L4xx/cmparams.h @@ -68,6 +68,8 @@ assembler source files. We verify that the info matches instead.*/ #include "stm32l4xx.h" +/*lint -save -e9029 [10.4] Signedness comes from external files, it is + unpredictable but gives no problems.*/ #if CORTEX_MODEL != __CORTEX_M #error "CMSIS __CORTEX_M mismatch" #endif @@ -79,6 +81,7 @@ #if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS #error "CMSIS __NVIC_PRIO_BITS mismatch" #endif +/*lint -restore*/ #endif /* !defined(_FROM_ASM_) */ -- cgit v1.2.3