From afc023a2222709732168314e7d695144cd30ed6c Mon Sep 17 00:00:00 2001 From: gdisirio Date: Thu, 8 Dec 2011 15:53:19 +0000 Subject: git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@3582 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- os/ports/GCC/ARMCMx/chcore.h | 14 ++++++-------- os/ports/GCC/ARMCMx/chcore_v7m.h | 20 +++++++++++++++----- 2 files changed, 21 insertions(+), 13 deletions(-) (limited to 'os/ports/GCC') diff --git a/os/ports/GCC/ARMCMx/chcore.h b/os/ports/GCC/ARMCMx/chcore.h index 9db7c816a..16703ddcc 100644 --- a/os/ports/GCC/ARMCMx/chcore.h +++ b/os/ports/GCC/ARMCMx/chcore.h @@ -105,7 +105,7 @@ * a stack frame when compiling without optimizations. You may * reduce this value to zero when compiling with optimizations. */ -#ifndef PORT_IDLE_THREAD_STACK_SIZE +#if !defined(PORT_IDLE_THREAD_STACK_SIZE) #define PORT_IDLE_THREAD_STACK_SIZE 16 #endif @@ -120,14 +120,14 @@ * @p chSchDoReschedule() can have a stack frame, expecially with * compiler optimizations disabled. */ -#ifndef PORT_INT_REQUIRED_STACK +#if !defined(PORT_INT_REQUIRED_STACK) #define PORT_INT_REQUIRED_STACK 16 #endif /** * @brief Enables the use of the WFI instruction in the idle thread loop. */ -#ifndef CORTEX_ENABLE_WFI_IDLE +#if !defined(CORTEX_ENABLE_WFI_IDLE) #define CORTEX_ENABLE_WFI_IDLE FALSE #endif @@ -136,14 +136,12 @@ * @note The default SYSTICK handler priority is calculated as the priority * level in the middle of the numeric priorities range. */ -#ifndef CORTEX_PRIORITY_SYSTICK +#if !defined(CORTEX_PRIORITY_SYSTICK) #define CORTEX_PRIORITY_SYSTICK (CORTEX_PRIORITY_LEVELS >> 1) -#else +#elif !CORTEX_IS_VALID_PRIORITY(CORTEX_PRIORITY_SYSTICK) /* If it is externally redefined then better perform a validity check on it.*/ -#if !CORTEX_IS_VALID_PRIORITY(CORTEX_PRIORITY_SYSTICK) #error "invalid priority level specified for CORTEX_PRIORITY_SYSTICK" #endif -#endif /** * @brief Stack alignment enforcement. @@ -152,7 +150,7 @@ * binary compatibility with EABI compiled libraries. * @note Allowed values are 32 or 64. */ -#ifndef CORTEX_STACK_ALIGNMENT +#if !defined(CORTEX_STACK_ALIGNMENT) #define CORTEX_STACK_ALIGNMENT 64 #endif 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. -- cgit v1.2.3