Hi Steve,

the nesc update solved it!
Thank you very much! :-)

Cheers,
Franz

On 12.07.2012 20:33, steve ayer wrote:
oh,

one more thing: do follow the direction to turn the location of the toolchain into a symbolic link, posted by me but corrected as to the location by franz:

cd /opt
mv msp430 msp430-gcc-3.2.3
ln -s msp430-46 msp430

-steve

On 07/12/2012 02:31 PM, steve ayer wrote:
all,

i just printed out my original post and stepped through it with a fairly
crufty version of the shimmer distro vmware image.  i found the problem
at the end after finishing: the msp430-46 all installation doesn't
upgrade nesc (or, not visibly anyway); you need nesc >= 1.3.3 to work
with the new toolchain.

simplest way to get past this is to download the latest version and
build from source.

http://sourceforge.net/projects/nescc/

press the button, save it, then

tar zxvf nesc-1.3.4.tar.gz
cd nesc-1.3.4
./configure
make
sudo make install

then, then you do this:

ncc --version

you should see

ncc: 1.2.4
nescc: 1.3.4

and blink will compile once again.

sorry about the confusion (this is one reason i build everything from
source...).

thanks for all of the feedback so that i could get this sorted out, and
please post again if any other weirdness crops up.

-steve

On 07/12/2012 02:19 PM, Bracha Hod wrote:
Hi,
I got similar errors after upgrading the toolchain.
I solved the problems by full installation of gcc 4.6.3 from gnu site
and nesc-1.3.3 from source forge.
Once you install them (e.g. in /opt path), you need to change ncc and
bash_tinyos to point on the correct path.
Here are the steps that I did to upgrade the toolchain:

1.Update tinyos-main from tinyos svn : svn checkout
http://tinyos-main.googlecode.com/svn/trunktinyos-main

2.Msp430-64 installation: follow the guidelines in
http://tinyprod.net/repos/debian/to remove old software and then the
installation in http://tinyprod.net/repos/debian/README_46.html

3.Download nesc-1.3.3 from sourceforge and install it according to the
guidelines (README/INSTALL files)

4.Download gcc-4.6 version from gnu site, follow carefully the
installation guidelines in: http://gcc.gnu.org/wiki/InstallingGCC.
Please note that the installation is long and not trivial.

5.Change  ~/.bash_tinyos file to point on the correct path of GCC and
G++ (e.g /opt/gcc-4.6/bin/gcc)

6.Change /usr/local/bin/ncc to point on the correct path of "nescc"
(e.g. /opt/nesc/bin/nescc)

7.Enter to a new shell, so configuration will be updated. Go to
tinyos-main/tools. Follow the configuration instructions
(bootstrap/configure/make).

8.Check your environment: go to $TOSROOT/apps/Blink. Try to compile the
program by "make telosb". If it works – then your environment is working
well.

9.Try to compile your code. You may find some errors in AM.h – change
the enum of broadcast address to typedef. Then compilation should pass.

Hope that it will help you.

Regards,
Bracha Hod.
SensoGo Ltd.
On Thu, Jul 12, 2012 at 8:40 PM, steve ayer <[email protected]
<mailto:[email protected]>> wrote:

    hi franz,

    give me a few minutes to dig out a windows laptop with the vmware
    image and see what detail i flubbed...ok, i see that it does have
    the original toolchain installed in /opt (don't know how it got
    there, but mike did this work, not me).

    i'll go through the procedure that i posted right now and get back
    to you when i find out how it got you in trouble.

    hang in there,

    steve


    On 07/12/2012 09:29 AM, Franz Gravenhorst wrote:

        hi,

        thanks. I tried all solutions you proposed:

        Mike's proposal:
        "svn info" looks correct; full tree checkout did not help;
