FreeRTOS Support Archive
The FreeRTOS support forum is used to obtain active support directly from Real
Time Engineers Ltd. In return for using our top quality software and services for
free, we request you play fair and do your bit to help others too! Sign up
to receive notifications of new support topics then help where you can.
This is a read only archive of threads posted to the FreeRTOS support forum.
The archive is updated every week, so will not always contain the very latest posts.
Use these archive pages to search previous posts. Use the Live FreeRTOS Forum
link to reply to a post, or start a new support thread.
[FreeRTOS Home] [Live FreeRTOS Forum] [FAQ] [Archive Top] [February 2009 Threads] Machine Check execption PPC405 XilinxPosted by Charles on February 17, 2009 Thanks,
I did not realise that you can run the software simulator through the hardware debugger. I can download code and single step looking at registers and variables.
The start of the loop in mem_alloc() line 262 causes a machine check exception. The line that causes this instruction lwz r5, -32408(r13) but r13 is not initialised (0xa5a5a5a5).
Standalone version r13 = 0x43728
Found that the pointer to the short data area (r13) and the pointer to the second small data area (r2) are not initialised in pxPortInitialiseStack() in port.c (as in xil_crt0.s)
I have now added this into source/portable/GCC/PPC405_Xilinx/port.c
I've added:
extern const unsigned _SDA_BASE_; extern const unsigned _SDA2_BASE_;
/* * Initialise the stack of a task to look exactly as if the task had been * interrupted. * * See the header file portable.h. */ portSTACK_TYPE *pxPortInitialiseStack( portSTACK_TYPE *pxTopOfStack, pdTASK_CODE pxCode, void *pvParameters ) { /* Place a known value at the bottom of the stack for debugging. */ *pxTopOfStack = 0xDEADBEEF; pxTopOfStack--;
/* EABI stack frame. */ pxTopOfStack -= 20;/* Previous backchain and LR, R31 to R4 inclusive. */
/* Parameters in R13. */ *pxTopOfStack = ( portSTACK_TYPE ) &_SDA_BASE_; /* address of the first small data area */ pxTopOfStack -= 10;
/* Parameters in R3. */ *pxTopOfStack = ( portSTACK_TYPE ) pvParameters; pxTopOfStack--;
/* Parameters in R2. */ *pxTopOfStack = ( portSTACK_TYPE ) &_SDA2_BASE_;/* address of the second small data area */ pxTopOfStack--;
/* R1 is the stack pointer so is omitted. */
*pxTopOfStack = 0x10000001UL;;/* R0. */ pxTopOfStack--; *pxTopOfStack = 0x00000000UL;/* USPRG0. */ pxTopOfStack--; *pxTopOfStack = 0x00000000UL;/* CR. */ pxTopOfStack--; *pxTopOfStack = 0x00000000UL;/* XER. */ pxTopOfStack--; *pxTopOfStack = 0x00000000UL;/* CTR. */ pxTopOfStack--; *pxTopOfStack = ( portSTACK_TYPE ) vPortEndScheduler;/* LR. */ pxTopOfStack--; *pxTopOfStack = ( portSTACK_TYPE ) pxCode; /* SRR0. */ pxTopOfStack--; *pxTopOfStack = portINITIAL_MSR;/* SRR1. */ pxTopOfStack--; *pxTopOfStack = ( portSTACK_TYPE ) vPortEndScheduler;/* Next LR. */ pxTopOfStack--; *pxTopOfStack = 0x00000000UL;/* Backchain. */
return pxTopOfStack; } /*-----------------------------------------------------------*/
RE: Machine Check execption PPC405 XilinxPosted by Dave on February 17, 2009 And that fixes the problem? Thanks for reporting this, can you add a bug to the SourceForge bug list. Thanks.
Copyright (C) Amazon Web Services, Inc. or its affiliates. All rights reserved.
|