Machine Check execption PPC405 Xilinx

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; } /*———————————————————–*/

Machine Check execption PPC405 Xilinx

And that fixes the problem? Thanks for reporting this, can you add a bug to the SourceForge bug list. Thanks.