From: richardbarry Date: Tue, 29 Sep 2009 20:01:17 +0000 (+0000) Subject: Set ARM byte alignment to 8. X-Git-Tag: V6.0.0~49 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=37d2d4d5060ccfe540c6b573c5770eff5cebd66a;p=freertos Set ARM byte alignment to 8. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@879 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Source/portable/RVDS/ARM7_LPC21xx/port.c b/Source/portable/RVDS/ARM7_LPC21xx/port.c index 8b6d462ec..500cee1a8 100644 --- a/Source/portable/RVDS/ARM7_LPC21xx/port.c +++ b/Source/portable/RVDS/ARM7_LPC21xx/port.c @@ -153,12 +153,11 @@ portSTACK_TYPE *pxOriginalTOS; system mode, with interrupts enabled. */ *pxTopOfStack = ( portSTACK_TYPE ) portINITIAL_SPSR; - #ifdef KEIL_THUMB_INTERWORK - { + if( ( ( unsigned long ) pxCode & 0x01UL ) != 0x00UL ) + { /* We want the task to start in thumb mode. */ *pxTopOfStack |= portTHUMB_MODE_BIT; } - #endif pxTopOfStack--; diff --git a/Source/portable/RVDS/ARM7_LPC21xx/portmacro.h b/Source/portable/RVDS/ARM7_LPC21xx/portmacro.h index e978bcb8f..4b2b0f9e0 100644 --- a/Source/portable/RVDS/ARM7_LPC21xx/portmacro.h +++ b/Source/portable/RVDS/ARM7_LPC21xx/portmacro.h @@ -84,7 +84,7 @@ extern "C" { /* Hardware specifics. */ #define portSTACK_GROWTH ( -1 ) #define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ ) -#define portBYTE_ALIGNMENT 4 +#define portBYTE_ALIGNMENT 8 /*-----------------------------------------------------------*/ /* Task utilities. */ diff --git a/Source/portable/RVDS/ARM_CM3/portmacro.h b/Source/portable/RVDS/ARM_CM3/portmacro.h index a8010ed07..c0dd26098 100644 --- a/Source/portable/RVDS/ARM_CM3/portmacro.h +++ b/Source/portable/RVDS/ARM_CM3/portmacro.h @@ -84,7 +84,7 @@ extern "C" { /* Architecture specifics. */ #define portSTACK_GROWTH ( -1 ) #define portTICK_RATE_MS ( ( portTickType ) 1000 / configTICK_RATE_HZ ) -#define portBYTE_ALIGNMENT 4 +#define portBYTE_ALIGNMENT 8 /*-----------------------------------------------------------*/