A PC .a will probably not link into a MSP (the controller) binary. You'll need to compile your lib with the controller's GCC version, and then put it where the TOS/MSP linker can find it. Unfortunately, I don't know where or how for any of that... It may be as easy as adding the .c files to the CFLAGS in your makefile. Search around this list for messages about including C files with TOS.
MS Rannouna Rania wrote: > Hi, > > Thank you for your Kind response but I can't understand what is the "msp > compiler link > path" .How can I compile for the telos platform? > In fact I have some files (for exemple mrcore.c ....) and I used this > files to create a library called libmiracl.a (I compile using the *gcc > -c -m32 -O2 mrcore.c* and I create the mrcore.o...) I am sure that I > include all the necessary header file. > > Please can you help me more? > Thank you in advance. > Regards, > Rania > > ----- Message transféré ---- > *De :* Michael Schippling <[email protected]> > *À :* Rannouna Rania <[email protected]> > *Cc :* [email protected] > *Envoyé le :* Dimanche, 12 Avril 2009, 20h06mn 41s > *Objet :* Re: [Tinyos-help] Telos Compilation > > Your library is probably not compiled for the telos platform, > and I would guess that it needs to be in the msp compiler link > path which is different from that of the PC. But the errors may > be from a missing header file that goes with this lib. > > MS > > > Rannouna Rania wrote: > > Hi all, > > > > In my application I use functions called from a library, I think that > my library is already linked with my application, In fact when I try to > compile on PC using / make pc /the compilation is done with success but > the problem when I compile on a real mote using /make telosb /the > compiler don't recognize the different functions called from the library > and I have this output : > > > > *$ make telosb* > > *mkdir -p build/telosb* > > * compiling Miller to a telosb binary* > > *ncc -o build/telosb/main.exe -O -I. -Wall -Wshadow > -DDEF_TOS_AM_GROUP=0x7d -Wnes* > > *c-all -target=telosb -fnesc-cfile=build/telosb/app.c -board= > -I%T/lib/Deluge -Wl* > > *,--section-start=.text=0x4800,--defsym=_reset_vector__=0x4000 > -DIDENT_PROGRAM_NA* > > *ME=\"Miller\" -DIDENT_USER_ID=\"rania\" > -DIDENT_HOSTNAME=\"your-01199f19b2\" -DI* > > *DENT_USER_HASH=0x23006c1eL -DIDENT_UNIX_TIME=0x49e19deaL > -DIDENT_UID_HASH=0x851c* > > *8498L -mdisable-hwmul -I/opt/tinyos-1.x/tos/lib/CC2420Radio > Miller.nc -lm -L. -l* > > *miracl* > > */cygdrive/c/DOCUME~1/rania/LOCALS~1/Temp/ccAX72Gw.o(.text+0x556): In > function `M* > > *illerM$StdControl$init':* > > *app.c: undefined reference to `mirsys'* > > > */cygdrive/c/DOCUME~1/rania/LOCALS~1/Temp/ccAX72Gw.o(.text+0x564):app.c: > undefine* > > *d reference to `mirvar_mem'* > > > */cygdrive/c/DOCUME~1/rania/LOCALS~1/Temp/ccAX72Gw.o(.text+0x576):app..c: > undefine* > > *d reference to `mirvar_mem'* > > > */cygdrive/c/DOCUME~1/rania/LOCALS~1/Temp/ccAX72Gw.o(.text+0x588):app.c: > undefine* > > *d reference to `mirvar_mem'* > > > */cygdrive/c/DOCUME~1/rania/LOCALS~1/Temp/ccAX72Gw.o(.text+0x59c):app.c: > undefine* > > *d reference to `mirvar_mem'* > > > */cygdrive/c/DOCUME~1/rania/LOCALS~1/Temp/ccAX72Gw.o(.text+0x5ae):app.c: > undefine* > > *d reference to `mirvar_mem'* > > > */cygdrive/c/DOCUME~1/rania/LOCALS~1/Temp/ccAX72Gw.o(.text+0x5c2):app.c: > more und* > > *efined references to `mirvar_mem' follow* > > */cygdrive/c/DOCUME~1/rania/LOCALS~1/Temp/ccAX72Gw.o(.text+0x622): In > function `M* > > *illerM$StdControl$init':* > > *app.c: undefined reference to `epoint_init_mem'* > > > */cygdrive/c/DOCUME~1/rania/LOCALS~1/Temp/ccAX72Gw.o(.text+0x634):app.c: > undefine* > > *d reference to `epoint_init_mem'* > > > */cygdrive/c/DOCUME~1/rania/LOCALS~1/Temp/ccAX72Gw.o(.text+0x646):app.c: > undefine* > > *d reference to `epoint_init_mem'* > > > */cygdrive/c/DOCUME~1/rania/LOCALS~1/Temp/ccAX72Gw.o(.text+0x65a):app.c: > undefine* > > *d reference to `epoint_init_mem'* > > > */cygdrive/c/DOCUME~1/rania/LOCALS~1/Temp/ccAX72Gw.o(.text+0x66a):app.c: > undefine* > > *d reference to `irand'* > > > */cygdrive/c/DOCUME~1/rania/LOCALS~1/Temp/ccAX72Gw.o(.text+0x67c):app.c: > undefine* > > *d reference to `zero'* > > > */cygdrive/c/DOCUME~1/rania/LOCALS~1/Temp/ccAX72Gw.o(.text+0x6c6):app..c: > undefine* > > *d reference to `mr_lzero'* > > > */cygdrive/c/DOCUME~1/rania/LOCALS~1/Temp/ccAX72Gw.o(.text+0x6ea):app.c: > undefine* > > *d reference to `ecurve2_init'* > > > */cygdrive/c/DOCUME~1/rania/LOCALS~1/Temp/ccAX72Gw.o(.text+0x6fa):app.c: > undefine* > > *d reference to `bigbits'* > > > */cygdrive/c/DOCUME~1/rania/LOCALS~1/Temp/ccAX72Gw.o(.text+0x712):app.c: > undefine* > > *d reference to `mul2_brick'* > > *make: *** [exe0] Error 1* > > * > > * > > Please have you any idea about this problem ? > > > > Best Regards, > > Rania > > > > > > ------------------------------------------------------------------------ > > > > _______________________________________________ > > Tinyos-help mailing list > > [email protected] > <mailto:[email protected]> > > https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help > -- Platform: WinXP/Cygwin TinyOS version: 1.x, Boomerang Programmer: MIB510 Device(s): Mica2, MicaZ, Tmote Sensor board: homebrew _______________________________________________ Tinyos-help mailing list [email protected] https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