error msg
        when compiling Blink stays the same.

        Steve's proposal:
        in "/usr/local" there is no directory called "msp430" or
        similar, so I
        did it in "/opt":
        cd /opt
        mv msp430 msp430-gcc-3.2.3
        ln -s /opt/msp430-46 msp430

        But it did not help.
        New error message:
        -----------------------
        tiny2@ShimmerLive:~/tinyos-__main/apps/Blink$ make shimmer2r
        mkdir -p build/shimmer2r
              compiling BlinkAppC to a shimmer2r binary
        ncc -o build/shimmer2r/main.exe  -Os -fnesc-separator=__ -Wall
        -Wshadow
        -Wnesc-all -target=shimmer2r
        -fnesc-cfile=build/shimmer2r/__app.c -board=
        -DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME=\"BlinkAppC\"
        -DIDENT_USERNAME=\"tiny2\" -DIDENT_HOSTNAME=\"__ShimmerLive\"
        -DIDENT_USERHASH=0xe8d0c5b7L -DIDENT_TIMESTAMP=0x4ffeccb9L
        -DIDENT_UIDHASH=0xdc469213L  BlinkAppC.nc -lm
        two source files specified (PLATFORM_SHIMMER2R and BOARD_)
        make: *** [exe0] Error 1
        tiny2@ShimmerLive:~/tinyos-__main/apps/Blink$
        -----------------------

        Here are the other outputs you requested:
        -----------------------

        tiny2@ShimmerLive:~$ msp430-gcc --version
        msp430-gcc (GCC) 3.2.3
        Copyright (C) 2002 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.

        tiny2@ShimmerLive:~$ ncc --version
        ncc: 1.2.4
        nescc: 1.3.2
        gcc: gcc (Ubuntu 4.4.3-4ubuntu5) 4.4.3
        Copyright (C) 2009 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.

        tiny2@ShimmerLive:~$ cd tinyos-main/tos/platforms/__shimmer2r/
tiny2@ShimmerLive:~/tinyos-__main/tos/platforms/shimmer2r$
grep mmcu
        .platform
            -mmcu=msp430f1611
tiny2@ShimmerLive:~/tinyos-__main/tos/platforms/shimmer2r$
        -------------------------


        I hope that helps to find the problem?
        I wanted to update my dev environment, because i have to use
        some code
        which is working in a colleague's dev environment but not in my
        environment. No compiler error, but the
        Bluetooth.dataAvailable() part
        is never executed after BT connection is established (which
        works) and
        data is sent.


        Thanks,
        Franz

        On 12.07.2012 14:57, steve ayer wrote:

            hi,

            definitely a case of version skew.

            while i see that you installed the new toolchain, your
            environment
            probably can't find it.  originally, the toolchain was
            installed in
            /usr/local/msp430, and /usr/local/bin/ contains symbolic
            links to places
            in /usr/local/msp430/bin.

            the new toolchain installs itself in /opt/msp430-46.  so,
            you have two
            options:

            1) either update your PATH variable with /opt/msp430-46 in
            front (works,
            but doesn't scale to subsequent version installations), or

            2) juggle your compiler names a bit, thus:

            sudo bash (become root)
            cd /usr/local
            mv msp430 msp430-gcc-3.2.3
            ln -s /opt/msp430-46 msp430

            this way, the environment will find whatever toolchain
            /usr/local/msp430
            presents.  formerly, that was a hard path, but a symbolic
            link will give
            you flexibility to keep various versions around and change
            to the one
            that you want in about 30 seconds without altering/removing
            directories
            full of working bits.

            if you still have trouble, then please open a fresh
            terminal, and run
            the following to see what's what:

            msp430-gcc --version
            ncc --version

            (after confirming that the entire tinyos tree was updated)
            cd tinyos-main/tos/platforms/__shimmer2r
            grep mmcu .platform

            and let us know what you see.

            -steve


            On 07/12/2012 08:37 AM, mike healy wrote:

                Hi Franz,

                Are you sure the svn update ran correctly (and fully)?
                Based on the
                error you are seeing a problem with this step would be
                my first guess.
                Run the command "svn info" to confirm. When I do so I
                get the following
                output:

                Path: .
                URL: https://tinyos-main.__googlecode.com/svn/trunk
<https://tinyos-main.googlecode.com/svn/trunk>
                Repository Root:
                https://tinyos-main.__googlecode.com/svn
                <https://tinyos-main.googlecode.com/svn>
                Repository UUID: 285f258d-8064-b571-fbc6-__9656dc998e90
                Revision: 5972
                Node Kind: directory
                Schedule: normal
                Last Changed Author: [email protected]
                <mailto:[email protected]>
                <mailto:[email protected]
                <mailto:[email protected]>__>
                Last Changed Rev: 5971
                Last Changed Date: 2012-07-12 00:45:48 +0100 (Thu, 12
                Jul 2012)

                If that doesn't help try checking out the full tree
                again (rename your
                current tree first to make life easier). To do this run
                the following
                command:
                     svn checkout
                http://tinyos-main.googlecode.__com/svn/trunk/
