From b7b1d530f4a7182d87f2438637c9fcd21a0cb51f Mon Sep 17 00:00:00 2001 From: hathach Date: Mon, 28 Apr 2014 14:59:05 +0700 Subject: [PATCH] fix issue with IAR Assembler in freertos build --- demos/host/host_freertos/host_freertos.uvopt | 6 +++--- vendor/freertos/FreeRTOSConfig.h | 8 ++++++-- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/demos/host/host_freertos/host_freertos.uvopt b/demos/host/host_freertos/host_freertos.uvopt index 1f80f8ae..5af4f4f3 100644 --- a/demos/host/host_freertos/host_freertos.uvopt +++ b/demos/host/host_freertos/host_freertos.uvopt @@ -606,10 +606,10 @@ 1 0 0 - 18 + 0 0 - 101 - 118 + 111 + 113 0 ..\src\main.c main.c diff --git a/vendor/freertos/FreeRTOSConfig.h b/vendor/freertos/FreeRTOSConfig.h index 36246e85..17a14a55 100644 --- a/vendor/freertos/FreeRTOSConfig.h +++ b/vendor/freertos/FreeRTOSConfig.h @@ -79,11 +79,11 @@ //--------------------------------------------------------------------+ // Interrupt nesting behaviour configuration. //--------------------------------------------------------------------+ -/* Cortex-M specific definitions. */ +/* Cortex-M specific definitions. __NVIC_PRIO_BITS is defined in core_cmx.h */ #ifdef __NVIC_PRIO_BITS #define configPRIO_BITS __NVIC_PRIO_BITS #else - #define configPRIO_BITS 5 /* 32 priority levels */ + #define configPRIO_BITS 5 // 32 priority levels FIXME IAR Assembler will wrongly get this default value #endif /* The lowest interrupt priority that can be used in a call to a "set priority" @@ -107,6 +107,8 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ //--------------------------------------------------------------------+ // portmacro.h include path //--------------------------------------------------------------------+ +#ifndef __IASMARM__ // avoid messing up with IAR + #if defined __CC_ARM #define TOOL_DIR RVDS #elif defined __GNUC__ @@ -129,4 +131,6 @@ See http://www.FreeRTOS.org/RTOS-Cortex-M3-M4.html. */ #include XSTRING_(freertos/Source/portable/TOOL_DIR/ARCH_DIR/portmacro.h) +#endif + #endif /* __FREERTOS_CONFIG__H */