Thanks for looking into it Phil, here is what 
avr-objdump -t build/micaz/sim.o 
produces.

I am sorry but actually I can hardly grasp at what I am looking. 
But it appears that the sim.o object file is in elf32-avr format and
tossim.o and pytossim.o both in elf32-little. But where is the
difference ? When I call make micaz sim I get some different errors on
top. I appended the output of that call to the end.


Marek

build/micaz/sim.o:     file format elf32-avr

SYMBOL TABLE:
00000000 l    df *ABS*  00000000 app.c
00000000 l    d  .text  00000000
00000000 l    d  .data  00000000
00000000 l    d  .bss   00000000
0000003f l       *ABS*  00000000 __SREG__
0000003e l       *ABS*  00000000 __SP_H__
0000003d l       *ABS*  00000000 __SP_L__
00000000 l       *ABS*  00000000 __tmp_reg__
00000001 l       *ABS*  00000000 __zero_reg__
00000034 l     F .text  00000010 __nesc_disable_interrupt
00000c0c l     F .text  00000012 RealMainP$Scheduler$init
0000077e l     F .text  00000030 RealMainP$PlatformInit$init
0000074e l     F .text  00000030 RealMainP$Scheduler$runNextTask
000005c0 l     F .text  00000030 RealMainP$SoftwareInit$init
000005b0 l     F .text  00000010 __nesc_enable_interrupt
000004b8 l     F .text  00000012 RealMainP$Boot$booted
000000ba l     F .text  00000012 RealMainP$Scheduler$taskLoop
000000cc l     F .text  0000003a SchedulerBasicP$Scheduler$taskLoop
000003ce l     F .text  000000ea SchedulerBasicP$popTask
00000186 l     F .text  00000012 SchedulerBasicP$McuSleep$sleep
00000106 l     F .text  00000058 SchedulerBasicP$TaskBasic$runTask
00001aee l     F .text  00000066 AlarmToTimerC$0$fired$runTask
00000cb4 l     F .text  00000154 VirtualizeTimerC$0$updateFromTimer
$runTask
0000015e l     F .text  00000028 SchedulerBasicP$TaskBasic$default
$runTask
00000198 l     F .text  00000086 McuSleepC$McuSleep$sleep
0000031c l     F .text  00000030 McuSleepC$McuPowerOverride$lowestState
0000025e l     F .text  000000be McuSleepC$getPowerState
0000021e l     F .text  00000040 mcombine
0000034c l     F .text  00000082 HplAtm128Timer0AsyncP$McuPowerOverride
$lowestState
000004ca l     F .text  00000032 BlinkC$Boot$booted
00000574 l     F .text  0000003c BlinkC$Timer0$startPeriodic
00000538 l     F .text  0000003c BlinkC$Timer1$startPeriodic
000004fc l     F .text  0000003c BlinkC$Timer2$startPeriodic
00001c52 l     F .text  00000058 VirtualizeTimerC$0$Timer$startPeriodic
000005f0 l     F .text  00000052 Atm128AlarmAsyncP$0$Init$init
00000724 l     F .text  00000012 Atm128AlarmAsyncP$0$TimerAsync
$setTimer0Asynchronous
000006c8 l     F .text  0000002e Atm128AlarmAsyncP$0$TimerCtrl
$setControl
0000066c l     F .text  0000002e Atm128AlarmAsyncP$0$Compare$set
00000642 l     F .text  00000012 Atm128AlarmAsyncP$0$Compare$start
000017cc l     F .text  000001ac Atm128AlarmAsyncP$0$setInterrupt
00000654 l     F .text  00000018 HplAtm128Timer0AsyncP$Compare$start
0000069a l     F .text  0000002e HplAtm128Timer0AsyncP$Compare$set
000006f6 l     F .text  0000002e HplAtm128Timer0AsyncP$TimerCtrl
$setControl
00000736 l     F .text  00000018 HplAtm128Timer0AsyncP$TimerAsync
$setTimer0Asynchronous
00000c64 l     F .text  00000050 SchedulerBasicP$Scheduler$runNextTask
000007ae l     F .text  00000056 PlatformP$Init$init
00000a82 l     F .text  00000030 PlatformP$MeasureClock$init
00000862 l     F .text  0000003e PlatformP$MoteInit$init
00000818 l     F .text  0000004a ecombine
00000804 l     F .text  00000014 PlatformP$power_init
0000095c l     F .text  0000002a LedsP$Init$init
000008a0 l     F .text  00000026 MotePlatformP$PlatformInit$init
00000932 l     F .text  00000012 MotePlatformP$SerialIdPin$makeInput
00000908 l     F .text  00000012 MotePlatformP$SerialIdPin$clr
000008c6 l     F .text  00000030 MotePlatformP$SubInit$init
000008f6 l     F .text  00000012 MotePlatformP$SubInit$default$init
0000091a l     F .text  00000018 HplAtm128GeneralIOPinP$4$IO$clr
00000944 l     F .text  00000018 HplAtm128GeneralIOPinP$4$IO$makeInput
00000a58 l     F .text  00000012 LedsP$Led0$makeOutput
00000a2e l     F .text  00000012 LedsP$Led1$makeOutput
00000a04 l     F .text  00000012 LedsP$Led2$makeOutput
000009da l     F .text  00000012 LedsP$Led0$set
000009b0 l     F .text  00000012 LedsP$Led1$set
00000986 l     F .text  00000012 LedsP$Led2$set
00000998 l     F .text  00000018 HplAtm128GeneralIOPinP$0$IO$set
000009c2 l     F .text  00000018 HplAtm128GeneralIOPinP$1$IO$set
000009ec l     F .text  00000018 HplAtm128GeneralIOPinP$2$IO$set
00000a16 l     F .text  00000018 HplAtm128GeneralIOPinP$0$IO$makeOutput
00000a40 l     F .text  00000018 HplAtm128GeneralIOPinP$1$IO$makeOutput
00000a6a l     F .text  00000018 HplAtm128GeneralIOPinP$2$IO$makeOutput
00000ab2 l     F .text  0000015a MeasureClockC$Init$init
00000c1e l     F .text  00000046 SchedulerBasicP$Scheduler$init
00000fe0 l     F .text  00000042 VirtualizeTimerC$0$TimerFrom$getNow
00000f6c l     F .text  00000012 VirtualizeTimerC$0$TimerFrom$stop
00001248 l     F .text  00000116 VirtualizeTimerC$0$fireTimers
00000e08 l     F .text  0000004a VirtualizeTimerC$0$TimerFrom
$startOneShotAt
00000e52 l     F .text  00000050 AlarmToTimerC$0$Timer$startOneShotAt
00000ea2 l     F .text  00000080 AlarmToTimerC$0$start
00000f22 l     F .text  0000004a AlarmToTimerC$0$Alarm$startAt
00001734 l     F .text  00000098 Atm128AlarmAsyncP$0$Alarm$startAt
00000f7e l     F .text  00000012 AlarmToTimerC$0$Timer$stop
00000f90 l     F .text  00000012 AlarmToTimerC$0$Alarm$stop
00000fa2 l     F .text  0000003e Atm128AlarmAsyncP$0$Alarm$stop
00001022 l     F .text  0000001a AlarmToTimerC$0$Timer$getNow
0000103c l     F .text  00000042 AlarmToTimerC$0$Alarm$getNow
0000107e l     F .text  0000001a Atm128AlarmAsyncP$0$Alarm$getNow
00001098 l     F .text  000000e8 Atm128AlarmAsyncP$0$Counter$get
00001204 l     F .text  00000030 Atm128AlarmAsyncP$0$Timer$get
000011c4 l     F .text  0000002e Atm128AlarmAsyncP$0$TimerCtrl
$getInterruptFlag
00001180 l     F .text  00000030 Atm128AlarmAsyncP$0$Compare$get
000011b0 l     F .text  00000014 HplAtm128Timer0AsyncP$Compare$get
000011f2 l     F .text  00000012 HplAtm128Timer0AsyncP$TimerCtrl
$getInterruptFlag
00001234 l     F .text  00000014 HplAtm128Timer0AsyncP$Timer$get
00001390 l     F .text  00000074 VirtualizeTimerC$0$Timer$fired
0000135e l     F .text  00000032 VirtualizeTimerC$0$updateFromTimer
$postTask
000015be l     F .text  0000004e SchedulerBasicP$TaskBasic$postTask
00001538 l     F .text  00000012 BlinkC$Timer0$fired
000014b2 l     F .text  00000012 BlinkC$Timer1$fired
0000142c l     F .text  00000012 BlinkC$Timer2$fired
00001404 l     F .text  00000028 VirtualizeTimerC$0$Timer$default$fired
0000143e l     F .text  00000012 BlinkC$Leds$led2Toggle
00001450 l     F .text  00000012 LedsP$Leds$led2Toggle
00001462 l     F .text  00000012 LedsP$Led2$toggle
00001474 l     F .text  0000003e HplAtm128GeneralIOPinP$0$IO$toggle
000014c4 l     F .text  00000012 BlinkC$Leds$led1Toggle
000014d6 l     F .text  00000012 LedsP$Leds$led1Toggle
000014e8 l     F .text  00000012 LedsP$Led1$toggle
000014fa l     F .text  0000003e HplAtm128GeneralIOPinP$1$IO$toggle
0000154a l     F .text  00000012 BlinkC$Leds$led0Toggle
0000155c l     F .text  00000012 LedsP$Leds$led0Toggle
0000156e l     F .text  00000012 LedsP$Led0$toggle
00001580 l     F .text  0000003e HplAtm128GeneralIOPinP$2$IO$toggle
0000160c l     F .text  000000b2 SchedulerBasicP$pushTask
000016be l     F .text  00000076 SchedulerBasicP$isWaiting
000019ce l     F .text  000000d2 Atm128AlarmAsyncP$0$setOcr0
00001978 l     F .text  00000012 Atm128AlarmAsyncP$0$Alarm$fired
0000198a l     F .text  00000012 AlarmToTimerC$0$Alarm$fired
0000199c l     F .text  00000032 AlarmToTimerC$0$fired$postTask
00001aa0 l     F .text  00000032 Atm128AlarmAsyncP$0$TimerAsync
$compareBusy
00001ad2 l     F .text  0000001c HplAtm128Timer0AsyncP$TimerAsync
$compareBusy
00001b84 l     F .text  00000042 AlarmToTimerC$0$Alarm$getAlarm
00001b54 l     F .text  00000012 AlarmToTimerC$0$Timer$fired
00001b66 l     F .text  0000001e VirtualizeTimerC$0$TimerFrom$fired
00001bc6 l     F .text  0000008c Atm128AlarmAsyncP$0$Alarm$getAlarm
00001caa l     F .text  000000be VirtualizeTimerC$0$startTimer
00001ecc l     F .text  00000026 HplAtm128Timer0AsyncP$stabiliseTimer0
00001dc0 l     F .text  00000012 HplAtm128Timer0AsyncP$Compare$fired
00001dd2 l     F .text  000000da Atm128AlarmAsyncP$0$Compare$fired
00001eac l     F .text  00000012 Atm128AlarmAsyncP$0$Counter$overflow
00001ebe l     F .text  0000000e CounterToLocalTimeC$0$Counter$overflow
00001f4a l     F .text  00000012 HplAtm128Timer0AsyncP$Timer$overflow
00001f5c l     F .text  0000000e Atm128AlarmAsyncP$0$Timer$overflow
00001f6a l     F .text  000002ec __nesc_nido_resolve
00002256 l     F .text  00000180 __nesc_nido_initialise
00000000 l    d  .progmem.data  00000000
000023d6 l       .text  00000000 Letext
00000000 l    d  .stab  00000000
00000000 l    d  .stabstr       00000000
00000000         *UND*  00000000 __do_copy_data
00000000         *UND*  00000000 __do_clear_bss
00000000 g     F .text  00000034 __nesc_atomic_start
00000044 g     F .text  0000002e __nesc_atomic_end
00000072 g     F .text  00000048 main
00000000         *UND*  00000000 __stack
00000000         *UND*  00000000 exit
00000000         *UND*  00000000 sim_node
00000000 g     O .progmem.data  00001770 McuSleepC$atm128PowerBits
000003e8       O *COM*  00000001 SchedulerBasicP$m_head
000007d0       O *COM*  00000001 SchedulerBasicP$m_next
000003e8       O *COM*  00000001 SchedulerBasicP$m_tail
000007d0       O *COM*  00000001 MeasureClockC$cycles
00000000         *UND*  00000000 memset
00006978       O *COM*  00000001 VirtualizeTimerC$0$m_timers
00000fa0       O *COM*  00000001 AlarmToTimerC$0$m_dt
000003e8       O *COM*  00000001 AlarmToTimerC$0$m_oneshot
000003e8       O *COM*  00000001 Atm128AlarmAsyncP$0$set
00000fa0       O *COM*  00000001 Atm128AlarmAsyncP$0$base
00000fa0       O *COM*  00000001 Atm128AlarmAsyncP$0$t0
00000fa0       O *COM*  00000001 Atm128AlarmAsyncP$0$dt
00001d68 g     F .text  00000058 __vector_15
00001ef2 g     F .text  00000058 __vector_16
00000000         *UND*  00000000 strcmp
00000000         *UND*  00000000 memcp


 make micaz sim mkdir -p build/micaz   placing object files in
