Recently I've been attempting to put TinyOS onto TI's eZ430-RF2500-SEH.  Even 
getting started has proved difficult for a few reasons. There is no linux 
driver yet for its usb connector. The default mspgcc tools can not target it's 
MSP430F2274 processor. And finally it looks like no one has been able to do 
this yet from my souring the interenet (despite there being a section marked 
for it in contrib).  Here I will outline my efforts and then ask for help.


What I did to get blink_without_timers working on the device.

1. In windows installed the TI driver which comes with their device demo.

2. Setup Cygwin in Windows

3. Installed the latest precompiled mspgcc.

4. Now in an XubunTOS VM, running on that same Windows machine, downloaded 
source and compiled the mspgcc with some painful modifications.  I got all 
sorts of build errors probably specific to my setup, but after overcoming those 
errors (illformatted code and such). I had to make an important source 
modification: patch the assembler to allow dollar signs in symbol names: In 
binutils-x.xx/gas/config/tc-msp430.h, after the line

#define LEX_DOLLAR 0, add the line
#undef LEX_DOLLAR

5. Moved code into my XubunTOS evnironment from: 
https://wsn.itk.ppke.hu/trac/browser/branches
Platform files: 
https://wsn.itk.ppke.hu/trac/browser/branches/tos/platforms/ez430rf25
Chip files: https://wsn.itk.ppke.hu/trac/browser/branches/tos/chips/msp430x2274
This code is unfinished but at the very least it has a partially functional 
hardware.h.

6. Compiled a blink_without_timers application which busy waits in a for loop 
before toggling the leds. Command: make ez430rf25

7. In cygwin to open the write connection I launched: msp430-gdbproxy.exe 
msp430 --spy-bi-wire TIUSB

8. Back in XubunTOS where I compiled blink_without_timers wrote the file 
.gdbinit:
set remoteaddresssize 64
set remotetimeout 999999
target remote <HOST IP HERE>:2000
monitor erase
load
cont

9. Then in XubunTOS launched: gdb build/ez430rf25/main.exe

Tada! Blink_without_timers. I realize if one was particularly determined this 
could probably all work in one Cygwin shell, but Cygwin was giving me grief and 
I perfer working a Unix environment anyway.


I haven't been able to get timers to work partially because I don't know how. 
I've been fiddling with them for a few days now but with no success yet. How 
does one go about implementing or copying timers?

Thanks,
Jonathan Leahey


Here are some of the platform files:
#####.platfrom#####
# -*- mode:perl; -*-
# the tinyos default hardware stack
push( @includes, qw(

  %T/chips/msp430x2274
  %T/chips/msp430x2274/pins
  %T/chips/msp430x2274/timer
  
  %T/chips/msp430
  %T/chips/msp430/pins
  %T/chips/msp430/adc12
  %T/chips/msp430/dma
  %T/chips/msp430/timer
  %T/chips/msp430/sensors
  %T/lib/timer
  %T/lib/serial
  %T/lib/power
  
  ) );
# we do not have usart, usci instead of it
# %T/chips/msp430/usart

@opts = qw(
  -gcc=msp430-gcc
  -mmcu=msp430x2274
  -fnesc-target=msp430
  -fnesc-no-debug
  
-fnesc-scheduler=TinySchedulerC,TinySchedulerC.TaskBasic,TaskBasic,TaskBasic,runTask,postTask
);

#####PlatformC.c#####
#include "hardware.h"
 
 configuration PlatformC
 {
   provides interface Init;
 }
 implementation
 {
   components PlatformP, Msp430ClockC;
   Init = PlatformP;
   PlatformP.Msp430ClockInit -> Msp430ClockC.Init;
 }

#####PlatformP.nc#####
#include "hardware.h"
 
 module PlatformP{
   provides interface Init;
   uses interface Init as Msp430ClockInit;
   uses interface Init as LedsInit;
 }
 implementation {
   command error_t Init.init() {
     //call Msp430ClockInit.init();
     call LedsInit.init();
     return SUCCESS;
   }
 
   default command error_t LedsInit.init() { return SUCCESS; }
 
 }














_________________________________________________________________
Windows Liveā„¢: Keep your life in sync. 
http://windowslive.com/explore?ocid=TXT_TAGLM_WL_BR_life_in_synch_062009
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to