aboutsummaryrefslogtreecommitdiff
path: root/lib/chibios-contrib/os/common/startup/ARMCMx/devices/KL2x/cmparams.h
diff options
context:
space:
mode:
Diffstat (limited to 'lib/chibios-contrib/os/common/startup/ARMCMx/devices/KL2x/cmparams.h')
-rw-r--r--lib/chibios-contrib/os/common/startup/ARMCMx/devices/KL2x/cmparams.h92
1 files changed, 92 insertions, 0 deletions
diff --git a/lib/chibios-contrib/os/common/startup/ARMCMx/devices/KL2x/cmparams.h b/lib/chibios-contrib/os/common/startup/ARMCMx/devices/KL2x/cmparams.h
new file mode 100644
index 000000000..9cb24b981
--- /dev/null
+++ b/lib/chibios-contrib/os/common/startup/ARMCMx/devices/KL2x/cmparams.h
@@ -0,0 +1,92 @@
1/*
2 ChibiOS/RT - Copyright (C) 2006-2014 Giovanni Di Sirio.
3 (C) 2015 RedoX https://github.com/RedoXyde
4 (C) 2016 flabbergast <[email protected]>
5
6 This file is part of ChibiOS.
7
8 ChibiOS is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3 of the License, or
11 (at your option) any later version.
12
13 ChibiOS is distributed in the hope that it will be useful,
14 but WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
16 GNU General Public License for more details.
17
18 You should have received a copy of the GNU General Public License
19 along with this program. If not, see <http://www.gnu.org/licenses/>.
20*/
21
22/**
23 * @file KL2x/cmparams.h
24 * @brief ARM Cortex-M0+ parameters for the Kinetis KL2x family.
25 *
26 * @defgroup ARMCMx_KL2x Kinetis KL2x Specific Parameters
27 * @ingroup ARMCMx_SPECIFIC
28 * @details This file contains the Cortex-M0+ specific parameters for the
29 * Kinetis KL2x platform.
30 * @{
31 */
32
33#ifndef _CMPARAMS_H_
34#define _CMPARAMS_H_
35
36/**
37 * @brief Cortex core model.
38 */
39#define CORTEX_MODEL 0
40
41/**
42 * @brief Systick unit presence.
43 */
44#define CORTEX_HAS_ST TRUE
45
46/**
47 * @brief Floating Point unit presence.
48 */
49#define CORTEX_HAS_FPU FALSE
50
51/**
52 * @brief Number of bits in priority masks.
53 */
54#define CORTEX_PRIORITY_BITS 2
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 32
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/* If the device type is not externally defined, for example from the Makefile,
68 then a file named board.h is included. This file must contain a device
69 definition compatible with the vendor include file.*/
70#if !defined (KL25) && !defined (KL26) && \
71 !defined (KL27Zxxx) && !defined (KL27Zxx)
72#include "board.h"
73#endif
74
75/* Including the device CMSIS header. Note, we are not using the definitions
76 from this header because we need this file to be usable also from
77 assembler source files. We verify that the info matches instead.*/
78#include "kl2xz.h"
79
80#if CORTEX_MODEL != __CORTEX_M
81#error "CMSIS __CORTEX_M mismatch"
82#endif
83
84#if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS
85#error "CMSIS __NVIC_PRIO_BITS mismatch"
86#endif
87
88#endif /* !defined(_FROM_ASM_) */
89
90#endif /* _CMPARAMS_H_ */
91
92/** @} */