build/micaz
  writing XML schema to app.xml
  compiling BlinkAppC to object file sim.o
ncc -c -shared -fPIC -o build/micaz/sim.o -g -O0 -tossim
-fnesc-nido-tosnodes=1000 -fnesc-simulate
-fnesc-nido-motenumber=sim_node\(\)   -finline-limit=100000 -Wall
-Wshadow -Wnesc-all -target=micaz -fnesc-cfile=build/micaz/app.c
-board=micasb  -Wno-nesc-data-race BlinkAppC.nc   -fnesc-dump=components
-fnesc-dump=variables -fnesc-dump=constants -fnesc-dump=typedefs
-fnesc-dump=interfacedefs -fnesc-dump=tags -fnesc-dumpfile=app.xml
avr-gcc: unrecognized option `-shared'
avr-gcc: unrecognized option `-tossim'
/data/hiwi/tinyos/tinyos-2.x/tos/system/SchedulerBasicP.nc: In function
`SchedulerBasicP$Scheduler$init':
/data/hiwi/tinyos/tinyos-2.x/tos/system/SchedulerBasicP.nc:117: warning:
implicit declaration of function `sim_node'
/data/hiwi/tinyos/tinyos-2.x/tos/chips/atm128/timer/HplAtm128Timer0AsyncP.nc: 
In function `__nesc_nido_resolve':
/data/hiwi/tinyos/tinyos-2.x/tos/chips/atm128/timer/HplAtm128Timer0AsyncP.nc:322:
 warning: implicit declaration of function `strcmp'
