From: richardbarry Date: Wed, 13 Apr 2011 15:59:17 +0000 (+0000) Subject: Ensure byte alignment is maintained in PIC32 port layer when 8 byte alignment is... X-Git-Tag: V7.0.1~69 X-Git-Url: https://git.sur5r.net/?a=commitdiff_plain;h=e281cc1781fd0932ede4ca18aa98aec9038c190a;p=freertos Ensure byte alignment is maintained in PIC32 port layer when 8 byte alignment is required (basically, when printing out 8 byte data types). git-svn-id: https://svn.code.sf.net/p/freertos/code/trunk@1355 1d2547de-c912-0410-9cb9-b8ca96c0e9e2 --- diff --git a/Source/portable/MPLAB/PIC32MX/port.c b/Source/portable/MPLAB/PIC32MX/port.c index 31c8da540..2cd68ac17 100644 --- a/Source/portable/MPLAB/PIC32MX/port.c +++ b/Source/portable/MPLAB/PIC32MX/port.c @@ -108,6 +108,9 @@ void __attribute__( (interrupt(ipl1), vector(_CORE_SOFTWARE_0_VECTOR))) vPortYie */ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) { + /* Ensure byte alignment is maintained when leaving this function. */ + pxTopOfStack--; + *pxTopOfStack = (portSTACK_TYPE) 0xDEADBEEF; pxTopOfStack--;