From 86b4b5cfaee2c6bc268e4a8301640c17640c3d6d Mon Sep 17 00:00:00 2001 From: richardbarry Date: Sun, 4 Oct 2009 17:59:49 +0000 Subject: [PATCH] Tidy up, starting to get ready for next release. git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@895 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- Source/portable/GCC/ARM7_LPC2000/port.c | 13 ------------- Source/portable/GCC/ARM7_LPC23xx/port.c | 3 +-- Source/portable/GCC/STR75x/portmacro.h | 2 +- Source/tasks.c | 5 +++-- 4 files changed, 5 insertions(+), 18 deletions(-) diff --git a/Source/portable/GCC/ARM7_LPC2000/port.c b/Source/portable/GCC/ARM7_LPC2000/port.c index 36310204e..3b36bc074 100644 --- a/Source/portable/GCC/ARM7_LPC2000/port.c +++ b/Source/portable/GCC/ARM7_LPC2000/port.c @@ -54,19 +54,6 @@ * to ARM mode are contained in portISR.c. *----------------------------------------------------------*/ -/* - Changes from V2.5.2 - - + ulCriticalNesting is now saved as part of the task context, as is - therefore added to the initial task stack during pxPortInitialiseStack. - - Changes from V3.2.2 - - + Bug fix - The prescale value for the timer setup is now written to T0_PR - instead of T0_PC. This bug would have had no effect unless a prescale - value was actually used. -*/ - /* Standard includes. */ #include diff --git a/Source/portable/GCC/ARM7_LPC23xx/port.c b/Source/portable/GCC/ARM7_LPC23xx/port.c index 5b31906f2..111f4f9b4 100644 --- a/Source/portable/GCC/ARM7_LPC23xx/port.c +++ b/Source/portable/GCC/ARM7_LPC23xx/port.c @@ -151,12 +151,11 @@ portSTACK_TYPE *pxOriginalTOS; system mode, with interrupts enabled. */ *pxTopOfStack = ( portSTACK_TYPE ) portINITIAL_SPSR; - #ifdef THUMB_INTERWORK + if( ( ( unsigned long ) pxCode & 0x01UL ) != 0x00 ) { /* We want the task to start in thumb mode. */ *pxTopOfStack |= portTHUMB_MODE_BIT; } - #endif pxTopOfStack--; diff --git a/Source/portable/GCC/STR75x/portmacro.h b/Source/portable/GCC/STR75x/portmacro.h index 4d9848919..6af34226c 100644 --- a/Source/portable/GCC/STR75x/portmacro.h +++ b/Source/portable/GCC/STR75x/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 #define portYIELD() asm volatile ( "SWI 0" ) #define portNOP() asm volatile ( "NOP" ) /*-----------------------------------------------------------*/ diff --git a/Source/tasks.c b/Source/tasks.c index 748b4621a..306e60fa4 100644 --- a/Source/tasks.c +++ b/Source/tasks.c @@ -192,7 +192,7 @@ PRIVILEGED_DATA static unsigned portBASE_TYPE uxTaskNumber = ( unsigned po PRIVILEGED_DATA static signed portCHAR *pcTraceBufferStart; PRIVILEGED_DATA static signed portCHAR *pcTraceBufferEnd; PRIVILEGED_DATA static signed portBASE_TYPE xTracing = pdFALSE; - PRIVILEGED_DATA static unsigned portBASE_TYPE uxPreviousTask = 255; + static unsigned portBASE_TYPE uxPreviousTask = 255; PRIVILEGED_DATA static portCHAR pcStatusString[ 50 ]; #endif @@ -410,7 +410,8 @@ portBASE_TYPE xRunPrivileged; required by the port. */ #if( portSTACK_GROWTH < 0 ) { - pxTopOfStack = pxNewTCB->pxStack + ( usStackDepth - 1 ) - ( ( usStackDepth - 1 ) % portBYTE_ALIGNMENT ); + pxTopOfStack = pxNewTCB->pxStack + ( usStackDepth - 1 ); + pxTopOfStack = ( portSTACK_TYPE * ) ( ( ( unsigned portLONG ) pxTopOfStack ) & ( ( unsigned portLONG ) ~portBYTE_ALIGNMENT_MASK ) ); } #else { -- 2.39.2