Hi David & other folks
First up, thanks a lot for your prompt & informative reply
I tried the commands you suggested…here is the output I got
[EMAIL PROTECTED] Blink]$ rm /tmp/nesccpp*
[EMAIL PROTECTED] Blink]$ NESC_KEEP_CPP=1 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
[EMAIL PROTECTED] Blink]$ grep pgmspace.h /tmp/nesccpp*
/tmp/nesccppsl6qbBi:# 1 "/usr/local/avr/include/avr/pgmspace.h" 1 3
/tmp/nesccppsl6qbBi:/* $Id: pgmspace.h,v 1.9 2003/03/17 19:02:16 troth Exp $ */
/tmp/nesccppsl6qbBi: pgmspace.h
/tmp/nesccppsl6qbBi: #include <avr/pgmspace.h>
/tmp/nesccppsl6qbBi:# 62 "/usr/local/avr/include/avr/pgmspace.h" 2 3
/tmp/nesccppsl6qbBi:# 106 "/usr/local/avr/include/avr/pgmspace.h" 3
/tmp/nesccppsl6qbBi:# 119 "/usr/local/avr/include/avr/pgmspace.h" 3
/tmp/nesccppsl6qbBi:# 137 "/usr/local/avr/include/avr/pgmspace.h" 3
/tmp/nesccppsl6qbBi:# 155 "/usr/local/avr/include/avr/pgmspace.h" 3
When I tried installing the avr-libc-1.2.3-1i386.rpm, I was getting this
[EMAIL PROTECTED] atmel_avr_compiler_tools]$ ls -alp
total 23200
drwxr-xr-x 2 spiff spiff 16384 Jul 11 14:26 ./
drwxr-xr-x 8 spiff spiff 16384 Jul 11 14:51 ../
-rwxr-xr-x 1 spiff spiff 242497 Jul 11 14:25 avarice-2.4-1.i386.rpm
-rwxr-xr-x 1 spiff spiff 2427544 Jul 11 14:25 avr-binutils-2.15tinyos-3.i386.rpm
-rwxr-xr-x 1 spiff spiff 5506275 Jul 11 14:26 avr-gcc-3.4.3-1.i386.rpm
-rwxr-xr-x 1 spiff spiff 15072114 Jul 11 14:30 avr-insight-6.3-1.i386.rpm
-rwxr-xr-x 1 spiff spiff 438832 Jul 11 14:25 avr-libc-1.2.3-1.i386.rpm
[EMAIL PROTECTED] atmel_avr_compiler_tools]$ sudo rpm -ivh avr-libc-1.2.3-1.i386.rpm
Preparing... ########################################### [100%]
package avr-libc-20030512cvs-1 (which is newer than avr-libc-1.2.3-1) is already installed
So I used –Uvh –force , which, in hindsight I think was a very very stupid idea on my part.
[EMAIL PROTECTED] atmel_avr_compiler_tools]$ sudo rpm -Uvh --force avr-libc-1.2.3-1.i386.rpm
Preparing... ########################################### [100%]
1:avr-libc ########################################### [100%]
Now, when I try to compile the Blink app, I am getiing a huge huge list of errors :
[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_A M_GROUP=0x7d -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c -board=mica sb -fnesc-dump=wiring -fnesc-dump='interfaces(!abstract())' -fnesc-dump='refere nced(interfacedefs, components)' -fnesc-dumpfile=build/micaz/wiring-check.xml Bl inkAppC.nc -lm
/usr/lib/ncc/nesc_nx.h:16:22: inttypes.h: No such file or directory
<commandline>: failed to preprocess /usr/lib/ncc/nesc_nx.h
/opt/tinyos-2.x/tos/system/tos.h:5:22: inttypes.h: No such file or directory
/opt/tinyos-2.x/tos/system/tos.h:13:20: string.h: No such file or directory
/opt/tinyos-2.x/tos/system/tos.h:14:20: stdlib.h: No such file or directory
/opt/tinyos-2.x/tos/system/tos.h:15:18: math.h: No such file or directory
/opt/tinyos-2.x/tos/system/tos.h:17:19: ctype.h: No such file or directory
<commandline>: failed to preprocess /opt/tinyos-2.x/tos/system/tos.h
In file included from /opt/tinyos-2.x/tos/system/TinySchedulerC.nc:36:
In interface `Scheduler':
/opt/tinyos-2.x/tos/interfaces/Scheduler.nc:54: only commands and events can be defined in interfaces
/opt/tinyos-2.x/tos/interfaces/Scheduler.nc:54: warning: return-type defaults to `int'
/opt/tinyos-2.x/tos/interfaces/Scheduler.nc:54: syntax error before `runNextTask '
In file included from /opt/tinyos-2.x/tos/interfaces/TaskBasic.nc:42,
from /opt/tinyos-2.x/tos/system/TinySchedulerC.nc:37:
In C file:
/opt/tinyos-2.x/tos/types/TinyError.h:46: syntax error before `error_t'
/opt/tinyos-2.x/tos/types/TinyError.h:48: syntax error before `ecombine'
In file included from /opt/tinyos-2.x/tos/system/TinySchedulerC.nc:37:
In interface `TaskBasic':
/opt/tinyos-2.x/tos/interfaces/TaskBasic.nc:56: only commands and events can be defined in interfaces
/opt/tinyos-2.x/tos/interfaces/TaskBasic.nc:56: warning: return-type defaults to `int'
/opt/tinyos-2.x/tos/interfaces/TaskBasic.nc:56: syntax error before `postTask'
In component `TinySchedulerC':
/opt/tinyos-2.x/tos/system/TinySchedulerC.nc:37: syntax error before `uint8_t'
In file included from /opt/tinyos-2.x/tos/platforms/micaz/hardware.h:50,
from /opt/tinyos-2.x/tos/system/SchedulerBasicP.nc:41:
/opt/tinyos-2.x/tos/chips/atm128/atm128hardware.h:44:20: avr/io.h: No such file or directory
In file included from /opt/tinyos-2.x/tos/system/TimerMilliC.nc:40,
from BlinkAppC.nc:46:
<
# And a whole long list of other errors
# I have copied the entire error message in the attached text file
>
…………………………..
…………………………..
…………………………..
…………………………..
…………………………..
…………………………..
…………………………..
…………………………..
In component `TimerMilliP':
/opt/tinyos-2.x/tos/system/TimerMilliP.nc:41: failed to preprocess /opt/tinyos-2 .x/tos/system/MainC.nc
/opt/tinyos-2.x/tos/system/TimerMilliP.nc:42: cannot find `SoftwareInit'
In component `TimerMilliC':
/opt/tinyos-2.x/tos/system/TimerMilliC.nc:44: too many arguments
In component `BlinkAppC':
BlinkAppC.nc:51: cannot find `Boot'
make: *** [exe0] Error 1
I was very excited & hopeful when I saw your post on the mailing list, that at last I would be able to get tinyos successfully installed on my linux box, especially since I spent all of yesterday & today, unsuccessfully I might add, trying to get it to work.
So, right now, I am totally clueless & feeling very
frustrated & desperate.
Should i try to revert back to the earlier version of the avr-libc rpm, avr-libc-20030512cvs-1, which was installed earlier.
If so, can you guide me how i should go about doing this ?
Please help me buddy.
Thanks a ton
Cheers
ashish
p.s David Gay, i have sent the attachment containg the entire error msg to your email (dgay42 AT gmail)as otherwise it was bouncing from the mailing list...apologize for any inconvenience caused as a result
> 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------------------------------->
> 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
/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
