Hi Andrew,
- 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. I've got a super minimal ADC10 implementation here - I only implemented the Read interface and took out the ReadNow and ReadStream interfaces, as well as the sequence-of-channels mode. If anyone's interested, I can send it their way. 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: Which 3.2.3 is that? The one that comes with the TinyOS Ubuntu package doesn't know any of the new ones, right? By the way, I'm using mspgcc built from http://www.innoventis.de/downloads/mspgcc/, which is 3.2.3 and supports the 2274. Anyway, I can explain most of the compiler errors, I'll insert comments inline. 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) These are undefined because they reference the second UART, and the 2274 only has one, so that needs some #ifdefs. 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) Same here, because you don't have a 5th and 6th I/O port. 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 And another: the big ones have 7 timer registers on Timer B, but yours has only 3. So in short, it's mostly a matter of adding #ifdef __MSP430_HAS_<peripheral>. For example, my stock version of tos/chips/msp430/timer/Msp430TimerC.nc has the following: provides interface Msp430Timer as TimerB; provides interface Msp430TimerControl as ControlB0; provides interface Msp430TimerControl as ControlB1; provides interface Msp430TimerControl as ControlB2; provides interface Msp430TimerControl as ControlB3; provides interface Msp430TimerControl as ControlB4; provides interface Msp430TimerControl as ControlB5; provides interface Msp430TimerControl as ControlB6; provides interface Msp430Compare as CompareB0; provides interface Msp430Compare as CompareB1; provides interface Msp430Compare as CompareB2; provides interface Msp430Compare as CompareB3; provides interface Msp430Compare as CompareB4; provides interface Msp430Compare as CompareB5; provides interface Msp430Compare as CompareB6; provides interface Msp430Capture as CaptureB0; provides interface Msp430Capture as CaptureB1; provides interface Msp430Capture as CaptureB2; provides interface Msp430Capture as CaptureB3; provides interface Msp430Capture as CaptureB4; provides interface Msp430Capture as CaptureB5; provides interface Msp430Capture as CaptureB6; So this won't compile if some of those capture/compare registers don't exist. There's a define telling you whether there actually are 7 registers, so I've written it as follows: provides interface Msp430Timer as TimerB; provides interface Msp430TimerControl as ControlB0; provides interface Msp430TimerControl as ControlB1; provides interface Msp430TimerControl as ControlB2; provides interface Msp430Compare as CompareB0; provides interface Msp430Compare as CompareB1; provides interface Msp430Compare as CompareB2; provides interface Msp430Capture as CaptureB0; provides interface Msp430Capture as CaptureB1; provides interface Msp430Capture as CaptureB2; #ifdef __MSP430_HAS_TB7__ provides interface Msp430TimerControl as ControlB3; provides interface Msp430TimerControl as ControlB4; provides interface Msp430TimerControl as ControlB5; provides interface Msp430TimerControl as ControlB6; provides interface Msp430Compare as CompareB3; provides interface Msp430Compare as CompareB4; provides interface Msp430Compare as CompareB5; provides interface Msp430Compare as CompareB6; provides interface Msp430Capture as CaptureB3; provides interface Msp430Capture as CaptureB4; provides interface Msp430Capture as CaptureB5; provides interface Msp430Capture as CaptureB6; #endif That's basically the pattern. I don't know if Eric's integration branch has such checks in place; I'll leave that to him since I don't have time to check right now :-) 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! If we exclude tinyos-help and keep it on tinyos-msp430, I think the discussion is very relevant for the audience :) Kind regards, Michiel
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
