aboutsummaryrefslogtreecommitdiffstats
path: root/os/ports/GCC/ARMCMx/chcore_v7m.h
diff options
context:
space:
mode:
Diffstat (limited to 'os/ports/GCC/ARMCMx/chcore_v7m.h')
-rw-r--r--os/ports/GCC/ARMCMx/chcore_v7m.h20
1 files changed, 15 insertions, 5 deletions
diff --git a/os/ports/GCC/ARMCMx/chcore_v7m.h b/os/ports/GCC/ARMCMx/chcore_v7m.h
index 96149cae9..14fca144c 100644
--- a/os/ports/GCC/ARMCMx/chcore_v7m.h
+++ b/os/ports/GCC/ARMCMx/chcore_v7m.h
@@ -46,7 +46,19 @@
* @brief Simplified priority handling flag.
* @details Activating this option will make the Kernel work in compact mode.
*/
-#ifndef CORTEX_SIMPLIFIED_PRIORITY
+#if !defined(CORTEX_USE_FPU)
+#define CORTEX_USE_FPU FALSE/*CORTEX_HAS_FPU*/
+#elif CORTEX_USE_FPU && !CORTEX_HAS_FPU
+/* This setting requires an FPU presence check in case it is externally
+ redefined.*/
+#error "the selected core does not have an FPU"
+#endif
+
+/**
+ * @brief Simplified priority handling flag.
+ * @details Activating this option will make the Kernel work in compact mode.
+ */
+#if !defined(CORTEX_SIMPLIFIED_PRIORITY)
#define CORTEX_SIMPLIFIED_PRIORITY FALSE
#endif
@@ -57,14 +69,12 @@
* @p CORTEX_MAXIMUM_PRIORITY priority level as fast interrupts
* priority level.
*/
-#ifndef CORTEX_PRIORITY_SVCALL
+#if !defined(CORTEX_PRIORITY_SVCALL)
#define CORTEX_PRIORITY_SVCALL (CORTEX_MAXIMUM_PRIORITY + 1)
-#else
+#elif !CORTEX_IS_VALID_PRIORITY(CORTEX_PRIORITY_SVCALL)
/* If it is externally redefined then better perform a validity check on it.*/
-#if !CORTEX_IS_VALID_PRIORITY(CORTEX_PRIORITY_SVCALL)
#error "invalid priority level specified for CORTEX_PRIORITY_SVCALL"
#endif
-#endif
/**
* @brief NVIC VTOR initialization expression.