diff options
Diffstat (limited to 'lib/chibios/os/common/startup/ARMCMx/devices')
14 files changed, 1285 insertions, 0 deletions
diff --git a/lib/chibios/os/common/startup/ARMCMx/devices/ADUCM36x/cmparams.h b/lib/chibios/os/common/startup/ARMCMx/devices/ADUCM36x/cmparams.h new file mode 100644 index 000000000..6afb4a3f0 --- /dev/null +++ b/lib/chibios/os/common/startup/ARMCMx/devices/ADUCM36x/cmparams.h | |||
@@ -0,0 +1,84 @@ | |||
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 STM32F2xx/cmparams.h | ||
19 | * @brief ARM Cortex-M3 parameters for the STM32F2xx. | ||
20 | * | ||
21 | * @defgroup ARMCMx_STM32F2xx STM32F2xx Specific Parameters | ||
22 | * @ingroup ARMCMx_SPECIFIC | ||
23 | * @details This file contains the Cortex-M3 specific parameters for the | ||
24 | * STM32F2xx platform. | ||
25 | * @{ | ||
26 | */ | ||
27 | |||
28 | #ifndef CMPARAMS_H | ||
29 | #define CMPARAMS_H | ||
30 | |||
31 | /** | ||
32 | * @brief Cortex core model. | ||
33 | */ | ||
34 | #define CORTEX_MODEL 3 | ||
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 3 | ||
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(ADUCM36X) | ||
50 | #include "board.h" | ||
51 | #endif | ||
52 | |||
53 | /** | ||
54 | * @brief Number of interrupt vectors. | ||
55 | * @note This number does not include the 16 system vectors and must be | ||
56 | * rounded to a multiple of 8. | ||
57 | */ | ||
58 | #define CORTEX_NUM_VECTORS 40 | ||
59 | |||
60 | /* The following code is not processed when the file is included from an | ||
61 | asm module.*/ | ||
62 | #if !defined(_FROM_ASM_) | ||
63 | |||
64 | /* Including the device CMSIS header. Note, we are not using the definitions | ||
65 | from this header because we need this file to be usable also from | ||
66 | assembler source files. We verify that the info matches instead.*/ | ||
67 | #include "ADuCM36x.h" | ||
68 | |||
69 | /*lint -save -e9029 [10.4] Signedness comes from external files, it is | ||
70 | unpredictable but gives no problems.*/ | ||
71 | #if CORTEX_MODEL != __CORTEX_M | ||
72 | #error "CMSIS __CORTEX_M mismatch" | ||
73 | #endif | ||
74 | |||
75 | #if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS | ||
76 | #error "CMSIS __NVIC_PRIO_BITS mismatch" | ||
77 | #endif | ||
78 | /*lint -restore*/ | ||
79 | |||
80 | #endif /* !defined(_FROM_ASM_) */ | ||
81 | |||
82 | #endif /* CMPARAMS_H */ | ||
83 | |||
84 | /** @} */ | ||
diff --git a/lib/chibios/os/common/startup/ARMCMx/devices/ADUCM41x/cmparams.h b/lib/chibios/os/common/startup/ARMCMx/devices/ADUCM41x/cmparams.h new file mode 100644 index 000000000..ff7b1856e --- /dev/null +++ b/lib/chibios/os/common/startup/ARMCMx/devices/ADUCM41x/cmparams.h | |||
@@ -0,0 +1,89 @@ | |||
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 ADUCM41x/cmparams.h | ||
19 | * @brief ARM Cortex-M4 parameters for the ADUCM41x. | ||
20 | * | ||
21 | * @defgroup ARMCMx_ADUCM41x ADUCM41x Specific Parameters | ||
22 | * @ingroup ARMCMx_SPECIFIC | ||
23 | * @details This file contains the Cortex-M33 specific parameters for the | ||
24 | * ADUCM41x platform. | ||
25 | * @{ | ||
26 | */ | ||
27 | |||
28 | #ifndef CMPARAMS_H | ||
29 | #define CMPARAMS_H | ||
30 | |||
31 | /** | ||
32 | * @brief Cortex core model. | ||
33 | * @todo Switch to M33 when port is done. | ||
34 | */ | ||
35 | #define CORTEX_MODEL 4 | ||
36 | |||
37 | /** | ||
38 | * @brief Floating Point unit presence. | ||
39 | */ | ||
40 | #define CORTEX_HAS_FPU 1 | ||
41 | |||
42 | /** | ||
43 | * @brief Number of bits in priority masks. | ||
44 | */ | ||
45 | #define CORTEX_PRIORITY_BITS 3 | ||
46 | |||
47 | /* If the device type is not externally defined, for example from the Makefile, | ||
48 | then a file named board.h is included. This file must contain a device | ||
49 | definition compatible with the vendor include file.*/ | ||
50 | #if !defined(ADUCM41X) | ||
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 80 | ||
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 "aducm41x.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_HAS_FPU != __FPU_PRESENT | ||
77 | #error "CMSIS __FPU_PRESENT mismatch" | ||
78 | #endif | ||
79 | |||
80 | #if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS | ||
81 | #error "CMSIS __NVIC_PRIO_BITS mismatch" | ||
82 | #endif | ||
83 | /*lint -restore*/ | ||
84 | |||
85 | #endif /* !defined(_FROM_ASM_) */ | ||
86 | |||
87 | #endif /* CMPARAMS_H */ | ||
88 | |||
89 | /** @} */ | ||
diff --git a/lib/chibios/os/common/startup/ARMCMx/devices/STM32F0xx/cmparams.h b/lib/chibios/os/common/startup/ARMCMx/devices/STM32F0xx/cmparams.h new file mode 100644 index 000000000..f717d0207 --- /dev/null +++ b/lib/chibios/os/common/startup/ARMCMx/devices/STM32F0xx/cmparams.h | |||
@@ -0,0 +1,93 @@ | |||
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 STM32F0xx/cmparams.h | ||
19 | * @brief ARM Cortex-M0 parameters for the STM32F0xx. | ||
20 | * | ||
21 | * @defgroup ARMCMx_STM32F0xx STM32F0xx Specific Parameters | ||
22 | * @ingroup ARMCMx_SPECIFIC | ||
23 | * @details This file contains the Cortex-M0 specific parameters for the | ||
24 | * STM32F0xx 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 (STM32F030x4) && !defined (STM32F030x6) && \ | ||
50 | !defined (STM32F030x8) && !defined (STM32F030xC) && \ | ||
51 | !defined (STM32F070x6) && !defined (STM32F070xB) && \ | ||
52 | !defined (STM32F031x6) && !defined (STM32F051x8) && \ | ||
53 | !defined (STM32F071xB) && !defined (STM32F091xC) && \ | ||
54 | !defined (STM32F042x6) && !defined (STM32F072xB) && \ | ||
55 | !defined (STM32F038xx) && !defined (STM32F048xx) && \ | ||
56 | !defined (STM32F058xx) && !defined (STM32F078xx) && \ | ||
57 | !defined (STM32F098xx) \ | ||
58 | |||
59 | #include "board.h" | ||
60 | #endif | ||
61 | |||
62 | /** | ||
63 | * @brief Number of interrupt vectors. | ||
64 | * @note This number does not include the 16 system vectors and must be | ||
65 | * rounded to a multiple of 8. | ||
66 | */ | ||
67 | #define CORTEX_NUM_VECTORS 32 | ||
68 | |||
69 | /* The following code is not processed when the file is included from an | ||
70 | asm module.*/ | ||
71 | #if !defined(_FROM_ASM_) | ||
72 | |||
73 | /* Including the device CMSIS header. Note, we are not using the definitions | ||
74 | from this header because we need this file to be usable also from | ||
75 | assembler source files. We verify that the info matches instead.*/ | ||
76 | #include "stm32f0xx.h" | ||
77 | |||
78 | /*lint -save -e9029 [10.4] Signedness comes from external files, it is | ||
79 | unpredictable but gives no problems.*/ | ||
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 | /*lint -restore*/ | ||
88 | |||
89 | #endif /* !defined(_FROM_ASM_) */ | ||
90 | |||
91 | #endif /* CMPARAMS_H */ | ||
92 | |||
93 | /** @} */ | ||
diff --git a/lib/chibios/os/common/startup/ARMCMx/devices/STM32F1xx/cmparams.h b/lib/chibios/os/common/startup/ARMCMx/devices/STM32F1xx/cmparams.h new file mode 100644 index 000000000..0576bc335 --- /dev/null +++ b/lib/chibios/os/common/startup/ARMCMx/devices/STM32F1xx/cmparams.h | |||
@@ -0,0 +1,90 @@ | |||
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 STM32F1xx/cmparams.h | ||
19 | * @brief ARM Cortex-M3 parameters for the STM32F1xx. | ||
20 | * | ||
21 | * @defgroup ARMCMx_STM32F1xx STM32F1xx Specific Parameters | ||
22 | * @ingroup ARMCMx_SPECIFIC | ||
23 | * @details This file contains the Cortex-M4 specific parameters for the | ||
24 | * STM32F1xx platform. | ||
25 | * @{ | ||
26 | */ | ||
27 | |||
28 | #ifndef CMPARAMS_H | ||
29 | #define CMPARAMS_H | ||
30 | |||
31 | /** | ||
32 | * @brief Cortex core model. | ||
33 | */ | ||
34 | #define CORTEX_MODEL 3 | ||
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 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(STM32F100xB) && !defined(STM32F100xE) && \ | ||
50 | !defined(STM32F101x6) && !defined(STM32F101xB) && \ | ||
51 | !defined(STM32F101xE) && !defined(STM32F101xG) && \ | ||
52 | !defined(STM32F102x6) && !defined(STM32F102xB) && \ | ||
53 | !defined(STM32F103x6) && !defined(STM32F103xB) && \ | ||
54 | !defined(STM32F103xE) && !defined(STM32F103xG) && \ | ||
55 | !defined(STM32F105xC) && !defined(STM32F107xC) | ||
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 72 | ||
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 "stm32f1xx.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_PRIORITY_BITS != __NVIC_PRIO_BITS | ||
82 | #error "CMSIS __NVIC_PRIO_BITS mismatch" | ||
83 | #endif | ||
84 | /*lint -restore*/ | ||
85 | |||
86 | #endif /* !defined(_FROM_ASM_) */ | ||
87 | |||
88 | #endif /* CMPARAMS_H */ | ||
89 | |||
90 | /** @} */ | ||
diff --git a/lib/chibios/os/common/startup/ARMCMx/devices/STM32F2xx/cmparams.h b/lib/chibios/os/common/startup/ARMCMx/devices/STM32F2xx/cmparams.h new file mode 100644 index 000000000..74c420a4d --- /dev/null +++ b/lib/chibios/os/common/startup/ARMCMx/devices/STM32F2xx/cmparams.h | |||
@@ -0,0 +1,84 @@ | |||
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 STM32F2xx/cmparams.h | ||
19 | * @brief ARM Cortex-M3 parameters for the STM32F2xx. | ||
20 | * | ||
21 | * @defgroup ARMCMx_STM32F2xx STM32F2xx Specific Parameters | ||
22 | * @ingroup ARMCMx_SPECIFIC | ||
23 | * @details This file contains the Cortex-M3 specific parameters for the | ||
24 | * STM32F2xx platform. | ||
25 | * @{ | ||
26 | */ | ||
27 | |||
28 | #ifndef CMPARAMS_H | ||
29 | #define CMPARAMS_H | ||
30 | |||
31 | /** | ||
32 | * @brief Cortex core model. | ||
33 | */ | ||
34 | #define CORTEX_MODEL 3 | ||
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 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(STM32F2XX) | ||
50 | #include "board.h" | ||
51 | #endif | ||
52 | |||
53 | /** | ||
54 | * @brief Number of interrupt vectors. | ||
55 | * @note This number does not include the 16 system vectors and must be | ||
56 | * rounded to a multiple of 8. | ||
57 | */ | ||
58 | #define CORTEX_NUM_VECTORS 96 | ||
59 | |||
60 | /* The following code is not processed when the file is included from an | ||
61 | asm module.*/ | ||
62 | #if !defined(_FROM_ASM_) | ||
63 | |||
64 | /* Including the device CMSIS header. Note, we are not using the definitions | ||
65 | from this header because we need this file to be usable also from | ||
66 | assembler source files. We verify that the info matches instead.*/ | ||
67 | #include "stm32f2xx.h" | ||
68 | |||
69 | /*lint -save -e9029 [10.4] Signedness comes from external files, it is | ||
70 | unpredictable but gives no problems.*/ | ||
71 | #if CORTEX_MODEL != __CORTEX_M | ||
72 | #error "CMSIS __CORTEX_M mismatch" | ||
73 | #endif | ||
74 | |||
75 | #if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS | ||
76 | #error "CMSIS __NVIC_PRIO_BITS mismatch" | ||
77 | #endif | ||
78 | /*lint -restore*/ | ||
79 | |||
80 | #endif /* !defined(_FROM_ASM_) */ | ||
81 | |||
82 | #endif /* CMPARAMS_H */ | ||
83 | |||
84 | /** @} */ | ||
diff --git a/lib/chibios/os/common/startup/ARMCMx/devices/STM32F3xx/cmparams.h b/lib/chibios/os/common/startup/ARMCMx/devices/STM32F3xx/cmparams.h new file mode 100644 index 000000000..73fae46b5 --- /dev/null +++ b/lib/chibios/os/common/startup/ARMCMx/devices/STM32F3xx/cmparams.h | |||
@@ -0,0 +1,93 @@ | |||
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 STM32F3xx/cmparams.h | ||
19 | * @brief ARM Cortex-M4 parameters for the STM32F3xx. | ||
20 | * | ||
21 | * @defgroup ARMCMx_STM32F3xx STM32F3xx Specific Parameters | ||
22 | * @ingroup ARMCMx_SPECIFIC | ||
23 | * @details This file contains the Cortex-M4 specific parameters for the | ||
24 | * STM32F3xx 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 (STM32F301x8) && !defined (STM32F318xx) && \ | ||
50 | !defined (STM32F302x8) && !defined (STM32F302xC) && \ | ||
51 | !defined (STM32F303x8) && !defined (STM32F303xC) && \ | ||
52 | !defined (STM32F358xx) && !defined (STM32F334x8) && \ | ||
53 | !defined (STM32F328xx) && \ | ||
54 | !defined (STM32F373xC) && !defined (STM32F378xx) | ||
55 | #include "board.h" | ||
56 | #endif | ||
57 | |||
58 | /** | ||
59 | * @brief Number of interrupt vectors. | ||
60 | * @note This number does not include the 16 system vectors and must be | ||
61 | * rounded to a multiple of 8. | ||
62 | */ | ||
63 | #define CORTEX_NUM_VECTORS 88 | ||
64 | |||
65 | /* The following code is not processed when the file is included from an | ||
66 | asm module.*/ | ||
67 | #if !defined(_FROM_ASM_) | ||
68 | |||
69 | /* Including the device CMSIS header. Note, we are not using the definitions | ||
70 | from this header because we need this file to be usable also from | ||
71 | assembler source files. We verify that the info matches instead.*/ | ||
72 | #include "stm32f3xx.h" | ||
73 | |||
74 | /*lint -save -e9029 [10.4] Signedness comes from external files, it is | ||
75 | unpredictable but gives no problems.*/ | ||
76 | #if CORTEX_MODEL != __CORTEX_M | ||
77 | #error "CMSIS __CORTEX_M mismatch" | ||
78 | #endif | ||
79 | |||
80 | #if CORTEX_HAS_FPU != __FPU_PRESENT | ||
81 | #error "CMSIS __FPU_PRESENT mismatch" | ||
82 | #endif | ||
83 | |||
84 | #if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS | ||
85 | #error "CMSIS __NVIC_PRIO_BITS mismatch" | ||
86 | #endif | ||
87 | /*lint -restore*/ | ||
88 | |||
89 | #endif /* !defined(_FROM_ASM_) */ | ||
90 | |||
91 | #endif /* CMPARAMS_H */ | ||
92 | |||
93 | /** @} */ | ||
diff --git a/lib/chibios/os/common/startup/ARMCMx/devices/STM32F4xx/cmparams.h b/lib/chibios/os/common/startup/ARMCMx/devices/STM32F4xx/cmparams.h new file mode 100644 index 000000000..1b2f19461 --- /dev/null +++ b/lib/chibios/os/common/startup/ARMCMx/devices/STM32F4xx/cmparams.h | |||
@@ -0,0 +1,100 @@ | |||
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 STM32F4xx/cmparams.h | ||
19 | * @brief ARM Cortex-M4 parameters for the STM32F4xx. | ||
20 | * | ||
21 | * @defgroup ARMCMx_STM32F4xx STM32F4xx Specific Parameters | ||
22 | * @ingroup ARMCMx_SPECIFIC | ||
23 | * @details This file contains the Cortex-M4 specific parameters for the | ||
24 | * STM32F4xx 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(STM32F405xx) && !defined(STM32F415xx) && \ | ||
50 | !defined(STM32F407xx) && !defined(STM32F417xx) && \ | ||
51 | !defined(STM32F427xx) && !defined(STM32F437xx) && \ | ||
52 | !defined(STM32F429xx) && !defined(STM32F439xx) && \ | ||
53 | !defined(STM32F401xC) && !defined(STM32F401xE) && \ | ||
54 | !defined(STM32F410Cx) && !defined(STM32F410Rx) && \ | ||
55 | !defined(STM32F410Tx) && \ | ||
56 | !defined(STM32F411xE) && \ | ||
57 | !defined(STM32F412Cx) && !defined(STM32F412Rx) && \ | ||
58 | !defined(STM32F412Vx) && !defined(STM32F412Zx) && \ | ||
59 | !defined(STM32F413xx) && \ | ||
60 | !defined(STM32F446xx) && \ | ||
61 | !defined(STM32F469xx) && !defined(STM32F479xx) | ||
62 | #include "board.h" | ||
63 | #endif | ||
64 | |||
65 | /** | ||
66 | * @brief Number of interrupt vectors. | ||
67 | * @note This number does not include the 16 system vectors and must be | ||
68 | * rounded to a multiple of 8. | ||
69 | */ | ||
70 | #define CORTEX_NUM_VECTORS 104 | ||
71 | |||
72 | /* The following code is not processed when the file is included from an | ||
73 | asm module.*/ | ||
74 | #if !defined(_FROM_ASM_) | ||
75 | |||
76 | /* Including the device CMSIS header. Note, we are not using the definitions | ||
77 | from this header because we need this file to be usable also from | ||
78 | assembler source files. We verify that the info matches instead.*/ | ||
79 | #include "stm32f4xx.h" | ||
80 | |||
81 | /*lint -save -e9029 [10.4] Signedness comes from external files, it is | ||
82 | unpredictable but gives no problems.*/ | ||
83 | #if CORTEX_MODEL != __CORTEX_M | ||
84 | #error "CMSIS __CORTEX_M mismatch" | ||
85 | #endif | ||
86 | |||
87 | #if CORTEX_HAS_FPU != __FPU_PRESENT | ||
88 | #error "CMSIS __FPU_PRESENT mismatch" | ||
89 | #endif | ||
90 | |||
91 | #if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS | ||
92 | #error "CMSIS __NVIC_PRIO_BITS mismatch" | ||
93 | #endif | ||
94 | /*lint -restore*/ | ||
95 | |||
96 | #endif /* !defined(_FROM_ASM_) */ | ||
97 | |||
98 | #endif /* CMPARAMS_H */ | ||
99 | |||
100 | /** @} */ | ||
diff --git a/lib/chibios/os/common/startup/ARMCMx/devices/STM32F7xx/cmparams.h b/lib/chibios/os/common/startup/ARMCMx/devices/STM32F7xx/cmparams.h new file mode 100644 index 000000000..b23d6101d --- /dev/null +++ b/lib/chibios/os/common/startup/ARMCMx/devices/STM32F7xx/cmparams.h | |||
@@ -0,0 +1,93 @@ | |||
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 STM32F7xx/cmparams.h | ||
19 | * @brief ARM Cortex-M7 parameters for the STM32F4xx. | ||
20 | * | ||
21 | * @defgroup ARMCMx_STM32F7xx STM32F7xx Specific Parameters | ||
22 | * @ingroup ARMCMx_SPECIFIC | ||
23 | * @details This file contains the Cortex-M7 specific parameters for the | ||
24 | * STM32F7xx 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(STM32F722xx) && !defined(STM32F723xx) && \ | ||
50 | !defined(STM32F732xx) && !defined(STM32F733xx) && \ | ||
51 | !defined(STM32F745xx) && !defined(STM32F746xx) && \ | ||
52 | !defined(STM32F756xx) && !defined(STM32F765xx) && \ | ||
53 | !defined(STM32F767xx) && !defined(STM32F769xx) && \ | ||
54 | !defined(STM32F777xx) && !defined(STM32F779xx) | ||
55 | #include "board.h" | ||
56 | #endif | ||
57 | |||
58 | /** | ||
59 | * @brief Number of interrupt vectors. | ||
60 | * @note This number does not include the 16 system vectors and must be | ||
61 | * rounded to a multiple of 8. | ||
62 | */ | ||
63 | #define CORTEX_NUM_VECTORS 112 | ||
64 | |||
65 | /* The following code is not processed when the file is included from an | ||
66 | asm module.*/ | ||
67 | #if !defined(_FROM_ASM_) | ||
68 | |||
69 | /* Including the device CMSIS header. Note, we are not using the definitions | ||
70 | from this header because we need this file to be usable also from | ||
71 | assembler source files. We verify that the info matches instead.*/ | ||
72 | #include "stm32f7xx.h" | ||
73 | |||
74 | /*lint -save -e9029 [10.4] Signedness comes from external files, it is | ||
75 | unpredictable but gives no problems.*/ | ||
76 | #if CORTEX_MODEL != __CORTEX_M | ||
77 | #error "CMSIS __CORTEX_M mismatch" | ||
78 | #endif | ||
79 | |||
80 | #if CORTEX_HAS_FPU != __FPU_PRESENT | ||
81 | #error "CMSIS __FPU_PRESENT mismatch" | ||
82 | #endif | ||
83 | |||
84 | #if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS | ||
85 | #error "CMSIS __NVIC_PRIO_BITS mismatch" | ||
86 | #endif | ||
87 | /*lint -restore*/ | ||
88 | |||
89 | #endif /* !defined(_FROM_ASM_) */ | ||
90 | |||
91 | #endif /* CMPARAMS_H */ | ||
92 | |||
93 | /** @} */ | ||
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 | /** @} */ | ||
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 | /** @} */ | ||
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 | /** @} */ | ||
diff --git a/lib/chibios/os/common/startup/ARMCMx/devices/STM32L0xx/cmparams.h b/lib/chibios/os/common/startup/ARMCMx/devices/STM32L0xx/cmparams.h new file mode 100644 index 000000000..c729d30ae --- /dev/null +++ b/lib/chibios/os/common/startup/ARMCMx/devices/STM32L0xx/cmparams.h | |||
@@ -0,0 +1,88 @@ | |||
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 STM32L0xx/cmparams.h | ||
19 | * @brief ARM Cortex-M0+ parameters for the STM32L0xx. | ||
20 | * | ||
21 | * @defgroup ARMCMx_STM32L0xx STM32L0xx Specific Parameters | ||
22 | * @ingroup ARMCMx_SPECIFIC | ||
23 | * @details This file contains the Cortex-M0 specific parameters for the | ||
24 | * STM32L0xx 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(STM32L011xx) && !defined(STM32L031xx) && \ | ||
50 | !defined(STM32L051xx) && !defined(STM32L052xx) && \ | ||
51 | !defined(STM32L053xx) && !defined(STM32L061xx) && \ | ||
52 | !defined(STM32L062xx) && !defined(STM32L063xx) && \ | ||
53 | !defined(STM32L073xx) | ||
54 | #include "board.h" | ||
55 | #endif | ||
56 | |||
57 | /** | ||
58 | * @brief Number of interrupt vectors. | ||
59 | * @note This number does not include the 16 system vectors and must be | ||
60 | * rounded to a multiple of 8. | ||
61 | */ | ||
62 | #define CORTEX_NUM_VECTORS 32 | ||
63 | |||
64 | /* The following code is not processed when the file is included from an | ||
65 | asm module.*/ | ||
66 | #if !defined(_FROM_ASM_) | ||
67 | |||
68 | /* Including the device CMSIS header. Note, we are not using the definitions | ||
69 | from this header because we need this file to be usable also from | ||
70 | assembler source files. We verify that the info matches instead.*/ | ||
71 | #include "stm32l0xx.h" | ||
72 | |||
73 | /*lint -save -e9029 [10.4] Signedness comes from external files, it is | ||
74 | unpredictable but gives no problems.*/ | ||
75 | #if CORTEX_MODEL != __CORTEX_M | ||
76 | #error "CMSIS __CORTEX_M mismatch" | ||
77 | #endif | ||
78 | |||
79 | #if CORTEX_PRIORITY_BITS != __NVIC_PRIO_BITS | ||
80 | #error "CMSIS __NVIC_PRIO_BITS mismatch" | ||
81 | #endif | ||
82 | /*lint -restore*/ | ||
83 | |||
84 | #endif /* !defined(_FROM_ASM_) */ | ||
85 | |||
86 | #endif /* CMPARAMS_H */ | ||
87 | |||
88 | /** @} */ | ||
diff --git a/lib/chibios/os/common/startup/ARMCMx/devices/STM32L1xx/cmparams.h b/lib/chibios/os/common/startup/ARMCMx/devices/STM32L1xx/cmparams.h new file mode 100644 index 000000000..201bd7f5d --- /dev/null +++ b/lib/chibios/os/common/startup/ARMCMx/devices/STM32L1xx/cmparams.h | |||
@@ -0,0 +1,97 @@ | |||
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 STM32L1xx/cmparams.h | ||
19 | * @brief ARM Cortex-M3 parameters for the STM32L1xx. | ||
20 | * | ||
21 | * @defgroup ARMCMx_STM32L1xx STM32L1xx Specific Parameters | ||
22 | * @ingroup ARMCMx_SPECIFIC | ||
23 | * @details This file contains the Cortex-M3 specific parameters for the | ||
24 | * STM32L1xx platform. | ||
25 | * @{ | ||
26 | */ | ||
27 | |||
28 | #ifndef CMPARAMS_H | ||
29 | #define CMPARAMS_H | ||
30 | |||
31 | /** | ||
32 | * @brief Cortex core model. | ||
33 | */ | ||
34 | #define CORTEX_MODEL 3 | ||
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 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(STM32L100xB) && !defined(STM32L100xBA) && \ | ||
50 | !defined(STM32L100xC) && !defined(STM32L151xB) && \ | ||
51 | !defined(STM32L151xBA) && !defined(STM32L151xC) && \ | ||
52 | !defined(STM32L151xCA) && !defined(STM32L151xD) && \ | ||
53 | !defined(STM32L151xDX) && !defined(STM32L151xE) && \ | ||
54 | !defined(STM32L152xB) && !defined(STM32L152xBA) && \ | ||
55 | !defined(STM32L152xC) && !defined(STM32L152xCA) && \ | ||
56 | !defined(STM32L152xD) && !defined(STM32L152xDX) && \ | ||
57 | !defined(STM32L152xE) && !defined(STM32L162xC) && \ | ||
58 | !defined(STM32L162xCA) && !defined(STM32L162xD) && \ | ||
59 | !defined(STM32L162xDX) && !defined(STM32L162xE) | ||
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 | #define CORTEX_NUM_VECTORS 64 | ||
69 | |||
70 | /* The following code is not processed when the file is included from an | ||
71 | asm module.*/ | ||
72 | #if !defined(_FROM_ASM_) | ||
73 | |||
74 | /* Including the device CMSIS header. Note, we are not using the definitions | ||
75 | from this header because we need this file to be usable also from | ||
76 | assembler source files. We verify that the info matches instead.*/ | ||
77 | #include "stm32l1xx.h" | ||
78 | |||
79 | /*lint -save -e9029 [10.4] Signedness comes from external files, it is | ||
80 | unpredictable but gives no problems.*/ | ||
81 | #if CORTEX_MODEL != __CORTEX_M | ||
82 | #error "CMSIS __CORTEX_M 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 | /* Fix for yet another consistency error in ST headers.*/ | ||
91 | #define SVCall_IRQn SVC_IRQn | ||
92 | |||
93 | #endif /* !defined(_FROM_ASM_) */ | ||
94 | |||
95 | #endif /* CMPARAMS_H */ | ||
96 | |||
97 | /** @} */ | ||
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 | /** @} */ | ||