diff options
Diffstat (limited to 'lib/chibios/os/common/startup/ARMCMx/devices/STM32G0xx/cmparams.h')
-rw-r--r-- | lib/chibios/os/common/startup/ARMCMx/devices/STM32G0xx/cmparams.h | 85 |
1 files changed, 85 insertions, 0 deletions
diff --git a/lib/chibios/os/common/startup/ARMCMx/devices/STM32G0xx/cmparams.h b/lib/chibios/os/common/startup/ARMCMx/devices/STM32G0xx/cmparams.h new file mode 100644 index 000000000..ba6b1216f --- /dev/null +++ b/lib/chibios/os/common/startup/ARMCMx/devices/STM32G0xx/cmparams.h | |||
@@ -0,0 +1,85 @@ | |||
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 STM32G0xx/cmparams.h | ||
19 | * @brief ARM Cortex-M0 parameters for the STM32G0xx. | ||
20 | * | ||
21 | * @defgroup ARMCMx_STM32G0xx STM32G0xx Specific Parameters | ||
22 | * @ingroup ARMCMx_SPECIFIC | ||
23 | * @details This file contains the Cortex-M0 specific parameters for the | ||
24 | * STM32G0xx platform. | ||
25 | * @{ | ||
26 | */ | ||
27 | |||
28 | #ifndef CMPARAMS_H | ||
29 | #define CMPARAMS_H | ||
30 | |||
31 | /** | ||
32 | * @brief Cortex core model. | ||
33 | */ | ||
34 | #define CORTEX_MODEL 0 | ||
35 | |||
36 | /** | ||
37 | * @brief Floating Point unit presence. | ||
38 | */ | ||
39 | #define CORTEX_HAS_FPU 0 | ||
40 | |||
41 | /** | ||
42 | * @brief Number of bits in priority masks. | ||
43 | */ | ||
44 | #define CORTEX_PRIORITY_BITS 2 | ||
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 (STM32G071xx) && !defined (STM32G081xx) && \ | ||
50 | !defined (STM32G070xx) | ||
51 | #include "board.h" | ||
52 | #endif | ||
53 | |||
54 | /** | ||
55 | * @brief Number of interrupt vectors. | ||
56 | * @note This number does not include the 16 system vectors and must be | ||
57 | * rounded to a multiple of 8. | ||
58 | */ | ||
59 | #define CORTEX_NUM_VECTORS 32 | ||
60 | |||
61 | /* The following code is not processed when the file is included from an | ||
62 | asm module.*/ | ||
63 | #if !defined(_FROM_ASM_) | ||
64 | |||
65 | /* Including the device CMSIS header. Note, we are not using the definitions | ||
66 | from this header because we need this file to be usable also from | ||
67 | assembler source files. We verify that the info matches instead.*/ | ||
68 | #include "stm32g0xx.h" | ||
69 | |||
70 | /*lint -save -e9029 [10.4] Signedness comes from external files, it is | ||
71 | unpredictable but gives no problems.*/ | ||
72 | #if CORTEX_MODEL != __CORTEX_M | ||
73 | #error "CMSIS __CORTEX_M mismatch" | ||
74 | #endif | ||
75 | |||
76 | #if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS | ||
77 | #error "CMSIS __NVIC_PRIO_BITS mismatch" | ||
78 | #endif | ||
79 | /*lint -restore*/ | ||
80 | |||
81 | #endif /* !defined(_FROM_ASM_) */ | ||
82 | |||
83 | #endif /* CMPARAMS_H */ | ||
84 | |||
85 | /** @} */ | ||