[Tinyos Core WG] toolchain rationale

David Gay dgay42 at gmail.com
Fri Nov 17 13:06:29 PST 2006


On 11/17/06, Jan Beutel <j.beutel at ieee.org> wrote:
> > Which ncc/nescc absolute paths are the problem? The usual one people
> > complain about is the TinyOS path, but ncc has several mechanisms for
> > overriding that (and the alternative "no absolute path" is no better,
> > as it just means you keep the overriding mechanisms and drop the
> > default value ;-))
>
> this is a snippet from boomerangs ncc where the absolute TOSDIR was
> removed by an environment test. something similar needs to be done in
> nescc-mig
>
> # Configuration
> #$TOSDIR = "/opt/tinyos-2.x/tos";
> $TOSDIR = $ENV{"TOSDIR"} if defined($ENV{"TOSDIR"});
> $nescc = "/opt/moteiv/usr/bin/nescc";
> $tossim = 0;

No. The environment test is, and has always been, there. The only
effect of commenting out the absolute path is that things will fail if
TOSDIR isn't defined (except if you use the -tosdir option). As for
mig, it tells nescc-mig to use ncc rather than nescc, so it follows
whatever ncc does (earlier versions called ncc directly, so the effect
was the same).

As I said before: tosdir is and has always been relocatable. The
argument always seems to boil down to whether having a default is a
good idea (the discussion usually starts like this one - people don't
seem to check documentation or source code before complaining). The
other relevant question is where to get the location - currently it's
an env var or a command line switch, but other choices could be
considered (registry on windows, configuration files in $HOME, etc).

David


More information about the Tinyos-2.0wg mailing list