<http://tinyos-main.googlecode.com/svn/trunk/>
                tinyos-main

                Mike


                On Thu, Jul 12, 2012 at 1:24 PM, Franz Gravenhorst
                <[email protected]
                <mailto:[email protected]>
                <mailto:[email protected].__ethz.ch
<mailto:[email protected]>>> wrote:

                     Hi,

I am using the VMware image and I wanted to perform
                the update as
                     instructed by Steve.
                     I did:
                     cd ~/tinyos-main
                     svn update
                     cd /etc/apt/sources.list.d
sudo echo "deb http://tinyprod.net/repos/____debian
                <http://tinyprod.net/repos/__debian>
                     <http://tinyprod.net/repos/__debian
                <http://tinyprod.net/repos/debian>> msp430-46 main" >>
                     tinyprod-debian.list
                     sudo apt-get update
                     sudo apt-get install msp430-46


                     Then, I tested it by compiling the Blink firmware
                and got about 200
                     lines of error messages. Here are the first few
ones:
tiny2@ShimmerLive:~/tinyos-____main/apps/Blink$
                make shimmer2rmkdir -p
                     build/shimmer2r
                          compiling BlinkAppC to a shimmer2r binary

                          WARNING: Minimum recommended msp430-gcc
                version for this TinyOS
                     release is 4.6.3!!!

                     ncc -o build/shimmer2r/main.exe  -Os
                -fnesc-separator=__ -Wall
                     -Wshadow -Wnesc-all -target=shimmer2r
                     -fnesc-cfile=build/shimmer2r/____app.c -board=
                     -DDEFINED_TOS_AM_GROUP=0x22
                -DIDENT_APPNAME=\"BlinkAppC\"
                     -DIDENT_USERNAME=\"tiny2\"
                -DIDENT_HOSTNAME=\"____ShimmerLive\"
                     -DIDENT_USERHASH=0xe8d0c5b7L
                -DIDENT_TIMESTAMP=0x4ffec110L
                     -DIDENT_UIDHASH=0x25356caaL  BlinkAppC.nc -lm
                     In file included from


/home/tiny2/tinyos-main/tos/____platforms/shimmer/chips/____msp430/msp430hardware.h:46,



                                       from


/home/tiny2/tinyos-main/tos/____platforms/shimmer2r/hardware.____h:39,
                                       from


/home/tiny2/tinyos-main/tos/____system/SchedulerBasicP.nc:52:
                     /opt/msp430/msp430/include/io.____h:93:2: warning:
                #warning "Unknown
                     arch! Please check"
                     In file included from


/home/tiny2/tinyos-main/tos/____system/TinySchedulerC.nc:52:
                     In component `McuSleepC':


/home/tiny2/tinyos-main/tos/____chips/msp430/McuSleepC.nc:
                In function
                     `getPowerState':