/data/hiwi/tinyos/tinyos-2.x/tos/chips/atm128/timer/HplAtm128Timer0AsyncP.nc: 
In function `__nesc_nido_initialise':
/data/hiwi/tinyos/tinyos-2.x/tos/chips/atm128/timer/HplAtm128Timer0AsyncP.nc:553:
 warning: passing arg 1 of `memset' discards qualifiers from pointer target type
/data/hiwi/tinyos/tinyos-2.x/tos/chips/atm128/timer/HplAtm128Timer0AsyncP.nc:554:
 warning: passing arg 1 of `memset' discards qualifiers from pointer target type
/data/hiwi/tinyos/tinyos-2.x/tos/chips/atm128/timer/HplAtm128Timer0AsyncP.nc:558:
 warning: implicit declaration of function `memcpy'
/data/hiwi/tinyos/tinyos-2.x/tos/chips/atm128/timer/HplAtm128Timer0AsyncP.nc: 
At top 
level:/data/hiwi/tinyos/tinyos-2.x/tos/chips/atm128/timer/HplAtm128Timer0AsyncP.nc:194:
 warning: '__nesc_nido_resolve' defined but not used
/data/hiwi/tinyos/tinyos-2.x/tos/chips/atm128/timer/HplAtm128Timer0AsyncP.nc:420:
 warning: '__nesc_nido_initialise' defined but not used
  compiling Python support and C libraries into pytossim.o, tossim.o,
