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

David Gay dgay42 at gmail.com
Tue May 27 11:25:32 PDT 2008


On Tue, May 27, 2008 at 10:36 AM, Philip Levis <pal at cs.stanford.edu> wrote:
>
> On May 27, 2008, at 9:57 AM, Jan Hauer wrote:
>
>>
>> (*) 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 ) {
>>
>> This fix should not have any impacts for other platforms, so I suggest
>> to use it as a workaround.
>
> These kinds of things are the reason why we settled on a version of
> gcc for the avr and msp430 rather than follow the head. Continually
> tweaking source to avoid bugs, and asking people to update their
> compiler often to keep up, is just not feasible.

isn't the one he's using (3.2.3) the one we settled on for msp430, though? ;-)

David


More information about the Tinyos-2.0wg mailing list