[Tinyos-host-mote-wg] Re: [Tinyos-2.0wg] Bug in nesC 1.2alpha10

Joe Polastre joe.polastre at gmail.com
Fri May 20 14:15:08 PDT 2005


Follow up warnings/bugs:

Test application is apps/TestCC2420

two potential bugs:
  * cory's timer shifting error
  * "packed" attribute being used by nesC on the msp430

Errors are:

polastre at amidala ~/cvs/tinyos-2.x/apps/TestCC2420
$ make telosb
mkdir -p build/telosb
    compiling TestCC2420SendC to a telosb binary
ncc -o build/telosb/main.exe -Os -O -mdisable-hwmul
-I/home/polastre/cvs/tinyos-2.x/tos/lib/CC2420Radio
-I/home/polastre/cvs/tinyos-2.x/tos/../beta/STM25P/STM25P -Wall
-Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -target=telosb
-fnesc-cfile=build/telosb/app.c -board=  TestCC2420SendC.nc -lm
nesc1: warning: calls to SoftwareInit.init in RealMain are uncombined
nesc1: warning: calls to HPLChipconInit.init in CC2420ControlM are uncombined
C:/PROGRA~1/UCB/cygwin/home/polastre/cvs/tinyos-2.x/tos/lib/timer/TransformCounterC.nc:53:
warning: left shift count >= width of type
C:/PROGRA~1/UCB/cygwin/home/polastre/cvs/tinyos-2.x/tos/interfaces/Receive.nc:
In function `CC2420RadioM$Receive$receive':
C:/PROGRA~1/UCB/cygwin/home/polastre/cvs/tinyos-2.x/tos/interfaces/Receive.nc:58:
warning: `packed' attribute ignored
    compiled TestCC2420SendC to build/telosb/main.exe
            6674 bytes in ROM
             148 bytes in RAM
msp430-objcopy --output-target=ihex build/telosb/main.exe build/telosb/main.ihex
    writing TOS image


On 5/20/05, Cory Sharp <cory.sharp at gmail.com> wrote:
> Just for the record... A reasonable alternative is to define generic
> components of the form MyComponent(max_clients) instead of
> MyComponent(special_string).  In practice, instantiation of those
> components looks like
> 
>     new MyComponent(uniqueCount(special_string))
> 
> instead of
> 
>     new MyComponent(special_string)
> 
> This is what the timer system does for VirtualizeTimerC and it works
> fine.  I even assert this should be the standard practice since the
> max_clients form seems more general.  The special_string form doesn't
> provide any additional abstraction for the use-cases I've heard so
> far.
> 
> Cory
> 
> On 5/20/05, Joe Polastre <joe.polastre at gmail.com> wrote:
> > I believe there is a bug in the new nesC with passing strings into a component.
> >
> > I think that if you pass in a string and the string is used in
> > "uniqueCount", nesC is evaluating uniqueCount at the time that file is
> > processed rather than waiting until the full program is processed and
> > then assigning uniqueCount values.
> >
> > To see the bug, compile apps/TestSPI for telosb.  You will get the
> > "comparison is always false due to limited range of data type" even
> > though the uniqueCount value should equal 2!
> >
> > -Joe
> >
> > $ make telosb
> > mkdir -p build/telosb
> >     compiling TestSPIC to a telosb binary
> > ncc -o build/telosb/main.exe -Os -O -mdisable-hwmul
> > -I/home/polastre/cvs/tinyos-2.x/tos/lib/CC2420Radio
> > -I/home/polastre/cvs/tinyos-2.x/tos/../beta/STM25P/STM25P -Wall
> > -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -target=telosb
> > -fnesc-cfile=build/telosb/app.c -board=  TestSPIC.nc -lm
> > nesc1: warning: calls to SoftwareInit.init in RealMain are uncombined
> > C:/PROGRA~1/UCB/cygwin/home/polastre/cvs/tinyos-2.x/tos/interfaces/BusArbitration.nc:
> > In function `BusArbitrationM$0$busReleased$runTask':
> > C:/PROGRA~1/UCB/cygwin/home/polastre/cvs/tinyos-2.x/tos/interfaces/BusArbitration.nc:49:
> > warning: comparison is always false due to limited range of data type
> >     compiled TestSPIC to build/telosb/main.exe
> >             3320 bytes in ROM
> >               52 bytes in RAM
> > msp430-objcopy --output-target=ihex build/telosb/main.exe build/telosb/main.ihex
> >     writing TOS image
> >
> > _______________________________________________
> > Tinyos-2.0wg mailing list
> > Tinyos-2.0wg at Mail.Millennium.Berkeley.EDU
> > https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-2.0wg
> >
> >
>

_______________________________________________
Tinyos-2.0wg mailing list
Tinyos-2.0wg at Mail.Millennium.Berkeley.EDU
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-2.0wg


More information about the Tinyos-host-mote-wg mailing list