Dear David,

1)
I've tried making a regular c file which simply calls the external functions with dummy parameters and it worked. At least there were no errors during compilation and linking stages, using ncc, and a executable file was generated. As simply as:
ncc test.c MYLIB.o -o test.exe

2)
I put -v there, but there was nothing special. The result is like:
--------------------------------------------------------------------------------
/usr/local/bin/nescc -DPLATFORM_PC -DBOARD_MICASB -fnesc-include=tos -topdir=/opt/tinyos-1.x -o build/pc/main.exe MYLIB.o -g -O0 -pthread -fnesc-nido-tosnodes=1000 -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -Wnesc-all -fnesc-cfile=build/pc/app.c -DIDENT_PROGRAM_NAME=Blink -DIDENT_PROGRAM_NAME_BYTES=66,108,105,110,107,0 -DIDENT_USER_ID=admin -DIDENT_USER_ID_BYTES=97,100,109,105,110,0 -DIDENT_HOSTNAME=c430pc2 -DIDENT_HOSTNAME_BYTES=99,52,51,48,112,99,50,0 -DIDENT_USER_HASH=0x43d304f7L -DIDENT_UNIX_TIME=0x46faac4cL Blink.nc -lm -v -fnesc-target=pc -I/opt/tinyos-1.x/tos/sensorboards/micasb -I/opt/tinyos-1.x/tos/platform/pc -I/opt/tinyos-1.x/tos/interfaces -I/opt/tinyos-1.x/tos/types -I/opt/tinyos-1.x/tos/system gcc -specs=/usr/local/lib/ncc/tdspecs -DPLATFORM_PC -DBOARD_MICASB -_fnesc-include=tos -o build/pc/main.exe MYLIB.o -g -O0 -pthread -_fnesc-nido-tosnodes=1000 -Wall -Wshadow -DDEF_TOS_AM_GROUP=0x7d -_Wnesc-all -_fnesc-cfile=build/pc/app.c -DIDENT_PROGRAM_NAME=Blink -DIDENT_PROGRAM_NAME_BYTES=66,108,105,110,107,0 -DIDENT_USER_ID=admin -DIDENT_USER_ID_BYTES=97,100,109,105,110,0 -DIDENT_HOSTNAME=c430pc2 -DIDENT_HOSTNAME_BYTES=99,52,51,48,112,99,50,0 -DIDENT_USER_HASH=0x43d304f7L -DIDENT_UNIX_TIME=0x46faac4cL Blink.nc -lm -v -_fnesc-target=pc -I/opt/tinyos-1.x/tos/sensorboards/micasb -I/opt/tinyos-1.x/tos/platform/pc -I/opt/tinyos-1.x/tos/interfaces -I/opt/tinyos-1.x/tos/types -I/opt/tinyos-1.x/tos/system -DNESC=112
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/specs
Reading specs from /usr/local/lib/ncc/tdspecs
Configured with: /gcc/gcc-3.3.3-3/configure --verbose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,java,objc,pascal --enable-nls --without-included-gettext --enable-libgcj --with-system-zlib --enable-interpreter --enable-threads=posix --enable-java-gc=boehm --enable-sjlj-exceptions --disable-version-specific-runtime-libs --disable-win32-registry
Thread model: posix
gcc version 3.3.3 (cygwin special)
perl -S nesc-compile -_fnesc-include=tos -_fnesc-nido-tosnodes=1000 -_Wnesc-all -_fnesc-cfile=build/pc/app.c -_fnesc-target=pc -DPLATFORM_PC -DBOARD_MICASB -DDEF_TOS_AM_GROUP=0x7d -DIDENT_PROGRAM_NAME=Blink -DIDENT_PROGRAM_NAME_BYTES=66,108,105,110,107,0 -DIDENT_USER_ID=admin -DIDENT_USER_ID_BYTES=97,100,109,105,110,0 -DIDENT_HOSTNAME=c430pc2 -DIDENT_HOSTNAME_BYTES=99,52,51,48,112,99,50,0 -DIDENT_USER_HASH=0x43d304f7L -DIDENT_UNIX_TIME=0x46faac4cL -DNESC=112 -I/opt/tinyos- 1.x/tos/sensorboards/micasb -I/opt/tinyos-1.x/tos/platform/pc -I/opt/tinyos-1.x/tos/interfaces -I/opt/tinyos-1.x/tos/types -I/opt/tinyos-1.x/tos/system -g -O0 -Wall -Wshadow -v -pthread -o /tmp/ccSNzP9T.o Blink.nc nesc1 -_fnesc-include=tos -_fnesc-nido-tosnodes=1000 -_Wnesc-all -_fnesc-target=pc -DPLATFORM_PC -DBOARD_MICASB -DDEF_TOS_AM_GROUP=0x7d -DIDENT_PROGRAM_NAME=Blink -DIDENT_PROGRAM_NAME_BYTES=66,108,105,110,107,0 -DIDENT_USER_ID=admin -DIDENT_USER_ID_BYTES=97,100,109,105,110,0 -DIDENT_HOSTNAME=c430pc2 -DIDENT_HOSTNAME_BYTES=99,52,51,48,112,99,50,0 -DIDENT_USER_HASH=0x43d304f7L -DIDENT_UNIX_TIME=0x46faac4cL -DNESC=112 -I/opt/tinyos- 1.x/tos/sensorboards/micasb -I/opt/tinyos-1.x/tos/platform/pc -I/opt/tinyos-1.x/tos/interfaces -I/opt/tinyos-1.x/tos/types -I/opt/tinyos-1.x/tos/system -Wall -Wshadow -v -pthread Blink.nc -o build/pc/app.c
preprocessing /opt/tinyos-1.x/tos/system/tos.h
preprocessing Blink.nc
preprocessing /opt/tinyos-1.x/tos/platform/pc/Main.nc
preprocessing /opt/tinyos-1.x/tos/types/AM.h
preprocessing /opt/tinyos- 1.x/tos/platform/pc/PCRadio.h
preprocessing /opt/tinyos-1.x/tos/interfaces/StdControl.nc
preprocessing /opt/tinyos-1.x/tos/platform/pc/Nido.nc
preprocessing /opt/tinyos-1.x/tos/platform/pc/nido.h
preprocessing /opt/tinyos- 1.x/tos/interfaces/ReceiveMsg.nc
preprocessing /opt/tinyos-1.x/tos/interfaces/BareSendMsg.nc
preprocessing /opt/tinyos-1.x/tos/interfaces/Pot.nc
preprocessing /opt/tinyos-1.x/tos/platform/pc/PowerState.nc
preprocessing /opt/tinyos- 1.x/tos/system/PotC.nc
preprocessing /opt/tinyos-1.x/tos/system/PotM.nc
preprocessing /opt/tinyos-1.x/tos/interfaces/HPLPot.nc
preprocessing /opt/tinyos-1.x/tos/platform/pc/HPLPotC.nc
preprocessing /opt/tinyos- 1.x/tos/platform/pc/PowerStateM.nc
preprocessing /opt/tinyos-1.x/tos/platform/pc/powermod.h
preprocessing /opt/tinyos-1.x/tos/sensorboards/micasb/sensorboard.h
preprocessing BlinkM.nc
preprocessing mylib.h
preprocessing /opt/tinyos-1.x/tos/interfaces/Timer.nc
preprocessing /opt/tinyos-1.x/tos/interfaces/Timer.h
preprocessing /opt/tinyos-1.x/tos/interfaces/Leds.nc
preprocessing SingleTimer.nc
preprocessing /opt/tinyos- 1.x/tos/platform/pc/TimerC.nc
preprocessing /opt/tinyos-1.x/tos/system/TimerM.nc
preprocessing /opt/tinyos-1.x/tos/interfaces/Clock.nc
preprocessing /opt/tinyos-1.x/tos/interfaces/Clock.h
preprocessing /opt/tinyos- 1.x/tos/interfaces/PowerManagement.nc
preprocessing /opt/tinyos-1.x/tos/system/ClockC.nc
preprocessing /opt/tinyos-1.x/tos/platform/pc/HPLClock.nc
preprocessing /opt/tinyos-1.x/tos/system/NoLeds.nc
preprocessing /opt/tinyos- 1.x/tos/platform/pc/HPLPowerManagementM.nc
preprocessing /opt/tinyos-1.x/tos/platform/pc/LedsC.nc
preprocessing /opt/tinyos-1.x/tos/platform/pc/LedsM.nc
gcc -B/usr/local/lib/ncc -g -O0 -Wall -Wshadow -v -pthread -o /tmp/ccSNzP9T.o -c -fdollars-in-identifiers build/pc/app.c
Reading specs from /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/specs
gcc: unrecognized option `-pthread'
Configured with: /gcc/gcc-3.3.3-3/configure --verbose --prefix=/usr --exec-prefix=/usr --sysconfdir=/etc --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --enable-languages=c,ada,c++,d,f77,java,objc,pascal --enable-nls --without-included-gettext --enable-libgcj --with-system-zlib --enable-interpreter --enable-threads=posix --enable-java-gc=boehm --enable-sjlj-exceptions --disable-version-specific-runtime-libs --disable-win32-registry
Thread model: posix
gcc version 3.3.3 (cygwin special)
/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/cc1.exe -quiet -v -isystem /usr/local/lib/ncc/include -D__GNUC__=3 -D__GNUC_MINOR__=3 -D__GNUC_PATCHLEVEL__=3 -D__CYGWIN32__ -D__CYGWIN__ -Dunix -D__unix__ -D__unix -idirafter /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../../include/w32api -idirafter /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../../i686-pc-cygwin/lib/../../include/w32api build/pc/app.c -quiet -dumpbase app.c -auxbase-strip /tmp/ccSNzP9T.o -g -O0 -Wall -Wshadow -version -fdollars-in-identifiers -o /tmp/ccFUyWYq.s
ignoring nonexistent directory "/usr/local/lib/ncc/include"
GNU C version 3.3.3 (cygwin special) (i686-pc-cygwin)
    compiled by GNU C version 3.3.3 (cygwin special).
GGC heuristics: --param ggc-min-expand=47 --param ggc-min-heapsize=32641
ignoring nonexistent directory "/usr/i686-pc-cygwin/include"
ignoring duplicate directory "/usr/i686-pc-cygwin/lib/../../include/w32api"
#include "..." search starts here:
#include <...> search starts here:
 /usr/local/include
 /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/include
 /usr/include
 /usr/include/w32api
End of search list.
C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/pc/PowerStateM.nc: In function `__nesc_nido_initialise': C:/PROGRA~1/UCB/cygwin/opt/tinyos-1.x/tos/platform/pc/PowerStateM.nc:478: warning: passing arg 1 of `memset' discards qualifiers from pointer target type /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../../i686-pc-cygwin/bin/as.exe --traditional-format -o /tmp/ccSNzP9T.o /tmp/ccFUyWYq.s /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/collect2.exe -Bdynamic --dll-search-prefix=cyg -o build/pc/main.exe /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../crt0.o /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/crtbegin.o -L/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3 -L/usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../.. MYLIB.o /tmp/ccSNzP9T.o -lm -lgcc -lcygwin -luser32 -lkernel32 -ladvapi32 -lshell32 -lgcc /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/crtend.o /usr/lib/gcc-lib/i686-pc-cygwin/3.3.3/../../../../i686-pc-cygwin/bin/ld: MYLIB.o: Relocations in generic ELF (EM: 83)
MYLIB.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [exe0] Error 1
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Where can I find the useful info about the wrong format?

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

Reply via email to