X-Git-Url: https://git.sur5r.net/?a=blobdiff_plain;f=FreeRTOS%2FSource%2Fportable%2FGCC%2FMicroBlazeV9%2Fport.c;h=fbdaafe8d47e78304a517da889282565f8e83b30;hb=0594d452b2dc3e573ebcea3ddb6e194608605bb3;hp=6c73906293e481bd0ad847809274e511dcf298b1;hpb=266af1b2bd2405aa534598c2a9341ad211442dec;p=freertos diff --git a/FreeRTOS/Source/portable/GCC/MicroBlazeV9/port.c b/FreeRTOS/Source/portable/GCC/MicroBlazeV9/port.c index 6c7390629..fbdaafe8d 100644 --- a/FreeRTOS/Source/portable/GCC/MicroBlazeV9/port.c +++ b/FreeRTOS/Source/portable/GCC/MicroBlazeV9/port.c @@ -99,6 +99,7 @@ FSR register is saved as part of the task context. portINITIAL_FSR is the value given to the FSR register when the initial context is set up for a task being created. */ #define portINITIAL_FSR ( 0U ) + /*-----------------------------------------------------------*/ /* @@ -150,6 +151,7 @@ StackType_t *pxPortInitialiseStack( StackType_t *pxTopOfStack, TaskFunction_t px extern void *_SDA2_BASE_, *_SDA_BASE_; const uint32_t ulR2 = ( uint32_t ) &_SDA2_BASE_; const uint32_t ulR13 = ( uint32_t ) &_SDA_BASE_; +extern void _start1( void ); /* Place a few bytes of known values on the bottom of the stack. This is essential for the Microblaze port and these lines must @@ -204,7 +206,7 @@ const uint32_t ulR13 = ( uint32_t ) &_SDA_BASE_; pxTopOfStack--; *pxTopOfStack = ( StackType_t ) 0x07; /* R7 - other parameters and temporaries. */ pxTopOfStack--; - *pxTopOfStack = ( StackType_t ) 0x08; /* R8 - other parameters and temporaries. */ + *pxTopOfStack = ( StackType_t ) NULL; /* R8 - other parameters and temporaries. */ pxTopOfStack--; *pxTopOfStack = ( StackType_t ) 0x09; /* R9 - other parameters and temporaries. */ pxTopOfStack--; @@ -222,7 +224,7 @@ const uint32_t ulR13 = ( uint32_t ) &_SDA_BASE_; pxTopOfStack--; *pxTopOfStack = ( StackType_t ) pxCode; /* R14 - return address for interrupt. */ pxTopOfStack--; - *pxTopOfStack = ( StackType_t ) NULL; /* R15 - return address for subroutine. */ + *pxTopOfStack = ( StackType_t ) _start1; /* R15 - return address for subroutine. */ #ifdef portPRE_LOAD_STACK_FOR_DEBUGGING pxTopOfStack--;