[En-Nut-Discussion] printing floats on ARM

Ole Reinhardt ole.reinhardt at embedded-it.de
Wed May 7 15:36:35 CEST 2014


Hi Krzysztof.

Am 07.05.2014 15:01, schrieb Krzysztof Sawicki:
> I'm working on device with AT91SAM7X512, my compiler:
> gcc version 4.8.1 (Sourcery CodeBench Lite 2013.11-24)
> 
> I found a bug (rather in CS than NutOs) when printing floats, eg.:
> 
> printf("pi=%f\n",3.14159265358979);
> 
> sometimes it works ok, sometimes not (printing random values)
> Further research showed that the problem occurs when ap is not 8-byte
> aligned in putf.c:525:

Which version of Nut/OS do you use? We had a similar bug report quite
some time ago, along with several fixes on the linker scripts, which
should avoid the ap pointer to be aligned wrong.

Have you tries the latest code from Nut/OS trunk? Which linker script do
you use?

best regards,

Ole

-- 
kernel concepts GmbH            Tel: +49-271-771091-14
Sieghuetter Hauptweg 48         Mob: +49-177-7420433
D-57072 Siegen
http://www.embedded-it.de
http://www.kernelconcepts.de


More information about the En-Nut-Discussion mailing list