aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/os/common/startup/ARMCMx/devices/STM32G4xx/cmparams.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/os/common/startup/ARMCMx/devices/STM32G4xx/cmparams.h')
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/devices/STM32G4xx/cmparams.h91
1 files changed, 91 insertions, 0 deletions
diff --git a/lib/chibios/os/common/startup/ARMCMx/devices/STM32G4xx/cmparams.h b/lib/chibios/os/common/startup/ARMCMx/devices/STM32G4xx/cmparams.h
new file mode 100644
index 000000000..f8c9bc61a
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/devices/STM32G4xx/cmparams.h
@@ -0,0 +1,91 @@
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 STM32G4xx/cmparams.h
19 * @brief ARM Cortex-M4 parameters for the STM32G4xx.
20 *
21 * @defgroup ARMCMx_STM32FGxx STM32FGxx Specific Parameters
22 * @ingroup ARMCMx_SPECIFIC
23 * @details This file contains the Cortex-M4 specific parameters for the
24 * STM32G4xx 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(STM32G431xx) && !defined(STM32G441xx) && \
50 !defined(STM32G471xx) && !defined(STM32G473xx) && \
51 !defined(STM32G474xx) && !defined(STM32G483xx) && \
52 !defined(STM32G484xx) && !defined(STM32GBK1CB)
53#include "board.h"
54#endif
55
56/**
57 * @brief Number of interrupt vectors.
58 * @note This number does not include the 16 system vectors and must be
59 * rounded to a multiple of 8.
60 */
61#define CORTEX_NUM_VECTORS 104
62
63/* The following code is not processed when the file is included from an
64 asm module.*/
65#if !defined(_FROM_ASM_)
66
67/* Including the device CMSIS header. Note, we are not using the definitions
68 from this header because we need this file to be usable also from
69 assembler source files. We verify that the info matches instead.*/
70#include "stm32g4xx.h"
71
72/*lint -save -e9029 [10.4] Signedness comes from external files, it is
73 unpredictable but gives no problems.*/
74#if CORTEX_MODEL != __CORTEX_M
75#error "CMSIS __CORTEX_M mismatch"
76#endif
77
78#if CORTEX_HAS_FPU != __FPU_PRESENT
79#error "CMSIS __FPU_PRESENT mismatch"
80#endif
81
82#if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS
83#error "CMSIS __NVIC_PRIO_BITS mismatch"
84#endif
85/*lint -restore*/
86
87#endif /* !defined(_FROM_ASM_) */
88
89#endif /* CMPARAMS_H */
90
91/** @} */