Hi,
Following Konrad's IMote2 Installation Instructions at http://www.eecs.harvard.edu/~konrad/projects/imote2Camera/IMote2-Installation-Instructions.html
, I have tried to setup the toolchain for imote2, the procedure is:
1) update cygwin ( cygwin 1.5.18-1) and tinyos (1.11 and update from cvs )
2) Install Binutils :
$ tar xzvf binutils-2.16.tar.gz
$ mkdir build-binutils; cd build-binutils
$ ../binutils-2.16/configure --target=xscale-elf --prefix=/usr/local
$ make all install 2>&1 | tee make.log
3) Build the bootstrap cross compiler
$ bzip2 -d gcc-3.4.4.tar.bz2; tar xvf gcc-3.4.4
$ mkdir build-gcc; cd build-gcc
$ ../gcc-3.4.4/configure --target=xscale-elf --prefix=/usr/local \
--with-newlib --without-headers --with-gnu-as \
--with-gnu-ld --disable-shared --enable-languages=c
$ make all-gcc install-gcc 2>&1 | tee make.log
4) Build the newlib C runtime library
$ tar xzvf newlib-1.13.0.tar.gz
$ mkdir build-newlib; cd build-newlib
$ ../newlib-1.13/configure --target=xscale-elf --prefix=/usr/local
$ make all install 2>&1 | tee make.log
5) Build the complete cross compiler
$ cd build-gcc && rm -rf *
$ ../gcc-3.4.4/configure --target=xscale-elf --prefix=/usr/local \
--with-gnu-as --with-gnu-ld --enable-languages=c
$ make all install 2>&1 | tee make.log
6) Update nesc to 1.2alpha10 using ./configure ;make all install
7) Verify gcc toolchain is installed correctly for xscale-elf target by a simple C program hello.c
. PASS.
$file hello: ELF 32-bit LSB executable, ARM, version 1 (ARM), statically linked, not stripped
8) Make symbolic links in "/tinyos-1.x/tos/platform":
$ cd $TOSDIR/platform
$ ln -s ../../beta/platform/imote2 imote2
$ ln -s ../../beta/platform/pxa27x pxa27x
t
But when I comiple the basic Blink for imote2, some errors happened,
$ cd $TOSROOT/apps/Blink
$ make imote2
[EMAIL PROTECTED] /opt/tinyos-1.x/apps/Blink
$ make imote2
mkdir -p build/imote2
xscale-elf-gcc -c /opt/tinyos-1.x/tos/platform/pxa27x/../imote2/flash.s /opt/tin
yos-1.x/tos/platform/pxa27x/../imote2/binarymover.s /opt/tinyos-
1.x/tos/platform
/pxa27x/barecrt.s /opt/tinyos-1.x/tos/platform/pxa27x/mmu_table.s /opt/tinyos-1.
x/tos/platform/pxa27x/util.s -o build/imote2/asms.o -mfpu=softfpa
cd /opt/tinyos-1.x/tos/platform/pxa27x/lib; make;
make[1]: Entering directory `/opt/tinyos-1.x/beta/platform/pxa27x/lib'
make[1]: `libimote2.a' is up to date.
make[1]: Leaving directory `/opt/tinyos-1.x/beta/platform/pxa27x/lib'
compiling Blink to a imote2 binary
ncc -o build/imote2/main.exe -O3 -g -I/opt/tinyos-1.x/tos/lib/CC2420Radio -I/opt
/tinyos-1.x/tos/lib/Flash -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -tar
get=imote2 -fnesc-cfile=build/imote2/app.c -board= -DIDENT_PROGRAM_NAME=\"Blink\
" -DIDENT_USER_ID=\"husq\" -DIDENT_HOSTNAME=\"rock\" -DIDENT_USER_HASH=0x560fca0
5L -DIDENT_UNIX_TIME=0x437450f6L -DIDENT_UID_HASH=0x378b94fcL Blink.nc -lm buil
d/imote2/asms.o /opt/tinyos-1.x/tos/platform/pxa27x/lib/profile.o /opt/tinyos-1.
x/tos/platform/pxa27x/lib/queue.o
D:\PROGRA~1\UCB\cygwin\opt\tinyos-1.x\beta\platform\imote2\TrickleM.nc:143: warn
ing: call via function pointer
D:\PROGRA~1\UCB\cygwin\opt\tinyos-1.x\beta\platform\imote2\BluSHM.nc:104: warnin
g: `UartSend.send' called asynchronously from `generalSend'
D:\PROGRA~1\UCB\cygwin\opt\tinyos-1.x\beta\platform\imote2\BluSHM.nc:111:
warnin
g: `USBSend.send' called asynchronously from `generalSend'
D:\PROGRA~1\UCB\cygwin\opt\tinyos-1.x\beta\platform\pxa27x\PXA27XUSBClientM.nc:3
26: warning: `SendVarLenPacket.sendDone' called asynchronously from `USBInterrup
t.fired'
D:\PROGRA~1\UCB\cygwin\opt\tinyos-1.x\beta\platform\pxa27x\PXA27XUSBClientM.nc:3
28: warning: `SendJTPacket.sendDone' called asynchronously from `USBInterrupt.fi
red'
D:\PROGRA~1\UCB\cygwin\opt\tinyos-
1.x\beta\platform\pxa27x\PXA27XUSBClientM.nc:3
31: warning: `BareSendMsg.sendDone' called asynchronously from `USBInterrupt.fir
ed'
D:\PROGRA~1\UCB\cygwin\opt\tinyos-1.x\beta\platform\imote2\PMICM.nc:260: warning
: `Reset.reset' called asynchronously from `PMICInterrupt.fired'
D:\PROGRA~1\UCB\cygwin\opt\tinyos-1.x\beta\platform\imote2\UARTBufferM.nc:193: w
arning: `ReceiveData.receive' called asynchronously from `ByteComm.rxByteReady'
D:\PROGRA~1\UCB\cygwin\opt\tinyos-1.x\beta\platform\imote2\BluSHM.nc:61: warning
: non-atomic accesses to shared variable `OutQueue':
D:\PROGRA~1\UCB\cygwin\opt\tinyos-1.x\beta\platform\imote2\BluSHM.nc:227: warnin
g: non-atomic write
D:\PROGRA~1\UCB\cygwin\opt\tinyos-1.x\beta\platform\imote2\BluSHM.nc:63: warning
: non-atomic accesses to shared variable `trace_modes':
D:\PROGRA~1\UCB\cygwin\opt\tinyos-1.x\beta\platform\imote2\BluSHM.nc:90:
warning
: non-atomic write
D:\PROGRA~1\UCB\cygwin\opt\tinyos-1.x\beta\platform\imote2\BluSHM.nc:94: warning
: non-atomic write
D:\PROGRA~1\UCB\cygwin\opt\tinyos-1.x\beta\platform\imote2\PMICM.nc: In function
`PMICM$startLDOs':
D:\PROGRA~1\UCB\cygwin\opt\tinyos-1.x\beta\platform\imote2\PMICM.nc:155: warning
: unused variable `temp'
/cygdrive/d/DOCUME~1/husq/LOCALS~1/Temp/cciym8UL.s: Assembler messages:
/cygdrive/d/DOCUME~1/husq/LOCALS~1/Temp/cciym8UL.s:1176: Error: invalid literal
constant: pool needs to be closer
/cygdrive/d/DOCUME~1/husq/LOCALS~1/Temp/cciym8UL.s:1176: Error: invalid literal
constant: pool needs to be closer
/cygdrive/d/DOCUME~1/husq/LOCALS~1/Temp/cciym8UL.s:1176: Error: invalid literal
constant: pool needs to be closer
/cygdrive/d/DOCUME~1/husq/LOCALS~1/Temp/cciym8UL.s:1176: Error: invalid literal
constant: pool needs to be closer
make: *** [exe0] Error 1
Could anybody can help on this? Thanks.
Hu siquan
2005-11-11
_______________________________________________ Tinyos-help mailing list [email protected] https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
