Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Tip

We thank Chris Snyder for his contribution on setting up this environment.

...

With version 2 of the firmware things are pretty easy.

...

  • Connect it to the USB port. It should appear as a /dev/ttyUSBx device.

...

  • Edit the ./firmware/openos/projects/<YOUR_PLATFORM>/SConscript.env. and make sure that the mspdebug is called with -j uif option
Code Block
languagepython
def uploader(device):

    return Builder(action = 'mspdebug -d {} -j uif "prog $SOURCE"'.format(device),

                   suffix = '.phonyupload',

                   src_suffix = '.ihex')

...

  • To download the firmware to the mote just type: (this may require root privileges (sudo))
Code Block
languagebash
scons project=<gina|telosb|pc>  upload=/dev/ttyUSBx  ./path/to/project/03oos_openwsn/

e.g: scons project=gina  upload=/dev/ttyUSB0  ./firmware/openos/projects/common/03oos_openwsn/

...

Needed to say that I had a lot of problems to setup that. I will try to simplify as much as possible the steps to follow so you skip all my problems.

...

  • Edit the ./firmware/openos/projects/<YOUR_PLATFORM>/SConscript.env. and make sure that the mspdebug is called with tilib option
Code Block
languagepython
def uploader(device):

    return Builder(action = 'mspdebug tilib -d {} "prog $SOURCE"'.format(device),

                   suffix = '.phonyupload',

                   src_suffix = '.ihex')

...


  • Then you need to have the libmsp430.so in your /usr/lib or somewhere else in your path. This lib needs to be compiled from some MSP430 sources that are developed for windows so building it requires certain patience and several other tools. Too simplify your life I compiled them for both 32 bits and 64 bits but it is possible that they don't work on your system.libmsp430.so [32 bit] [64 bit]

...


  • Place the library (according to your

...

  • OS version) into /usr/lib/ and execute: (may require sudo). If this works you are done.
Code Block
scons project=<gina|telosb|pc>  upload=/dev/ttyACMx  ./path/to/project/03oos_openwsn/

e.g: scons project=gina  upload=/dev/ttyACM0  ./firmware/openos/projects/common/03oos_openwsn/

...

  • install gcc-multilib library as you will need some extras from gcc: apt-get install gcc-multilib
  • download the sources of the libmsp430.so library. I've put together the lib sources, a patch to correct errors on the library (only for 64bit version) and the firmware files for the FET. [download]
  • unzip it and apply the patch to the folder. 
  • Then you will need to install libboost-*. Boost is a set of extension libraries for cpp and it is used by the libmsp430 library sources.  download latest version (I used 1.5.2). Unzip it and execute: 
Code Block
         ./boostrap.sh --prefix=[dir]
         ./b2 link=static cxxflags=-fPIC -d+2 -a

...