From e281cc1781fd0932ede4ca18aa98aec9038c190a Mon Sep 17 00:00:00 2001 From: richardbarry Date: Wed, 13 Apr 2011 15:59:17 +0000 Subject: [PATCH] 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 --- Source/portable/MPLAB/PIC32MX/port.c | 3 +++ 1 file changed, 3 insertions(+) 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--; -- 2.39.5