On Jul 12, 2006, at 9:08 AM, ashish makani wrote:
Hi David & other folks
I was very excited & hopeful when I saw your post on the mailing
list, that at last I would be able to get tinyos successfully
installed on my linux box, especially since I spent all of
yesterday & today, unsuccessfully I might add, trying to get it to
work.
So, right now, I am totally clueless & feeling very frustrated &
desperate.
Should i try to revert back to the earlier version of the avr-libc
rpm, avr-libc-20030512cvs-1, which was installed earlier.
If so, can you guide me how i should go about doing this ?
Generally, all of these sorts of problems come down to one cause: one
of the scripts in the ncc invocation chain is invoking the wrong
version of another script/tool.
For example, your initial problem sounded like when you typed ncc,
the avr-gcc and avr-libc that were being used were older ones. TinyOS
2.x is written to use the new ones, so you ran into some of the
inconsistencies.
The basic ncc call chain goes like this:
ncc (from tinyos-2.x/tools/scripts/tinyos/ncc) invokes
nescc (from nescc/tools/nescc) invokes
nesc1 (from nescc/src/nesc1) produces app.c and invokes
native compiler
ncc is the TinyOS-specific part of nesC; it processes .platform
files, understands TOSSIM, etc. nescc is the script that invokes the
nesc compiler; it understands nesdoc, etc.
nesc1 is the actual (binary) compiler.
The order specified in the install instructions is pretty important.
For example, when you install ncc (as part of the tinyos-tools RPM),
it finds where nescc is and has the script point to that. So what I
think is happening is you're changing the bottom of the toolchain,
and things above it don't know how to point to it correctly.
The best way to figure out the problems and make things work
correctly, is to consider the call chain and make sure that each step
is invoking the right thing. E.g., first check that when you type
'ncc', you are invoking the version of ncc you want to be. Then,
check which nescc (in terms of your filesystem) ncc is invoking.
Then, check which nescc. Then, check which nesc1. The -v flag is VERY
helpful in this regard.
For starters, can you compile a basic application with avr-gcc? E.g.,
just write something like
main() {
int i;
i = 7;
while (1)
i++;
}
If you can't compile this, then your avr-gcc is misconfigured. From
your last error messages, it looks like doing the --force on avr-libc
changed some files which avr-gcc was expecting to be there: its
search path is different than what it should be. This, again, comes
down to installing things lower down on the call chain, whose new
locations are different than what things higher up on the call chain
expect.
Phil
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help