[arm-gnu] Cortex-M3 and Floating Point Problems
Mark Mulrooney
mmulrooney at teledyne.com
Mon Jun 25 19:58:47 UTC 2012
So it looks like it was the stack alignment problem. Unfortunately, I just can't read :(
I had __attribute__ ((align (8))) and I missed GCC's warning stating it was ignoring the attribute align. It should read __attribute__ ((aligned (8))).
Thanks for all your help!
Cheers,
Mark
-----Original Message-----
From: Carlos O'Donell [mailto:carlos_odonell at mentor.com]
Sent: Friday, June 22, 2012 10:10
To: Mark Mulrooney
Cc: Paul Brook; arm-gnu at codesourcery.com
Subject: Re: [arm-gnu] Cortex-M3 and Floating Point Problems
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