zzuzpb / tinyos-main

Automatically exported from code.google.com/p/tinyos-main
0 stars 0 forks source link

msp430 code accessed with bit fields #56

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Compile apps/Sense for telosb

What is the expected output? What do you see instead?

Expected output is an error-free and warning-free compilation. Instead:

In file included from 
/home/pal/src/tinyos-main/tos/chips/msp430/adc12/AdcReadClientC.nc:46:
/home/pal/src/tinyos-main/tos/chips/msp430/adc12/Msp430Adc12.h:181:2: warning: 
#warning "Accessing Adc12 registers via bitfield structures: this is 
discouraged mspgcc version >= 4 as it may result in faulty code!"
/home/pal/src/tinyos-main/tos/chips/msp430/adc12/Msp430Adc12ImplP.nc:68:4: 
warning: #warning Accessing TimerA for ADC12

The msp430-gcc discourages accessing registers through bitfields. TinyOS code 
does this extensively.

Please use labels and text to provide additional information.

The fix is to go through all register access code and make sure they are 
accessed with bit masks.

Original issue reported on code.google.com by philip.l...@gmail.com on 26 Aug 2011 at 2:20

GoogleCodeExporter commented 8 years ago
I have removed the warning from the header file, because we verified that the 
ADC12 flags in all relevant (total 64) header files are all matching, so it is 
safe to use a common bitfiedd structure. More info here: 
http://www.millennium.berkeley.edu/pipermail/tinyos-2.0wg/2011-September/003866.
html

Original comment by jan.hauer@gmail.com on 12 Sep 2011 at 8:50