On 7/11/06, ashish makani <[EMAIL PROTECTED]> wrote:
I did a fresh install of tinyos2.0 beta on my linux box running FC5.

I followed the "fresh" tinyos-2.0beta installation instructiosn to a T, and
at the end of the installation set all the environment variables, by
including lines of the form :

export TOSROOT="/opt/tinyos-2.x"
in my .bashrc file.

I am getting the following error(in blue below), when i try to make  the
tinyos-2.x/apps/Blink application  for "micaz":

<--------------------------SNIPPET------------------------------->
[EMAIL PROTECTED] Blink]$ make micaz
 mkdir -p build/micaz
    compiling BlinkAppC to a micaz binary
ncc -o build/micaz/main.exe -Os -finline-limit=100000 -Wall -Wshadow
-DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -target=micaz
-fnesc-cfile=build/micaz/app.c -board=micasb  -fnesc-dump=wiring
-fnesc-dump='interfaces(!abstract())'
-fnesc-dump='referenced(interfacedefs, components)'
-fnesc-dumpfile=build/micaz/wiring- check.xml BlinkAppC.nc
-lm
In file included from /opt/tinyos-2.x
/tos/system/TinySchedulerC.nc:41:
In component `McuSleepC':
/opt/tinyos-2.x/tos/chips/atm128/McuSleepC.nc: In function `McuSleep.sleep':
/opt/tinyos-2.x/tos/chips/atm128/McuSleepC.nc:112: implicit
declaration of function `pgm_read_byte'
make: *** [exe0] Error 1

Hmm. That "function" is a macro defined in
/usr/avr/include/avr/pgmspace.h, and that file should definitely be
included in all mica applications (it's #included early on). Obvious
ideas:
- you don't have the right version of avr-libc
- you have several versions of avr-libc, and the wrong one is being used
- you have a file called pgmspace.h somewhere, which is being included
instead of the normal one

You should be able to find out which pgmspace.h is being included by
doing the following commands:

 rm /tmp/nesccpp*  # remove any lurking temporary files
 NESC_KEEP_CPP=1 make micaz # compile, leaving preprocessed files behind
 grep pgmspace.h /tmp/nesccpp* # look for #line directives for pgmspace.h

I get something like:
/tmp/nesccppsJOdXNO:# 1
"/usr/lib/gcc/avr/3.4.3/../../../../avr/include/avr/pgmspace.h" 1 3
/tmp/nesccppsJOdXNO:/* $Id: pgmspace.h,v 1.22.2.1 2005/01/18 16:28:05
joerg_wunsch Exp $ */
/tmp/nesccppsJOdXNO:   pgmspace.h
/tmp/nesccppsJOdXNO:    #include <avr/pgmspace.h>
/tmp/nesccppsJOdXNO:# 69
"/usr/lib/gcc/avr/3.4.3/../../../../avr/include/avr/pgmspace.h"
...

Then you can check that pgmspace.h file to see if it's the right one...

David Gay
_______________________________________________
Tinyos-help mailing list
[email protected]
https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to