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/trunk tinyos-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]> 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]**>
>>>> 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].**ethz.ch<[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<[email protected]>>
>>>> wrote:
>>>>
>>>>         Message: 1
>>>>         Date: Tue, 19 Jun 2012 15:03:25 -0400
>>>>         From: steve ayer <[email protected]
>>>> <mailto:[email protected]>>
>>>>         To: "[email protected].__**edu
>>>>         
>>>> <mailto:shimmer-users@eecs.**harvard.edu<[email protected]>
>>>> >"
>>>>         <[email protected].__**edu
>>>>         
>>>> <mailto:shimmer-users@eecs.**harvard.edu<[email protected]>
>>>> >>
>>>>         Subject: [Shimmer-users] toolchain upgrade
>>>>         Message-ID: <4FE0CCFD.9080206@handhelds.__**org
>>>>         
>>>> <mailto:4FE0CCFD.9080206@**handhelds.org<[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:Shimmer-users@eecs.**harvard.edu<[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:Shimmer-users@eecs.**harvard.edu<[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]
> 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

Reply via email to