aboutsummaryrefslogtreecommitdiffstats
path: root/os
diff options
context:
space:
mode:
Diffstat (limited to 'os')
-rw-r--r--os/rt/ports/ARMCMx/compilers/GCC/vectors.c15
-rw-r--r--os/rt/ports/ARMCMx/devices/STM32F0xx/cmparams.h4
-rw-r--r--os/rt/ports/ARMCMx/devices/STM32F30x/cmparams.h6
-rw-r--r--os/rt/ports/ARMCMx/devices/STM32F4xx/cmparams.h4
4 files changed, 16 insertions, 13 deletions
diff --git a/os/rt/ports/ARMCMx/compilers/GCC/vectors.c b/os/rt/ports/ARMCMx/compilers/GCC/vectors.c
index 0234bbdd5..707f8b7b1 100644
--- a/os/rt/ports/ARMCMx/compilers/GCC/vectors.c
+++ b/os/rt/ports/ARMCMx/compilers/GCC/vectors.c
@@ -28,14 +28,17 @@
* @{
*/
-#include "ch.h"
+#include <stdbool.h>
+#include <stdint.h>
-#if (CORTEX_NUM_VECTORS & 3) != 0
-#error "the constant CORTEX_NUM_VECTORS must be a multiple of 4"
+#include "cmparams.h"
+
+#if (CORTEX_NUM_VECTORS & 7) != 0
+#error "the constant CORTEX_NUM_VECTORS must be a multiple of 8"
#endif
-#if (CORTEX_NUM_VECTORS < 4) || (CORTEX_NUM_VECTORS > 240)
-#error "the constant CORTEX_NUM_VECTORS must be between 4 and 240 inclusive"
+#if (CORTEX_NUM_VECTORS < 8) || (CORTEX_NUM_VECTORS > 240)
+#error "the constant CORTEX_NUM_VECTORS must be between 8 and 240 inclusive"
#endif
/**
@@ -78,7 +81,7 @@ __attribute__ ((naked))
#endif
void _unhandled_exception(void) {
- while (TRUE)
+ while (true)
;
}
diff --git a/os/rt/ports/ARMCMx/devices/STM32F0xx/cmparams.h b/os/rt/ports/ARMCMx/devices/STM32F0xx/cmparams.h
index df6f69208..ed563b106 100644
--- a/os/rt/ports/ARMCMx/devices/STM32F0xx/cmparams.h
+++ b/os/rt/ports/ARMCMx/devices/STM32F0xx/cmparams.h
@@ -40,12 +40,12 @@
/**
* @brief Memory Protection unit presence.
*/
-#define CORTEX_HAS_MPU FALSE
+#define CORTEX_HAS_MPU 0
/**
* @brief Floating Point unit presence.
*/
-#define CORTEX_HAS_FPU FALSE
+#define CORTEX_HAS_FPU 0
/**
* @brief Number of bits in priority masks.
diff --git a/os/rt/ports/ARMCMx/devices/STM32F30x/cmparams.h b/os/rt/ports/ARMCMx/devices/STM32F30x/cmparams.h
index af3161b39..84efdb0d3 100644
--- a/os/rt/ports/ARMCMx/devices/STM32F30x/cmparams.h
+++ b/os/rt/ports/ARMCMx/devices/STM32F30x/cmparams.h
@@ -40,12 +40,12 @@
/**
* @brief Memory Protection unit presence.
*/
-#define CORTEX_HAS_MPU TRUE
+#define CORTEX_HAS_MPU 1
/**
* @brief Floating Point unit presence.
*/
-#define CORTEX_HAS_FPU TRUE
+#define CORTEX_HAS_FPU 1
/**
* @brief Number of bits in priority masks.
@@ -57,7 +57,7 @@
* @note This number does not include the 16 system vectors and must be
* rounded to a multiple of 4.
*/
-#define CORTEX_NUM_VECTORS 84
+#define CORTEX_NUM_VECTORS 88
/* The following code is not processed when the file is included from an
asm module.*/
diff --git a/os/rt/ports/ARMCMx/devices/STM32F4xx/cmparams.h b/os/rt/ports/ARMCMx/devices/STM32F4xx/cmparams.h
index 3a3e8ad68..48e279e56 100644
--- a/os/rt/ports/ARMCMx/devices/STM32F4xx/cmparams.h
+++ b/os/rt/ports/ARMCMx/devices/STM32F4xx/cmparams.h
@@ -40,12 +40,12 @@
/**
* @brief Memory Protection unit presence.
*/
-#define CORTEX_HAS_MPU TRUE
+#define CORTEX_HAS_MPU 1
/**
* @brief Floating Point unit presence.
*/
-#define CORTEX_HAS_FPU TRUE
+#define CORTEX_HAS_FPU 1
/**
* @brief Number of bits in priority masks.