Boomerang Fixes

From TinyOS Wiki
Revision as of 11:01, 6 April 2011 by Martinvilu (talk | contribs) (Added to the "Boomerang" Category)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Boomerang 2.0.4

GCC causes segmentation fault

Boomerang 2.0.4 includes a new distribution of GCC that prevents a bad interaction between nesC and gcc. For windows users, the Boomerang / TinyOS Tools 2.0.4 installer automatically upgrades msp430-gcc to work with the new features of nesC.

On other platforms, you may receives the following error:

/opt/moteiv/tinyos-1.x/tos/platform/msp430/HPLUSARTFeedback.nc: In
function `VirtualizeAlarmC$0$signalAlarms':
/opt/moteiv/tinyos-1.x/tos/platform/msp430/HPLUSARTFeedback.nc:46:
internal error: Segmentation fault
Please submit a full bug report,
with preprocessed source if appropriate.
See <URL:http://gcc.gnu.org/bugs.html> for instructions.
make: *** [exe0] Error 1

For this case, you will need to rebuild msp430-gcc on your platform using the build-mspgcc script

Nodes do not appear when using "lowpower"

  1. If you are compiling an application such as Delta using the "lowpower" option like this
    make tmote lowpower
    
  2. Then there is a known bug that causes synchronization to fail.
  3. To prevent this bug, download this new version of NetSyncM.nc and copy it to the /opt/moteiv/tos/lib/netsync directory, replacing the existing file.
  4. Recompile and reinstall your application using make tmote lowpower for the changes to take effect.

Calling DS2411.init never returns

  1. If you use the DS2411 serial ID component and call DS2411.init, then
  2. Your program will not continue past DS2411.init because it never returns, because
  3. The DS2411 component uses the microsecond counter to implement the Dallas 1-Wire protocol, and
  4. The microsecond counter is a managed resource in Boomerang 2.0.4 and is forced inactive when idle.
  5. To fix the DS2411 component, download this patch: boomerang-2.0.4-ds2411.patch.
  6. Dry run the patch, which does not actually modify any files, with this command
    cd /opt/moteiv
    patch --dry-run -p0 < boomerang-2.0.4-ds2411.patch
    
  7. The dry run should produce this output
    patching file tos/platform/msp430/timer/TimerMicroResourceC.nc
    patching file tos/platform/msp430/timer/TimerMicroArbiterC.nc
    patching file tos/platform/msp430/timer/MSP430DCOCalibP.nc
    patching file tos/platform/msp430/timer/MSP430DCOCalibC.nc
    patching file tos/platform/msp430/resource/MSP430ResourceTimerACounterMicroC.nc
    patching file tos/platform/msp430/resource/MSP430ResourceConfigTimerAP.nc
    patching file tos/platform/tmote/DS2411C.nc
    patching file tos/platform/tmote/DS2411M.nc
    
  8. Patch your Boomerang 2.0.4, which does change and update files, with this command
    patch -p0 < boomerang-2.0.4-ds2411.patch
    
  9. You may now use the DS2411 component. Be aware that in the new component, DS2411.init is split phase (with no explicit done event) and takes at least five milliseconds (5ms) to complete.

Compile fails with "Unknown target MCD"

  1. If you try to compile an application and you get the error "Unknown target MCD", like this
    $ make tmote
    mkdir -p build/MCD
        compiling Delta to a MCD binary
    ncc -o build/MCD/main.exe ...
    Unknown target MCD
    Known targets for TinyOS directory /opt/moteiv/tinyos-1.x/tos
    and the specified include directories are:
      tmote atmega8 mica mica128 mica2 mica2dot micaz msp430 pc rene2 telos telosb
    make: *** [exe0] Error 2
    
  2. Some other software application has assigned the PLATFORM variable to MCD, which is interfering with the TinyOS build process.
  3. Edit your login script, such as .bashrc in your Cygwin home directory, and add the following line anywhere
    unset PLATFORM
    
    For instance, you can quickly add that line with this command:
    echo unset PLATFORM >> ~/.bashrc
    
  4. Once you reopen your Cygwin shell window for the changes to take effect, building applications will work correctly.

Boomerang 2.0.2

Compile fails in Windows 2000 Professional

  1. If you are running Windows 2000 Professional and when you try to compile an application you get an error like this
    $ make tmote
    mkdir -p build/tmote
        compiling Delta to a tmote binary
    ncc -o build/tmote/main.exe ...
    stdout: Bad file descriptor
    ...
    
  2. Then, you are experiencing a problem with Cygwin and the TinyOS toolset in Windows 2000. No solution is yet available. One known work-around is to pipe the compile command through cat, like this
    $ make tmote | cat
    

Install application, MSVCR71.dll or MFC71.dll missing

  1. If you try to upload an application to a mote and Windows complains that a DLL is missing -- either MSVCR71.dll or MFC71.dll -- then
  2. The Python for Windows Extensions module used by the MSP430 BSL programmer requires the missing module, so
  3. Download msvcr71.dll or mfc71.dll and save it to your Windows System32 directory. (From the instructions at Python for Windows Extensions, MFC DLLs for Python.)

Building docs fails with "dot: not found"

  1. When you try to build application documentaiton with "make tmote docs" or "make tmote docs,here", the build fails with the error "dot: not found", because
  2. Moteiv Boomerang 2.0.2 fails to install the Graphviz application. Download and install the most recent Windows Installer, such as graphviz-2.8.exe.
  3. The installer places the Graphviz executables in the Windows PATH, so just close and reopen your shell, and the docs build command will succeed.

Building TinyOS 1.x CntToLeds et al fail

  1. When you build TinyOS 1.x applications for tmote that use the TinyOS 1.x Counters library in lib/Counters/, the build fails, because
  2. Moteiv Boomerang does not support the TinyOS 1.x Counters library.
  3. As a last resort, build your applications for the "telosb" platform, which uses exclusely TinyOS 1.x and none of the Boomerang libraries or enhancements.
  4. A better option, use the CountRadio applications in tinyos-1.x/apps/CountRadio/, which are supported in Moteiv Boomerang.
  5. Update! In Boomerang 2.0.3 and later, use the Count applications found in /opt/moteiv/apps/Count/.

Boomerang 2.0.1

TinyOS 1.x upgrade, nesC fails

  1. If you upgraded an existing TinyOS 1.x installation with Boomerang, and
  2. If programs fail to compile, causing an error that looks something like this:
    C:/PROGRA~1/UCB/cygwin/opt/moteiv/tos/system/tos.h:111: parse error before `@'
    C:/PROGRA~1/UCB/cygwin/opt/moteiv/tos/system/tos.h:112: parse error before `@'
    C:/PROGRA~1/UCB/cygwin/opt/moteiv/tos/system/tos.h:113: parse error before `@'
    In file included from Delta.h:5,
                     from Delta.nc:1:
    C:/PROGRA~1/UCB/cygwin/opt/moteiv/tos/lib/MultiHopLQI/MultiHop.h:76: parse error before `enum'
    make: *** [exe0] Error 1
    

    then

  3. Your old TinyOS and nesC installations are interfering with the new installation. First, move aside an existing tmote.extra file that may exist by executing this command:
    TT="$TOSDIR/../tools/make/tmote.target" && [ -f "$TT" ] && mv "$TT" "$TT.moteiv-old"
    

    then

  4. Uninstall any exsting nesC 1.1 RPM by exeucting these two commands:
    NC11="`rpm -qa nesc | grep '^nesc-1\.1\.'`"
    [ x"$NC11" = x"" ] || rpm --erase --nodeps $NC11
    
  5. nesC 1.2 should now work correctly

Early adopter, Trawler fails

  1. This bug applies to the twenty or so people that downloaded Boomerang 2.0.1 on or before 4:30pm PST, March 2, 2006
  2. If you try to run Trawler and it fails like this:
    $ java com.moteiv.trawler.Trawler
    Exception in thread "main" java.lang.NoClassDefFoundError: com/moteiv/trawler/Trawler
    
  3. Then, a small error in the post install script of the Moteiv RPM caused it to fail. You can finish the installation by manually executing the corrected post install script. Copy this text into a file named moteiv-boomerang-post-install.sh:
    for a in msp430tools tinyos tinyos_moteiv; do b=/etc/profile.d/${a}.sh; [ -f $b ] && . $b; done
    export MIGFLAGS="-target=telosb -I$TOSDIR/lib/CC2420Radio"
    export SURGE_PLATFORM=telos
    
    cd $TOSDIR/../tools/java/net/tinyos
    perl -i.tos1 -pe 's/$/ \$(MIGFLAGS)/ if /^\s*MIG\s*=\s*mig\s+/;' oscope/Makefile surge/Makefile tools/Makefile
    find . -name Makefile.tos1 | xargs rm
    make
    
    cd $MOTEIV_DIR/tools/java && make
    
  4. Execute the script with this command:
    bash moteiv-boomerang-post-install.sh
    
  5. Trawler should now work correctly