aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/os/common/startup/ARMCMx/devices/STM32H7xx/cmparams.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/os/common/startup/ARMCMx/devices/STM32H7xx/cmparams.h')
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/devices/STM32H7xx/cmparams.h94
1 files changed, 94 insertions, 0 deletions
diff --git a/lib/chibios/os/common/startup/ARMCMx/devices/STM32H7xx/cmparams.h b/lib/chibios/os/common/startup/ARMCMx/devices/STM32H7xx/cmparams.h
new file mode 100644
index 000000000..cc309271e
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/devices/STM32H7xx/cmparams.h
@@ -0,0 +1,94 @@
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 STM32H7xx/cmparams.h
19 * @brief ARM Cortex-M7 parameters for the STM32F4xx.
20 *
21 * @defgroup ARMCMx_STM32H7xx STM32H7xx Specific Parameters
22 * @ingroup ARMCMx_SPECIFIC
23 * @details This file contains the Cortex-M7 specific parameters for the
24 * STM32H7xx platform.
25 * @{
26 */
27
28#ifndef CMPARAMS_H
29#define CMPARAMS_H
30
31/**
32 * @brief Cortex core model.
33 */
34#define CORTEX_MODEL 7
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(STM32H742xx) && !defined(STM32H750xx) && \
50 !defined(STM32H743xx) && !defined(STM32H753xx) && \
51 !defined(STM32H747xx) && !defined(STM32H757xx) && \
52 !defined(STM32H745xx) && !defined(STM32H755xx) && \
53 !defined(STM32H7B0xx) && !defined(STM32H7B0xxQ) && \
54 !defined(STM32H7A3xx) && !defined(STM32H7A3xxQ) && \
55 !defined(STM32H7B3xx) && !defined(STM32H7B3xxQ)
56#include "board.h"
57#endif
58
59/**
60 * @brief Number of interrupt vectors.
61 * @note This number does not include the 16 system vectors and must be
62 * rounded to a multiple of 8.
63 */
64#define CORTEX_NUM_VECTORS 152
65
66/* The following code is not processed when the file is included from an
67 asm module.*/
68#if !defined(_FROM_ASM_)
69
70/* Including the device CMSIS header. Note, we are not using the definitions
71 from this header because we need this file to be usable also from
72 assembler source files. We verify that the info matches instead.*/
73#include "stm32h7xx.h"
74
75/*lint -save -e9029 [10.4] Signedness comes from external files, it is
76 unpredictable but gives no problems.*/
77#if CORTEX_MODEL != __CORTEX_M
78#error "CMSIS __CORTEX_M mismatch"
79#endif
80
81#if CORTEX_HAS_FPU != __FPU_PRESENT
82#error "CMSIS __FPU_PRESENT mismatch"
83#endif
84
85#if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS
86#error "CMSIS __NVIC_PRIO_BITS mismatch"
87#endif
88/*lint -restore*/
89
90#endif /* !defined(_FROM_ASM_) */
91
92#endif /* CMPARAMS_H */
93
94/** @} */