From d8d68e917c3e9fd938711e046d862c621f51d147 Mon Sep 17 00:00:00 2001 From: Richard Barry Date: Mon, 16 Apr 2012 18:33:32 +0000 Subject: [PATCH] Set the last return address at the bottom of the stack to 0 in the RX600 ports to prevent E2Studio from attempting to dereference the 0xdeadbeef pointer. --- Source/portable/GCC/RX600/port.c | 2 +- Source/portable/IAR/RX600/port.c | 2 +- Source/portable/Renesas/RX200/port.c | 4 ++-- Source/portable/Renesas/RX600/port.c | 2 +- 4 files changed, 5 insertions(+), 5 deletions(-) diff --git a/Source/portable/GCC/RX600/port.c b/Source/portable/GCC/RX600/port.c index 284fa56a12..5f0ef46fd4 100644 --- a/Source/portable/GCC/RX600/port.c +++ b/Source/portable/GCC/RX600/port.c @@ -113,7 +113,7 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE { /* R0 is not included as it is the stack pointer. */ - *pxTopOfStack = 0xdeadbeef; + *pxTopOfStack = 0x00; pxTopOfStack--; *pxTopOfStack = portINITIAL_PSW; pxTopOfStack--; diff --git a/Source/portable/IAR/RX600/port.c b/Source/portable/IAR/RX600/port.c index e70dbeef25..4aeb7130b8 100644 --- a/Source/portable/IAR/RX600/port.c +++ b/Source/portable/IAR/RX600/port.c @@ -99,7 +99,7 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE { /* R0 is not included as it is the stack pointer. */ - *pxTopOfStack = 0xdeadbeef; + *pxTopOfStack = 0x00; pxTopOfStack--; *pxTopOfStack = portINITIAL_PSW; pxTopOfStack--; diff --git a/Source/portable/Renesas/RX200/port.c b/Source/portable/Renesas/RX200/port.c index bfb6cc3f6f..4aa61409e8 100644 --- a/Source/portable/Renesas/RX200/port.c +++ b/Source/portable/Renesas/RX200/port.c @@ -118,9 +118,9 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE { /* R0 is not included as it is the stack pointer. */ - *pxTopOfStack = 0xdeadbeef; + *pxTopOfStack = 0x00; pxTopOfStack--; - *pxTopOfStack = 0xdeadbeef; + *pxTopOfStack = 0x00; pxTopOfStack--; *pxTopOfStack = portINITIAL_PSW; pxTopOfStack--; diff --git a/Source/portable/Renesas/RX600/port.c b/Source/portable/Renesas/RX600/port.c index b486175170..eca770535e 100644 --- a/Source/portable/Renesas/RX600/port.c +++ b/Source/portable/Renesas/RX600/port.c @@ -119,7 +119,7 @@ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE { /* R0 is not included as it is the stack pointer. */ - *pxTopOfStack = 0xdeadbeef; + *pxTopOfStack = 0x00; pxTopOfStack--; *pxTopOfStack = portINITIAL_PSW; pxTopOfStack--;