[Tinyos Core WG] proposal for some (small) changes in the core

David Moss dmm at rincon.com
Wed May 28 08:58:50 PDT 2008


This is fine.  I'm not sure why CC2420SpiC doesn't provide all strobes by
default. The SPI implementation hasn't been touched much since early
versions of the driver.
 
-David


-----Original Message-----
From: tinyos-2.0wg-bounces at millennium.berkeley.edu
[mailto:tinyos-2.0wg-bounces at millennium.berkeley.edu] On Behalf Of Jan Hauer
Sent: Wednesday, May 28, 2008 8:49 AM
To: TinyOS Core WG
Subject: Re: [Tinyos Core WG] proposal for some (small) changes in the core

I got one more: I need tos/chips/cc2420/spi/CC2420SpiC.nc to provide a
strobe for setting the pending flag in an ACK frame. This means two
extra lines of code, namely adding to the signature of CC2420SpiC.nc:

     provides interface CC2420Strobe as SACKPEND;

and in the CC2420SpiC.nc implementation section:

     SACKPEND = Spi.Strobe[ CC2420_SACKPEND ];

(CC2420_SACKPEND is already defined in CC2420.h) - and while we're at
it, why not let CC2420SpiC.nc provide *all* available strobes?

Jan

On Wed, May 28, 2008 at 4:17 PM, Vlado Handziski
<handzisk at tkn.tu-berlin.de> wrote:
> On Tue, May 27, 2008 at 6:57 PM, Jan Hauer <jan.hauer at gmail.com> wrote:
>>
>> (1) fix tos/lib/timer/VirtualizeAlarmC.nc to work with uint32_t on
>> msp430 platforms like proposed in my email to tinyos-devel on Mar 4
>> (and re-printed below (*)).
>>
>> (*) There is problem with tos/lib/timer/VirtualizeAlarmC.nc on msp430:
>> with mspgcc-3.2.3 I get a "Segmentation fault" during compilation if I
>> use uint32_t as "size_type", e.g. "VirtualizeAlarmC(T32khz, uint32_t,
>> uniqueCount(UQ_ALARM_32KHZ32));". The probelm is in line 135 of
>> VirtualizeAlarmC. Currently lines 134-136 read:
>>
>> if( m.isset[id] ) {
>>  size_type elapsed = call AlarmFrom.getNow() - m.alarm[id].t0;
>>  if( m.alarm[id].dt <= elapsed ) {
>>
>> I don't understand the actual cause, but when I replace this with the
>> following code it compiles:
>>
>>  if( m.isset[id] ) {
>>  size_type t0 = m.alarm[id].t0;
>>  size_type elapsed = call AlarmFrom.getNow() - t0;
>>   if( m.alarm[id].dt <= elapsed ) {
>
>
> A short update on the bug:
>
> The bug is known to the mspgcc developers:
>
> http://www.msp430.ubi.pt/forum/viewtopic.php?p=29525
>
> Dimitry has promised to fix it, but the bug is not fixed in the latest CVS
> or he just fixed the pointer dereferencing case.
>
> The segmentation fault occurs only when using -O1 level of optimization.
>
> Our current make setup  is overloading the default -Os flag with -O which
is
> not a very happy solution:
>
> mkdir -p build/telosb
>     compiling BlinkC to a telosb binary
> ncc -o build/telosb/main.exe  -Os -O .....
>
> I think we should leave -Os to be the default optimization level, although
> -Os has its own problems sometimes.
>
> Vlado
>
>
>
>
_______________________________________________
Tinyos-2.0wg mailing list
Tinyos-2.0wg at millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-2.0wg




More information about the Tinyos-2.0wg mailing list