From 37d2d4d5060ccfe540c6b573c5770eff5cebd66a Mon Sep 17 00:00:00 2001 From: richardbarry Date: Tue, 29 Sep 2009 20:01:17 +0000 Subject: [PATCH] Set ARM byte alignment to 8. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@879 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Source/portable/RVDS/ARM7_LPC21xx/port.c | 5 ++--- Source/portable/RVDS/ARM7_LPC21xx/portmacro.h | 2 +- Source/portable/RVDS/ARM_CM3/portmacro.h | 2 +- 3 files changed, 4 insertions(+), 5 deletions(-) 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 /*-----------------------------------------------------------*/ -- 2.39.5