[arm-gnu] Cortex-M3 and Floating Point Problems

Mark Mulrooney mmulrooney at teledyne.com
Thu Jun 21 21:02:11 UTC 2012


Thanks Paul, that did the trick! Since we're running the Micrium RTOS each task's stack was not aligned to an 8 byte boundry. 


-----Original Message-----
From: Paul Brook [mailto:paul at codesourcery.com] 
Sent: Thursday, June 21, 2012 16:42
To: arm-gnu at codesourcery.com
Cc: Mark Mulrooney; Carlos O'Donell
Subject: Re: [arm-gnu] Cortex-M3 and Floating Point Problems

> > printf("Answer: %f\r\n", answer);
> > It printed out Answer: 0.000000.
> It appears you are correct, good catch! Now my next question would be why.

This usually means your startup code has left the stack incorrectly aligned (typically off by 4).  The stack pointer must be aligned to an 8 byte boundary.

Paul



More information about the arm-gnu mailing list