[Tinyos-help] Question about printf
Wes Barron
jwb042 at latech.edu
Fri Sep 21 15:00:59 PDT 2007
I use Printf as a debug because i have no other way of checking
variables. It would be easer to add and remove from developing programs
if no wiring was needed.
John Barron
Kevin Klues wrote:
> I wanted to get a sense of how many people out there use the printf
> library provided in TinyOS 2.0. As its written right now, its not the
> easiest thing to use since an application has to explicitly flush the
> printf buffer itself and any printf commands called while flushing
> will all fail.
>
> My question is whether people would prefer to have a bit more user
> friendly version of printf. I have an alternate implementation where
> all that needs to be done to use printf is to include tos/lib/printf
> in your include path in your makefile. No wiring, no nothing. Just
> call printf() anywhere in your code and see the output spit out over
> the serial line. Flushing is done automatically, and bytes can also
> be written to the printf buffer while this flush is occurring. Since
> flushing is only triggered when the print buffer has a certain number
> of bytes in it, explicit flushes are of course possible, by wiring in
> a PrintfFlush interface from the PrintfC component.
>
> The reason I'm bringing all of this up is that this version of the
> printf library is incompatible with the version in previous releases.
> Would people prefer to have this newer version overwrite the current
> one (possibly breaking existing code), or be provided as an alternate
> printf service in some way? Comments are welcome.
>
>
More information about the Tinyos-help
mailing list