Hi Erik thanks, your email was really useful. As you say, what I did was rocket science, but I could not be able to find another solution because of my poor knowledge of linux. Bye David
Date: Fri, 27 Jul 2012 02:25:36 -0700 Subject: Re: [Tinyos-help] Does TinyOS dist from http://tinyos.stanford.edu/tinyos/dists/ubuntu support TelosB motes? From: [email protected] To: [email protected] CC: [email protected] On Fri, Jul 27, 2012 at 12:55 AM, David Rodenas <[email protected]> wrote: Hi all I have the latest version of tinyos (from tinyos trunk) with telosb working together. I found the solution after several instalations and looking into the following threads: Cool. Be aware that David is doing an installation of the Released T2.1.1 (which is getting pretty dated at this point) and ALSO the development trunk which is about to be released as T2.1.2. Installing both isn't usual, I'd actually recommend installing from the TinyProd (master Branch) on github which is a snapshot from the TinyOS development trunk. The master branch will always follow the current (latest) full release of TinyOS. In this case the upcoming T2.1.2 release. MSP430 toolchains come in various flavors because it has gotten extensively reworked by Peter Bigot (this is a good thing). The Release T2.1.1 code builds with the older msp430 toolchain (3.2.3, now called legacy). The legacy toolchain installs into the /usr heirarchy. The Development Trunk builds with the newer msp430 4.6.3 toolchain (now called -46). The -46 toolchain installs into /opt/msp430-46. What I've done is the following (using a Ubuntu 10.04 LTS) - Please read them carefully before doing anything -: 11.10 is recommended at this point. I've also used 10.04, 10.10 and am currently using 11.10. All my current testing and operational use has been on 11.10. If you are setting up a new system, use 11.10 (Oneric) or give 12.04 a try. It should work, but hasn't been tested. Be warned, the following will remove your existing packages named nesc, and anything with tinyos in its package name. This includes any installation of tinyos-2.1.1 you might have. If you don't want that to happen remove the packages one by one by hand. $ sudo dpkg -P `dpkg -l nesc '*tinyos*' | grep ^ii | awk '{ print $2 }' | xargs`$ sudo apt-get clean It is better to add the deb lines into /etc/apt/sources.d/tinyprod-debian.list as described in the README. Just to keep things seperate. apt-get update will automatically find the additions. $ sudo gedit /etc/apt/sources.list <add>deb http://tinyprod.net/repos/debian squeeze maindeb http://tinyprod.net/repos/debian msp430-46 main </add>$ sudo apt-get update be aware that the packages on tinyprod.net are signed with my key, which you are installing below. The packages on stanford have not been signed (the last I looked). This can potentially be a security problem if you are using unsigned packages from stanford. $ gpg --keyserver keyserver.ubuntu.com --recv-keys 34EC655A $ gpg -a --export 34EC655A | sudo apt-key add -$ apt-get install tinyos-2.1.1 nesc tinyos-tools msp430-tinyos-legacy avr-tinyos$ sudo gedit $HOME/.bashrc<add> source /opt/tinyos-2.1.1/tinyos.sh</add> $ sudo chown -R <id> /opt/tinyos-2.1.1 This completes the installation of the old T2.1.1 release and the legacy tools. Your PATH variable typically includes /usr/bin and since this is where the legacy tools get installed, the toolchain that gets used comes from /usr/bin when you build T2 apps. Now, if you go to $TOSROOT/apps/Blink, and do make telosb, it should work. The remainder is installing the development trunk code and required tools. However, I recommend you have the latest instalation of tinyos, so (first steps retrieved from http://docs.tinyos.net/tinywiki/index.php/Installing_from_SVN/GIT): $ cd $HOME$ mkdir -p local/src$ cd local/src$ svn checkout http://tinyos-main.googlecode.com/svn/trunk/ tinyos-2.x You can also use git (which I recommend, it's a better fit for how T2 development seems to be working): cd local/srcgit clone git://github.com/tinyprod/prod.git tinyos-2.x The s/w will be in local/src/tinyos-2.x and you will be on the master branch from the tinyprod/prod repository. You will have to modify the environment variables to set TOSDIR and TOSROOT correctly. See the script tinyos.sh in /opt/tinyos-2.1.1 for details about what gets set. (now, I made a backup of everything within the tinyos-2.1.1 directory, and after that, I deleted everything except the tinyos.sh file) You don't need to do any of this. Change the environment variables for TOSROOT and TOSDIR as needed to point to your local copy of the source code. You really don't want to mess with /opt/tinyos-2.1.1 because for one thing it was installed as a package. It won't hurt anything but is weird and is a whole bunch of extra steps. You really don't need to do this. Just change the environment variables. $ cd local/src/tinyos-2.x$ cp -r * /opt/tinyos-2.1.1/ You also don't need to rebuild the tools. The package tinyos-tools provides those tools. The tinyos-tools 1.4.2 package and nesc 1.3.4 should be fully backward compatible with both the msp430 3.2.3 and msp430-46 (4.6.3) versions of the MSP430 toolchains. $ cd /opt/tinyos-2.1.1/tools $ ./Bootstrap$ ./configure --prefix=$HOME/local$ make all$ make install At this point, you have the latest version of tinyos, but now, "make telosb" does not work. The reason is that you need the msp430-46 toolchain: You also don't want to do this. Just modify your PATH variable to put /opt/msp430-46/bin in front of /usr/bin. Then you will pick up the 4.6.3 version of the msp430 toolchain. $ sudo apt-get install msp430-46 $ cd /usr (where the directory msp430 is, maybe /usr/local) In general you don't want to be telling "normal" users to be tweaking stuff in /usr. That is the whole reason for using package managers. Let the package manager take care of keeping track of what is needed. This can easily be handled by simply making changes to your PATH environment variable. It is why the PATH var exists. The following REALLY REALLY REALLY isn't recommended. Yes it works, but just change your PATH variable. $ mv msp430 msp430-gcc-3.2.3$ ln -s /opt/msp430-46 msp430 $ cd /usr/bin$ rm msp430-* seriously gag. $ ln -s ../msp430/bin/* . And that's all. This finally worked for me. I wish you luck. Its not luck :-) Its rocket science. Eventually, I'll get around to updating the wiki. I've been waiting for the T2.1.2 release and for things to settle down. I will also build a deb-src for the t2.1.2 sources that don't force the installation to be in /opt/tinyos-2.1.2. That is just weird. David Date: Thu, 26 Jul 2012 23:00:15 -0700 From: [email protected] To: [email protected] CC: [email protected] Subject: Re: [Tinyos-help] Does TinyOS dist from http://tinyos.stanford.edu/tinyos/dists/ubuntu support TelosB motes? On Thu, Jul 26, 2012 at 8:56 PM, Gary Lee <[email protected]> wrote: Thanks for your reply. Could you let me know how to install *-legacy packages, where the 3.2.3 compiler lives now from stanford. Read the rest of the email. I already told you. Follow the links. Go read the README at tinyprod.net/repos/debian On Thu, Jul 26, 2012 at 12:17 AM, Eric Decker <[email protected]> wrote: On Wed, Jul 25, 2012 at 8:49 PM, Gary Lee <[email protected]> wrote: "make telosb" works before. when I run "ncc --version -target=telosb", I got ncc: 1.2.4 nescc: 1.3.4 msp430-gcc: msp430-gcc (GCC) 4.5.3 Copyright (C) 2010 Free Software Foundation, Inc. This is free software; see the source for copying conditions. There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. Prior to updating the tools from dists/ubuntu, I strongly suspect you had the 3.2.3 compiler. Because it worked. When you updated the tools again you got the 4.5.3 compiler which is incompatible with the T2.1.1 release code you have in /opt/tinyos-2.1.1. Try installing the *-legacy packages, it is where the 3.2.3 compiler lives now. I beleive they are in the dists/ubuntu repository at stanford. They also exist in the tinyprod repository at http://tinyprod.net/repos/debian/ On Wed, Jul 25, 2012 at 10:41 PM, Eric Decker <[email protected]> wrote: On Wed, Jul 25, 2012 at 8:26 PM, Gary Lee <[email protected]> wrote: Hi, I have installed TinyOS 2.1.1 from http://tinyos.stanford.edu/tinyos/dists/ubuntu many times. Did "make telosb" work before? recently, when I installed from http://tinyos.stanford.edu/tinyos/dists/ubuntu again, when I run "make micaz", it works fine. However, when I run "make telosb", lots of errors. what does the output of ncc --version -target=telosb say? Any help? Thanks a lot, Gary _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Eric B. Decker Senior (over 50 :-) Researcher -- Eric B. Decker Senior (over 50 :-) Researcher -- Eric B. Decker Senior (over 50 :-) Researcher _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help -- Eric B. Decker Senior (over 50 :-) Researcher
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
