This is the mail archive of the newlib@sourceware.org mailing list for the newlib project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

printf of 64bit value on ARM


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.



Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]