and c-support.o
g++ -c  -shared -fPIC -o build/micaz/pytossim.o -g
-O0  /data/hiwi/tinyos/tinyos-2.x/tos/lib/tossim/tossim_wrap.cxx
-I/usr/include/python2.5 -I/data/hiwi/tinyos/tinyos-2.x/tos/lib/tossim
-DHAVE_CONFIG_H
g++ -c  -shared -fPIC -o build/micaz/tossim.o -g
-O0  /data/hiwi/tinyos/tinyos-2.x/tos/lib/tossim/tossim.c
-I/usr/include/python2.5 -I/data/hiwi/tinyos/tinyos-2.x/tos/lib/tossim
g++ -c  -shared -fPIC -o build/micaz/c-support.o -g
-O0  /data/hiwi/tinyos/tinyos-2.x/tos/lib/tossim/hashtable.c
-I/usr/include/python2.5 -I/data/hiwi/tinyos/tinyos-2.x/tos/lib/tossim
  linking into shared object ./_TOSSIMmodule.so
g++ -shared -fPIC  build/micaz/pytossim.o build/micaz/sim.o
build/micaz/tossim.o build/micaz/c-support.o -lstdc++  -o
_TOSSIMmodule.so
/usr/bin/ld: build/micaz/sim.o: Relocations in generic ELF (EM: 83)
/usr/bin/ld: build/micaz/sim.o: Relocations in generic ELF (EM: 83)
build/micaz/sim.o: could not read symbols: File in wrong format
collect2: ld returned 1 exit status
make: *** [sim-exe] Fehler 1



