The iris has the atmega1281 MCU, not the msp430. That's why the math.h from msp430-libc gives you the errors. Make sure that the math.h you use comes from avr-libc. Using #include <math.h> should do the job.
Janos On Tue, Jun 1, 2010 at 10:48 AM, Etienne Lachaud <[email protected]>wrote: > Hi. > We are using IRIS motes and we would like to convert the value provided by > the temperature sensor. The formula given by the datasheet requires > logarithm, so we need the math.h header file in the folder > /usr/msp430/include/math.h. But we are having trouble when we want to > include it. During the compilation it prints strange errors for math.h, here > is a sample: > /opt/tinyos-2.1.1/tos/lib/net/blip/math.h:22: syntax error before `}' > /opt/tinyos-2.1.1/tos/lib/net/blip/math.h:27: syntax error before `const' > /opt/tinyos-2.1.1/tos/lib/net/blip/math.h:36: syntax error before `_PARAMS' > /opt/tinyos-2.1.1/tos/lib/net/blip/math.h:37: syntax error before `_PARAMS' > /opt/tinyos-2.1.1/tos/lib/net/blip/math.h:38: syntax error before `_PARAMS' > > And there is errors like for almost all the lines of math.h. And of course > the log function we want to use is not recognized. > We tried to include the header like any header: #include <math.h> but it's > not the one we want because the log() function was not recignized. So we > tried to put the complete path like this: #include > "/usr/msp430/include/math.h" and then the errors occured. > > Is it a classpath error or something like that? > > Thanks in advance. > > Etienne Lachaud. > > _______________________________________________ > Tinyos-help mailing list > [email protected] > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help >
_______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
