Eric,
First, a huge amount of thanks for responding as in-depth as you did. I had
been thinking that the issues I was running into did in fact run deeper than
just syntax in the various source files in .../platforms, and you've
definitely confirmed that.
Second, I would absolutely love to help with testing/integrating the x2
branch, as well as putting together support for the 22xx series based on the
21xx series. A few pieces of info / thoughts before we start talking about
moving forward:
- I would jump at the chance to help with the documentation for the TinyOS
website. In fact, I've been keeping a journal (for my lab) of the work I've
been doing, and it currently spans a dense 8-page word document, with
problems (and sometimes, rarely, solutions) that I've run into. Since it's
written from my perspective, that of the lowly undergraduate researcher, and
I think could be an excellent motivator for direct and specific aspects of
the documentation we'd need to come up with. It contains everything,
starting from the very basics of getting a VM up and running, a side attempt
at getting mspdebug to flash the chips (an epic failure, I've resorted to
using TI's SmartRF on some Windows PCs in the lab), and now creating the new
platform.
- From Michiel's email, I realized that my first major problem was using the
standard repos of TinyOS from Ubuntu, which doesn't even include the
%T/tos/chips/msp430X directory.
- The ADC issue(s) may or may not be relevant for our lab's purposes right
now - I'm working primarily on getting the basics working on the 2274, since
the plan for our lab's project is to use another version of the MSP430x2xx
series (the 2370, possibly), for which we'll likely need to put an external
ADC on the PCB anyway (the 2370 doesn't have one integrated.) So, if this
would fit in with your plan for developing/integrating the x2 series, I
probably won't be putting effort into getting the ADC working for the 2274.
- Along those same lines, even though I'm motivated and enthusiastic about
working on this, the time I'll have over the summer is limited (I'll be at
my "real" internship for 40 hours a week, working in the lab in my
nonexistent spare time), so I may not be able to get as much done as I'd
like to before next semester begins.
- All of the coding I've been doing is under a new platform I've been
calling "rf2500T", after TI's name for the target board we're using.
Now, the specifics of what to do next. I agree that the major problem I'm
running into is with the compiler. Here is the output with my current setup,
using the presumably-not-working mspgcc version 3.2.3, SVN version of TinyOS
with the msp430X directories #include'd instead of the original msp430, and
with the platform I've been working on:
xubuntos@xubuntos-tinyos:/opt/tinyos-2.1.1/apps/Null$ make rf2500T
mkdir -p build/rf2500T
compiling NullAppC to a rf2500T binary
ncc -o build/rf2500T/main.exe -Os -fnesc-separator=__ -Wall -Wshadow
-Wnesc-all -target=rf2500T -fnesc-cfile=build/rf2500T/app.c -board=
-DDEFINED_TOS_AM_GROUP=0x22 -DIDENT_APPNAME=\"NullAppC\"
-DIDENT_USERNAME=\"xubuntos\" -DIDENT_HOSTNAME=\"xubuntos-tinyos\"
-DIDENT_USERHASH=0x00f95284L -DIDENT_TIMESTAMP=0x4dded1deL
-DIDENT_UIDHASH=0x030b524eL NullAppC.nc -lm
In file included from /opt/tinyos-2.1.1/tos/system/TinySchedulerC.nc:52:
In component `McuSleepC':
/opt/tinyos-2.1.1/tos/chips/msp430X/McuSleepC.nc: In function
`getPowerState':
/opt/tinyos-2.1.1/tos/chips/msp430X/McuSleepC.nc:74: `UCA1CTL1' undeclared
(first use in this function)
/opt/tinyos-2.1.1/tos/chips/msp430X/McuSleepC.nc:74: (Each undeclared
identifier is reported only once
/opt/tinyos-2.1.1/tos/chips/msp430X/McuSleepC.nc:74: for each function it
appears in.)
/opt/tinyos-2.1.1/tos/chips/msp430X/McuSleepC.nc:76: `UCB1CTL1' undeclared
(first use in this function)
In file included from
/opt/tinyos-2.1.1/tos/chips/msp430X/timer/Msp430ClockP.nc:62,
from
/opt/tinyos-2.1.1/tos/chips/msp430X/timer/Msp430ClockC.nc:33,
from
/opt/tinyos-2.1.1/tos/platforms/rf2500T/PlatformC.nc:9,
from /opt/tinyos-2.1.1/tos/system/MainC.nc:61,
from NullAppC.nc:55:
In C file:
/opt/tinyos-2.1.1/tos/chips/msp430X/timer/Msp430XDcoCalib.h: In function
`dco_flash':
/opt/tinyos-2.1.1/tos/chips/msp430X/timer/Msp430XDcoCalib.h:62: `P5OUT'
undeclared (first use in this function)
/opt/tinyos-2.1.1/tos/chips/msp430X/timer/Msp430XDcoCalib.h:64: `P5DIR'
undeclared (first use in this function)
In file included from
/opt/tinyos-2.1.1/tos/chips/msp430X/timer/Msp430ClockC.nc:33,
from
/opt/tinyos-2.1.1/tos/platforms/rf2500T/PlatformC.nc:9,
from /opt/tinyos-2.1.1/tos/system/MainC.nc:61,
from NullAppC.nc:55:
In component `Msp430TimerC':
/opt/tinyos-2.1.1/tos/chips/msp430X/timer/Msp430TimerC.nc: At top level:
/opt/tinyos-2.1.1/tos/chips/msp430X/timer/Msp430TimerC.nc:74: `TBCCTL3_'
undeclared here (not in a function)
/opt/tinyos-2.1.1/tos/chips/msp430X/timer/Msp430TimerC.nc:74: `TBCCR3_'
undeclared here (not in a function)
/opt/tinyos-2.1.1/tos/chips/msp430X/timer/Msp430TimerC.nc:75: `TBCCTL4_'
undeclared here (not in a function)
/opt/tinyos-2.1.1/tos/chips/msp430X/timer/Msp430TimerC.nc:75: `TBCCR4_'
undeclared here (not in a function)
/opt/tinyos-2.1.1/tos/chips/msp430X/timer/Msp430TimerC.nc:76: `TBCCTL5_'
undeclared here (not in a function)
/opt/tinyos-2.1.1/tos/chips/msp430X/timer/Msp430TimerC.nc:76: `TBCCR5_'
undeclared here (not in a function)
/opt/tinyos-2.1.1/tos/chips/msp430X/timer/Msp430TimerC.nc:77: `TBCCTL6_'
undeclared here (not in a function)
/opt/tinyos-2.1.1/tos/chips/msp430X/timer/Msp430TimerC.nc:77: `TBCCR6_'
undeclared here (not in a function)
make: *** [exe0] Error 1
It seems that this is definitely a compiler issue, since the undeclared
symbols are actually register names (all of the UCA1CTL1 etc. are described
in TI's user guide for the x2xx series as registers, as opposed to pins,
which I had thought originally.) The files in the platforms/rf2500T
directory for this output are almost exactly like those of the z1. So, I
suppose that I would need two things to get this working:
1) A copy of the "integrating" branch you're talking about - I poked around
on the SVN on the TinyOS Google Code site and didn't seem see it. Where
would I check it out from exactly?
2) The z1 toolchain, specifically the compiler they used. What TI headers
are you talking about specifically, do you mean the ones that TI provides
for their own software?
I'm also open to using whatever system you've got online for keeping a log
in the future. I'd be willing to jump into whatever system you use for
taking notes, making changes to files, and working within the system as a
whole (I've never actually done a commit to an SVN before.)
As a last note, I hate to clog up the listserv like this, is there another
way of communicating that we should use? Thanks again, I appreciate
everything, and I'm really excited to work with you all!
-Andrew
On Thu, May 26, 2011 at 4:09 PM, Eric Decker <[email protected]> wrote:
>
>
> On Wed, May 25, 2011 at 12:26 PM, Andrew Sabelhaus <[email protected]>wrote:
>
>> Hello Everyone,
>
>
> Hi Andrew,
>
> I see that Michiel has responded and that might help.
>
> There are well over 300 TI chips and there are lots of differences.
>
> I am currently working on pulling together support for 3 of the major
> families of msp430 chips that are supported on TinyOS. The families are
> differentiated on how they deal with register mappings for peripherals,
> interrupts, clock systems, and other low level interfaces.
>
> The intent is to have the 3 major families easily support most of the TI
> msp430 chipset line.
>
> A chip is added to a family when it TinyOS is ported to it. For example:
>
> x1: currently supports msp430f149, msp430f1611 (telosb)
>
> x2: in integration, supports msp430f2616-2619 (z1)
>
> x5: in integration, supports cc430f5137 (surfboard)
>
> As noted above, this work is in progress. I have the integration of the
> x1 and x2 families done and am currently working on bringing in the x5
> support. This work is happening on the msp430 integration branch which is
> off the main SVN trunk.
>
> The main svn trunk does have directories for the msp430X to support the
> original Z1 work but this work is well over a year old. I am working with
> the Zolertia folks to clean this up and get it integrated properly. This is
> happening in the msp430 integration branch.
>
>
> So, if you are willing, I'd like you to try using the x2 support in the
> integration branch it should work pretty well for what you are doing. You
> will need to figure out how to support a new platform but you will need to
> figure that out anyway. I'd be willing to help you out with it.
>
> So send me email if you'd like to go this route. Basically we'd be
> starting with the Z1 which is based on the msp430f2617 and modifing some
> things. It should be pretty straight forward. If we go this way I'd also
> like you to basically keep notes on our steps on the wiki which will then
> eventually become a new howto page.
>
> more below,
>
>
>
>> I'm trying to get TinyOS up and running on some development boards for my
>> research lab, in anticipation of using MSP430s on a robotics project coming
>> up. The board I've been working with is the TI eZ430-rf2500T, the relatively
>> generic package from TI that includes, on one chip, a CC radio and the
>> MSP430F2274, and on the other, the FET to flash it over USB. I've been
>> running into some issues even compiling the Null app, much less flashing the
>> chip, and I would greatly appreciate any help.
>>
>
> Not surprising the 2274 is very different than the 1611.
>
>
>>
>> Is there a universal reference somewhere for the pins that TinyOS requires
>> for basic compilation?
>>
>
> No. This would be difficult to maintain. There are too many chips with
> too many differences. The other thing is what one is using from a chip is
> dependent on what application one is compiling. If one is using serial i/o
> then on x1 parts one needs some flavor of usart brought in. On x2 and x5
> parts then usci but on other as yet unsupported chips a usi. It just
> depends, so writing some kind of reference documenting this is first a pain
> and second difficult. Especially apriori. The approach I'm taking is to
> make this clearer in the code. Along with proper documentation in the code
> about what is going on this will go a long ways to documenting how things
> work.
>
>
>> For example, I've been following the "Platforms" tutorial, and the MSP430
>> that I'm using seems to have a very different set of pins than the 1611 in
>> the tutorial.
>>
>
> One of the problems we've been dealing with is the msp430 toolchain
> (mspgcc) hasn't really been maintained for awhile. The current default
> toolchain is mspgcc 3.2.3 and is very old. It doesn't support anything
> other than the x1 chips. There is a z1 varient that supports the x2
> chips. This is another variant based on mspgcc4 which supports the x5
> chips.
>
> Yes that is a mess and Peter Bigot is actively working on cleaning it up.
> His current work is called uniarch and greatly simplifies things. His new
> code is also based on current gcc technology (4.5) and when released (later
> this summer) will move to 4.6. We are holding off on revamping things
> (including the documentation, tools repositories, etc) until that is
> further.
>
> In the meantime, you should use the z1 toolchain but with the new TI HEADER
> files. I can help you grab all of this stuff.
>
>
>> I'm not well versed on serial communication frameworks, but the issue
>> seems to stem from the fact that the newer MSP430s use TI's USCI (or USI,
>> I'm not quite sure) interface.
>>
>
> Depends on the chip one is using. The easiest way to tell what is going
> on is by looking at the appropriate TI HEADER for the chip in question.
>
>
>> In comparing the datasheets for the 1611 and the 2274, the pins used on
>> the former in the tutorial do not seem to have matches on the latter. For
>> example, the tutorial (as well as the code for various other platforms) use
>> TOSH_ASSIGN_PIN with pin names that seem to imply a USART/SPI interface,
>> which, if I understand correctly, the 2274 does not have (or has indirectly,
>> via the upgrade to TI's newer USCI/USI protocols.)
>>
>> I'm not sure if only pins that TinyOS technically requires for basic
>> compilation and operation (ie. the Null app) is just a single pin for the
>> clock, or if the communication framework is somehow a dependency also. In
>> browsing the internet, it seems that people have written code in TinyOS for
>> this board before, but I can't seem to find any .platform and hardware.h
>> file(s) that they have used. In summary, if anyone could point me to any of:
>>
>> - A thorough documentation of the pin declaration / naming system in
>> TinyOS, specifically with respect to the clocks and timers, and how/where
>> the pin declarations in hardware.h are used in the other TinyOS source code
>> (everything in the /chips directory, etc)
>>
> - A few basic source files that others have used for the eZ430-rf2500T, or
>> the 2274 version of the MSP430
>> - Some other resource for this info
>>
>
> I'd be happy to help you come up the learning curve. Along the way would
> you be willing to jot down notes about the missing things that would have
> helped so that we can start putting together reasonable documentation that
> will help others in the future?
>
>
> Also, there is the distinct possibility that I'm way out of my league here.
>>
>>
>
> Not at all. What I like about what you've done is first you've done your
> homework. You have tried to use the existing documentation both TinyOS and
> TI to figure out a confusing problem. Then it is clear from the above that
> you are then asking reasonable questions. Both of those are good things.
>
> Thanks for making the effort to do your homework first.
>
>
> eric
>
> If any of this is totally off/irrelevant/points to large gaps in my
>> knowledge, let me know. Either way, props on this awesome operating system
>> that you all have developed! Thanks again,
>>
>> Andrew Sabelhaus
>> Micro-Robotics Lab at the University of Maryland, College Park
>>
>> _______________________________________________
>> 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