avr-chat
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [avr-chat] Printf with leading zeros?


From: Andy Warner
Subject: Re: [avr-chat] Printf with leading zeros?
Date: Tue, 1 Feb 2011 12:53:04 -0600

On Tue, Feb 1, 2011 at 12:32 PM, Rick Mann <address@hidden> wrote:
> [...]
> There is clearly something broken in the library.

Are you falling foul of the default stripped-down vfprintf() implementation.
>From the vfprintf docs @
http://www.nongnu.org/avr-libc/user-manual/group__avr__stdio.html#gaa3b98c0d17b35642c0f3e4649092b9f1
 (scroll down a bit..)

...
Since the full implementation of all the mentioned features becomes
fairly large, three different flavours of vfprintf() can be selected
using linker options. The default vfprintf() implements all the
mentioned functionality except floating point conversions. A minimized
version of vfprintf() is available that only implements the very basic
integer and string conversion facilities, but only the # additional
option can be specified using conversion flags (these flags are parsed
correctly from the format specification, but then simply ignored).
This version can be requested using the following compiler options:

   -Wl,-u,vfprintf -lprintf_min

If the full functionality including the floating point conversions is
required, the following options should be used:

   -Wl,-u,vfprintf -lprintf_flt -lm

...

-- 
Andy



reply via email to

[Prev in Thread] Current Thread [Next in Thread]