diff options
Diffstat (limited to 'lib/chibios/os/common/startup/ARMCMx/devices/STM32F4xx/cmparams.h')
-rw-r--r-- | lib/chibios/os/common/startup/ARMCMx/devices/STM32F4xx/cmparams.h | 100 |
1 files changed, 100 insertions, 0 deletions
diff --git a/lib/chibios/os/common/startup/ARMCMx/devices/STM32F4xx/cmparams.h b/lib/chibios/os/common/startup/ARMCMx/devices/STM32F4xx/cmparams.h new file mode 100644 index 000000000..1b2f19461 --- /dev/null +++ b/lib/chibios/os/common/startup/ARMCMx/devices/STM32F4xx/cmparams.h | |||
@@ -0,0 +1,100 @@ | |||
1 | /* | ||
2 | ChibiOS - Copyright (C) 2006..2018 Giovanni Di Sirio | ||
3 | |||
4 | Licensed under the Apache License, Version 2.0 (the "License"); | ||
5 | you may not use this file except in compliance with the License. | ||
6 | You may obtain a copy of the License at | ||
7 | |||
8 | http://www.apache.org/licenses/LICENSE-2.0 | ||
9 | |||
10 | Unless required by applicable law or agreed to in writing, software | ||
11 | distributed under the License is distributed on an "AS IS" BASIS, | ||
12 | WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
13 | See the License for the specific language governing permissions and | ||
14 | limitations under the License. | ||
15 | */ | ||
16 | |||
17 | /** | ||
18 | * @file STM32F4xx/cmparams.h | ||
19 | * @brief ARM Cortex-M4 parameters for the STM32F4xx. | ||
20 | * | ||
21 | * @defgroup ARMCMx_STM32F4xx STM32F4xx Specific Parameters | ||
22 | * @ingroup ARMCMx_SPECIFIC | ||
23 | * @details This file contains the Cortex-M4 specific parameters for the | ||
24 | * STM32F4xx platform. | ||
25 | * @{ | ||
26 | */ | ||
27 | |||
28 | #ifndef CMPARAMS_H | ||
29 | #define CMPARAMS_H | ||
30 | |||
31 | /** | ||
32 | * @brief Cortex core model. | ||
33 | */ | ||
34 | #define CORTEX_MODEL 4 | ||
35 | |||
36 | /** | ||
37 | * @brief Floating Point unit presence. | ||
38 | */ | ||
39 | #define CORTEX_HAS_FPU 1 | ||
40 | |||
41 | /** | ||
42 | * @brief Number of bits in priority masks. | ||
43 | */ | ||
44 | #define CORTEX_PRIORITY_BITS 4 | ||
45 | |||
46 | /* If the device type is not externally defined, for example from the Makefile, | ||
47 | then a file named board.h is included. This file must contain a device | ||
48 | definition compatible with the vendor include file.*/ | ||
49 | #if !defined(STM32F405xx) && !defined(STM32F415xx) && \ | ||
50 | !defined(STM32F407xx) && !defined(STM32F417xx) && \ | ||
51 | !defined(STM32F427xx) && !defined(STM32F437xx) && \ | ||
52 | !defined(STM32F429xx) && !defined(STM32F439xx) && \ | ||
53 | !defined(STM32F401xC) && !defined(STM32F401xE) && \ | ||
54 | !defined(STM32F410Cx) && !defined(STM32F410Rx) && \ | ||
55 | !defined(STM32F410Tx) && \ | ||
56 | !defined(STM32F411xE) && \ | ||
57 | !defined(STM32F412Cx) && !defined(STM32F412Rx) && \ | ||
58 | !defined(STM32F412Vx) && !defined(STM32F412Zx) && \ | ||
59 | !defined(STM32F413xx) && \ | ||
60 | !defined(STM32F446xx) && \ | ||
61 | !defined(STM32F469xx) && !defined(STM32F479xx) | ||
62 | #include "board.h" | ||
63 | #endif | ||
64 | |||
65 | /** | ||
66 | * @brief Number of interrupt vectors. | ||
67 | * @note This number does not include the 16 system vectors and must be | ||
68 | * rounded to a multiple of 8. | ||
69 | */ | ||
70 | #define CORTEX_NUM_VECTORS 104 | ||
71 | |||
72 | /* The following code is not processed when the file is included from an | ||
73 | asm module.*/ | ||
74 | #if !defined(_FROM_ASM_) | ||
75 | |||
76 | /* Including the device CMSIS header. Note, we are not using the definitions | ||
77 | from this header because we need this file to be usable also from | ||
78 | assembler source files. We verify that the info matches instead.*/ | ||
79 | #include "stm32f4xx.h" | ||
80 | |||
81 | /*lint -save -e9029 [10.4] Signedness comes from external files, it is | ||
82 | unpredictable but gives no problems.*/ | ||
83 | #if CORTEX_MODEL != __CORTEX_M | ||
84 | #error "CMSIS __CORTEX_M mismatch" | ||
85 | #endif | ||
86 | |||
87 | #if CORTEX_HAS_FPU != __FPU_PRESENT | ||
88 | #error "CMSIS __FPU_PRESENT mismatch" | ||
89 | #endif | ||
90 | |||
91 | #if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS | ||
92 | #error "CMSIS __NVIC_PRIO_BITS mismatch" | ||
93 | #endif | ||
94 | /*lint -restore*/ | ||
95 | |||
96 | #endif /* !defined(_FROM_ASM_) */ | ||
97 | |||
98 | #endif /* CMPARAMS_H */ | ||
99 | |||
100 | /** @} */ | ||