aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios/os/common/startup/ARMCMx/devices/STM32L4xx/cmparams.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios/os/common/startup/ARMCMx/devices/STM32L4xx/cmparams.h')
-rw-r--r--lib/chibios/os/common/startup/ARMCMx/devices/STM32L4xx/cmparams.h104
1 files changed, 104 insertions, 0 deletions
diff --git a/lib/chibios/os/common/startup/ARMCMx/devices/STM32L4xx/cmparams.h b/lib/chibios/os/common/startup/ARMCMx/devices/STM32L4xx/cmparams.h
new file mode 100644
index 000000000..f226e7f4a
--- /dev/null
+++ b/lib/chibios/os/common/startup/ARMCMx/devices/STM32L4xx/cmparams.h
@@ -0,0 +1,104 @@
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 STM32L4xx/cmparams.h
19 * @brief ARM Cortex-M4 parameters for the STM32L4xx.
20 *
21 * @defgroup ARMCMx_STM32L4xx STM32L4xx Specific Parameters
22 * @ingroup ARMCMx_SPECIFIC
23 * @details This file contains the Cortex-M4 specific parameters for the
24 * STM32L4xx 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(STM32L431xx) && !defined(STM32L432xx) && \
50 !defined(STM32L433xx) && !defined(STM32L442xx) && \
51 !defined(STM32L443xx) && !defined(STM32L451xx) && \
52 !defined(STM32L452xx) && !defined(STM32L462xx) && \
53 !defined(STM32L471xx) && !defined(STM32L475xx) && \
54 !defined(STM32L476xx) && !defined(STM32L485xx) && \
55 !defined(STM32L486xx) && !defined(STM32L496xx) && \
56 !defined(STM32L4A6xx) && \
57 !defined(STM32L4R5xx) && !defined(STM32L4R7xx) && \
58 !defined(STM32L4R9xx) && !defined(STM32L4S5xx) && \
59 !defined(STM32L4S7xx) && !defined(STM32L4S9xx)
60#include "board.h"
61#endif
62
63/**
64 * @brief Number of interrupt vectors.
65 * @note This number does not include the 16 system vectors and must be
66 * rounded to a multiple of 8.
67 */
68#if defined(STM32L496xx) || defined(STM32L4A6xx) || defined(STM32L4R5xx) || \
69 defined(STM32L4R7xx) || defined(STM32L4R9xx) || defined(STM32L4S5xx) || \
70 defined(STM32L4S7xx) || defined(STM32L4S9xx)
71#define CORTEX_NUM_VECTORS 96
72#else
73#define CORTEX_NUM_VECTORS 88
74#endif
75
76/* The following code is not processed when the file is included from an
77 asm module.*/
78#if !defined(_FROM_ASM_)
79
80/* Including the device CMSIS header. Note, we are not using the definitions
81 from this header because we need this file to be usable also from
82 assembler source files. We verify that the info matches instead.*/
83#include "stm32l4xx.h"
84
85/*lint -save -e9029 [10.4] Signedness comes from external files, it is
86 unpredictable but gives no problems.*/
87#if CORTEX_MODEL != __CORTEX_M
88#error "CMSIS __CORTEX_M mismatch"
89#endif
90
91#if CORTEX_HAS_FPU != __FPU_PRESENT
92#error "CMSIS __FPU_PRESENT mismatch"
93#endif
94
95#if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS
96#error "CMSIS __NVIC_PRIO_BITS mismatch"
97#endif
98/*lint -restore*/
99
100#endif /* !defined(_FROM_ASM_) */
101
102#endif /* CMPARAMS_H */
103
104/** @} */