/home/tiny2/tinyos-main/tos/____chips/msp430/McuSleepC.nc:77:
                     `TACCTL0' undeclared (first use in this function)


/home/tiny2/tinyos-main/tos/____chips/msp430/McuSleepC.nc:77:
                (Each
                     undeclared identifier is reported only once


/home/tiny2/tinyos-main/tos/____chips/msp430/McuSleepC.nc:77:
                for each
                     function it appears in.)


                     What did I do wrong?

                     Thanks,
                     Franz


                     On 20.06.2012 18:00,
                shimmer-users-request@eecs.__h__arvard.edu
                <http://harvard.edu>
<mailto:shimmer-users-request@__eecs.harvard.edu
<mailto:[email protected]>> wrote:

                         Message: 1
                         Date: Tue, 19 Jun 2012 15:03:25 -0400
                         From: steve ayer <[email protected]
                <mailto:[email protected]>
<mailto:[email protected] <mailto:[email protected]>>>
                         To: "[email protected].____edu
<mailto:shimmer-users@eecs.__harvard.edu
<mailto:[email protected]>>"
<[email protected].____edu
<mailto:shimmer-users@eecs.__harvard.edu
<mailto:[email protected]>>>
                         Subject: [Shimmer-users] toolchain upgrade
Message-ID: <4FE0CCFD.9080206@handhelds.____org
<mailto:4FE0CCFD.9080206@__handhelds.org
<mailto:[email protected]>>>
                         Content-Type: text/plain; charset=ISO-8859-1;
                format=flowed

                         all,

                         i just checked in a set of small
                updates/upgrades, some of which
                         will be
                         critical to support the first major mspgcc
                toolchain upgrade in
                         tinyos
                         in years. as of early this month, tinyos has
                decided to
                upgrade from
                         version 3.2.3 (circa late 2003) to 4.6.3.

                         anyway, a few of my commits are bugfixes, only
                revealed during
                         compiler
                         testing.  a few others are just cleanup; and
                one is just a
                         really minor
                         new feature (Time adds mktime).

                         the short story is that anyone who updates
                their tinyos-main
                         repository
will find their ability to compile applications
                broken.

i must apologize to anyone caught by this, as i
                wasn't paying
                         attention
                         to the fact that another member of tinyos core
                was busily
                         preparing the
                         codebase for the new compiler, which uses
                slightly different
                         designations for the msp430 variations; when
                the old compiler
                         sees the
                         new designation, it chokes.  (this designation
                lives in
tos/<shimmer_variant>/.____platform).

                         anyway, the next time you update your
tinyos-main:

                         cd ~/tinyos-main
                         svn update

                         you will see new code scattered over the tree
                (depends upon how
                         *long*
                         you've been neglecting this), but current
                shimmer-specific
                         changes are:

                         tos/platforms/shimmer/Time*.nc
/shimmerAnalogSetupP.nc

/chips/msp430/Msp430I2C*.nc

/chips/msp430/FastClockP.nc
/chips/sd/SDP.nc
                         support/make/shimmer*.target
                                        /span.target

                         what you need to do:

                         if you upgrade the tree, you need to

                         1) install a new msp430-gcc toolchain, version
                4.6.3, along with
                         upgrading nesc to v1.3.3.  the virtual package
                msp430-46 will
                         manage all
                         of them, or you can install everything but gdb
                if you're short
                         on space.

                         packages for ubuntu, both 32- and 64-bit
                platforms, are
                hosted at

                http://tinyprod.net/repos/____debian
                <http://tinyprod.net/repos/__debian>
<http://tinyprod.net/repos/__debian
                <http://tinyprod.net/repos/debian>>

                         follow the instructions in README_46.  ignore
                the now-outdated
                         warnings
that the release is experimental; it has logged
                a great many
                         hours of
                         testing since that was written.

                         if you need to upgrade, installing nesc is
                similar to the other
                         packages:

                         sudo apt-get install nesc

                         *or*

2) make a temporary hack that will allow you to
                use the old
                compiler
                         until you upgrade.  in your platform's
                .platform file, file the
                         msp430
                         mmcu flag, and replace msp430f1611 with the
                old-style
                msp430x1611.

                         i strongly recommend that you not delay
                upgrading for too long.
                           the new
                         compiler is a real upgrade.

                         if anyone runs into trouble, please post here,
                and you will
                         receive help.

                         -steve




                         ------------------------------


___________________________________________________
                         Shimmer-users mailing list
                [email protected]
                <mailto:[email protected]>
<mailto:Shimmer-users@eecs.__harvard.edu
<mailto:[email protected]>>


https://lists.eecs.harvard.____edu/mailman/listinfo/shimmer-____users

<https://lists.eecs.harvard.__edu/mailman/listinfo/shimmer-__users

<https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users>>


                         End of Shimmer-users Digest, Vol 63, Issue 9
******************************____**************


___________________________________________________
                     Shimmer-users mailing list
                [email protected]
                <mailto:[email protected]>
                <mailto:Shimmer-users@eecs.__harvard.edu
<mailto:[email protected]>>

https://lists.eecs.harvard.____edu/mailman/listinfo/shimmer-____users


<https://lists.eecs.harvard.__edu/mailman/listinfo/shimmer-__users

<https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users>>




    _________________________________________________
    Shimmer-users mailing list
    [email protected]
<mailto:[email protected]>
https://lists.eecs.harvard.__edu/mailman/listinfo/shimmer-__users
<https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users>




_______________________________________________
Shimmer-users mailing list
[email protected]
https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users



_______________________________________________
Shimmer-users mailing list
[email protected]
https://lists.eecs.harvard.edu/mailman/listinfo/shimmer-users

Reply via email to