Closed GoogleCodeExporter closed 9 years ago
Updated patch that incorporates init capability (for atmel 128 systems).
Original comment by pabi...@gmail.com
on 17 Apr 2011 at 11:34
Attachments:
Hi, pabigot
I've applied your two patches, but got the following error:
$ make iris
......
In file included from
/home/qy/git/tinyos-2.x.svn/tos/lib/serialprintf/SerialPrintfP.nc:44,
from /home/qy/git/tinyos-2.x.svn/tos/lib/serialprintf/SerialPrintfC.nc:41,
from TestAppC.nc:46:
In interface `Putchar':
/home/qy/git/tinyos-2.x.svn/tos/lib/printf/Putchar.nc:42: syntax error before
`('
In component `SerialPrintfP':
/home/qy/git/tinyos-2.x.svn/tos/lib/serialprintf/SerialPrintfP.nc:64: syntax
error before `('
make: *** [exe0] Error 1
It seems "putchar" can't be used as a command name, for it is a macro defined
in avr_stdio.h.
After I rename it, the application compiles and gets on well with IRIS.
Another suggestion:
Add -I$(TOSDIR)/lib/printf in Makefile seems strange when
-I$(TOSDIR)/lib/serialprintf is already added.
I suggest move avr_stdio.h to tos/chips/atm128/, and implement PutcharP.nc
separately under tos/chips/{atm128, msp430, m16c60} without ifdefs to make it
more clear and easier to port to new platforms.
Original comment by qy.n...@gmail.com
on 17 Apr 2011 at 12:57
The attached patch should avoid the need to rename anything.
I'd support unifying lib/serialprintf into lib/printf. I don't support
spraying PutcharP.nc out to every platform directory; it's not chip-dependent,
but toolchain-dependent. In my opinion, putting it in one place simplifies
maintainability: easy to find, and having found it you see examples of how it's
handled in other toolchains.
Why doesn't avr_studio.h come from the AVR toolchain, anyway? What's it doing
in tinyos, declaring huge amounts of garbage that isn't used? Since the logs
imply it exists to support a legacy avr interface, it'd be better to replace
its use with whatever the current toolchain provides.
Original comment by pabi...@gmail.com
on 17 Apr 2011 at 2:35
Never mind that previous patch; I found an avr toolchain, and it doesn't work.
Original comment by pabi...@gmail.com
on 17 Apr 2011 at 2:37
Better patch attached. This builds; I can't test whether it works. It
eliminates use of avr_stdio.h in favor of avr-libc's version. Dunno why it was
originally added; the commit comment is lacking in explanation.
Original comment by pabi...@gmail.com
on 17 Apr 2011 at 3:03
Attachments:
Original comment by philip.l...@gmail.com
on 20 Apr 2011 at 4:47
SVN 5584 merges serialprintf into printf
SVN 5585 incorporates the Putchar interface
Tested on tmote and iris (build only)
Original comment by pabi...@gmail.com
on 15 May 2011 at 3:44
Original issue reported on code.google.com by
pabi...@gmail.com
on 17 Apr 2011 at 11:15