[arm-gnu] Cortex-M3 and Floating Point Problems
Carlos O'Donell
carlos_odonell at mentor.com
Fri Jun 22 14:10:13 UTC 2012
On 6/22/2012 9:53 AM, Mark Mulrooney wrote:
> I hate to say this, but I think I may have spoken too soon. Yesterday
> after Paul's suggestion that it has to be on an 8 byte boundary, I
> put the following on all the stacks: __attribute__ ((align (8))). I
> compiled it, ran the system, and it immediately printed out the
> correct answer. Thinking that solved the problem I moved on to make
> some changes in another part of the system and now the printf no
> longer works again. I backed out those changes and the printf still
> does not work so I don't think it was anything I added. I have seen
> it before where it works every once in a blue moon and that's why I
> was convinced it was the 8 byte boundary problem.
So this sounds like something is breaking the stack boundary requirements.
Can you look at the stack alignment at entry to several functions?
> Carlos: You had mentioned there was a bug in printf with regards to
> %f, does this sound at all like that bug?
No, I was just generically stating that there could be an unfound
bug, but I don't know of any.
> Also I was wondering if anyone knows of a good alternative
> printf/scanf library to use.
What about the one in the STM32 Firmware Library?
Cheers,
Carlos.
--
Carlos O'Donell
Mentor Graphics / CodeSourcery
carlos_odonell at mentor.com
carlos at codesourcery.com
+1 (613) 963 1026
More information about the arm-gnu
mailing list