Am Dienstag, den 05.06.2007, 10:07 -0700 schrieb Philip Levis:
> On Jun 5, 2007, at 9:37 AM, Marek Jawurek wrote:
> 
> > Well to me it doesn't look like a Problem with the tmote target but  
> > with
> > linking the python libs together. I tried it with : make micaz sim
> > but it produces the same result, (just the linker output):
> >
> >   linking into shared object ./_TOSSIMmodule.so
> > g++ -shared -fPIC  build/micaz/pytossim.o build/micaz/sim.o
> > build/micaz/tossim.o build/micaz/c-support.o -lstdc++  -o
> > _TOSSIMmodule.so
> > /usr/bin/ld: build/micaz/sim.o: Relocations in generic ELF (EM: 83)
> > /usr/bin/ld: build/micaz/sim.o: Relocations in generic ELF (EM: 83)
> > build/micaz/sim.o: could not read symbols: File in wrong format
> > collect2: ld returned 1 exit status
> > make: *** [sim-exe] Fehler 1
> 
> It looks like sim.o isn't being compiled properly. Is it compiling an  
> avr object file? Try using objdump (or avr-objdump) to figure out  
> what's going on.
> 
> Phil
> _______________________________________________
> Tinyos-help mailing list
> [email protected]
> https://mail.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
-- 
Marek Jawurek <[EMAIL PROTECTED]>

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

Reply via email to