printf of 64bit value on ARM

Franzi Edo. edo.franzi@ukos.ch
Tue Nov 29 14:47:00 GMT 2011


Hi,
I am trying to build a newlib for a Cortex M3 ARM capable to support the printf.
Everything works fine, but I have a strange behavior with the printf of 64bit values.

If I execute this:

...
uint64_t val = 1LL;

printf("value = %llu\n", val);
...

I got: value = 4294967296

This sounds like a big-little endian problem. Any idea how to solve this problem?

I uses the newlib 1.19.0 and gcc 4.6.2.
For the newlib configure I use these switches:

	--enable-newlib-io-long-long \
	--enable-interwork \
	--disable-libgloss \
	--disable-newlib-supplied-syscalls"

Thank's
  Edo.




More information about the Newlib mailing list