[Tinyos Core WG] proposal for some (small) changes in the core
Philip Levis
pal at cs.stanford.edu
Tue May 27 10:36:51 PDT 2008
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.
Phil
More information about the Tinyos-2.0wg
mailing list