Problems with printing double-values with printf and sprintf
Christian Mauderer
Christian.Mauderer at embedded-brains.de
Mon Aug 17 10:34:39 UTC 2009
Hello,
I've postet this problem on the newlib
(mailing-listhttp://sourceware.org/ml/newlib/2009/msg00810.html). There
I've got the hint that I should post it in rtems-users instead.
The problem is:
I have an embedded artists LPC2478 test board with an arm-core in
little-endian mode. By running the tests from RTEMS-testsuite I have
found that one test (the paranoia-test) breaks. After some time of
debugging I was able to locate the problem.
The program breaks when trying to print a double-value to the serial
line with "printf ("Radix = %f .\n", Radix);". At this command the
processor runs into an exception and ends in an endless loop. The same
thing happens, if I use the sprintf() command instead to put the output
into a string. One of my colleagues said, that he knows that problem
with printing double-values from other programs. But he has also no
solution till now.
After an internet-research i've found the following page:
http://quadcopter.wordpress.com/2009/08/01/toolchain-wrestling/
The problem described there sounds similar to mine and could give a hint
for the reason. But the solution the writer has found don't fits for me.
I'm using the newlib 1.17.0 with RTEMS 4.10 patches out of the
rtems-4.10-newlib-common-1.17.0-44.suse10.3 rpm.
I'm using the following CFLAGS:
-mcpu=arm7tdmi-s -mstructure-size-boundary=8 -mapcs-frame -mthumb -Os -g
Kind regards,
Christian Mauderer
--
Christian Mauderer, embedded brains GmbH
Address : Obere Lagerstr. 30, D-82178 Puchheim, Germany
Phone : +49 89 18 90 80 79-1
Fax : +49 89 18 90 80 79-9
E-Mail : christian.mauderer at embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
More information about the users
mailing list