On Sat, 23 Nov 2002, Lin Gu wrote: > > As part of my debugging efforts, I wrote a "StdOut" module that binds to > > the UART and provides various print(f) statements. This works like a
> Very interesting work. I did a similar thing this spring but > yours seems to be more user-friendly -- it supports 'printf' > whilest mine just prints out strings and numbers in some fixed > formats. Ahem. It is clear to me that I should have written "print*" not "print(f)" - it was meant to be read as you describe. So, no real "printf" as of now. The most usefull functions is the "print" function: print(const char * str); However; the new avr-libc (cvs) contains a number of printf functions, which makes it quite easy to either do: #include <stdio.h> char buf[200]; snprintf(buf, 200, "Hello %s\n\r", "World"); StdOut.print(buf); Or, a macro that does it, or, I could lift the code from here into my module (quite easy, only about 300 lines which can probably be reduced some). I wouldn't mind the last option - so, perhaps I should do that? > On the other hand, there are other desirable debugging features > which could enhance the productivity noticeably. For example, > online query could be very useful. We can embed a small debug > run-time support routine in the TinyOS and use serial line or > another mote to interact with the mote being debugged, such as > querying or setting the value of a variable. The mechanism could > be something similar to Mate, just focusing on debugging. I am not familiar with the inner workings of Mate, but it would be trivial to do a module where you registered your variables with the intention of query them during runtime. > > It would be interesting if somebody implements a sophisticated > debugging suite for motes. Watching LEDs is a good sport but > sometimes it does not tell a lot... Well, I will proceed a little then, since noone have voiced that they already have something more advanced. Mads -- +----------------------------------------------------------------------+ | Mads Bondo Dydensborg. http://www.diku.dk/users/madsdyd | | +45 35 32 14 18 | +----------------------------------------------------------------------+ _______________________________________________ Tinyos-users mailing list [EMAIL PROTECTED] http://mail.Millennium.Berkeley.EDU/mailman/listinfo/tinyos-users
