Hello everyone, I just started learning TinyOS and I'm having a problem compiling using *make micaz sim*. Compiling for Micaz and Telosb works.
This is the output from *make micaz sim*: azzu...@greylab:/opt/tinyos-2.1.0/apps/current$ make micaz sim mkdir -p simbuild/micaz placing object files in simbuild/micaz writing XML schema to app.xml compiling UDPTransmissionAppC to object file sim.o ncc -c -shared -fPIC -o simbuild/micaz/sim.o -g -O0 -tossim -fnesc-nido-tosnodes=1000 -fnesc-simulate -fnesc-nido-motenumber=sim_node\(\) -Wall -Wshadow -Wnesc-all -target=micaz -fnesc-cfile=simbuild/micaz/app.c -board=micasb -DDEFINED_TOS_AM_GROUP=0x22 --param max-inline-insns-single=100000 -I/opt/tinyos-2.1.0/tos/lib/printf -I/opt/tinyos-2.1.0/tos/lib/net/6lowpan -D'TOSH_DATA_LENGTH=102' -DIDENT_APPNAME=\"UDPTransmission\" -DIDENT_USERNAME=\"scientist\" -DIDENT_HOSTNAME=\"GreyLab\" -DIDENT_USERHASH=0x88f822e0L -DIDENT_TIMESTAMP=0x49d275aaL -DIDENT_UIDHASH=0x8cf81183L -Wno-nesc-data-race UDPTransmissionAppC.nc -fnesc-dump=components -fnesc-dump=variables -fnesc-dump=constants -fnesc-dump=typedefs -fnesc-dump=interfacedefs -fnesc-dump=tags -fnesc-dumpfile=app.xml /opt/tinyos-2.1.0/tos/lib/net/6lowpan/IP.nc:67:1: warning: "/*" within comment In file included from /opt/tinyos-2.1.0/tos/chips/atm128/timer/Atm128AlarmAsyncC.nc:32, from /opt/tinyos-2.1.0/tos/platforms/mica/AlarmCounterMilliP.nc:33, from /opt/tinyos-2.1.0/tos/platforms/mica/sim/HilTimerMilliC.nc:41, from /opt/tinyos-2.1.0/tos/system/TimerMilliP.nc:41, from /opt/tinyos-2.1.0/tos/system/TimerMilliC.nc:40, from UDPTransmissionAppC.nc:17: In component `Atm128AlarmAsyncP': /opt/tinyos-2.1.0/tos/chips/atm128/timer/Atm128AlarmAsyncP.nc: In function `setInterrupt': /opt/tinyos-2.1.0/tos/chips/atm128/timer/Atm128AlarmAsyncP.nc:102: `OCF0' undeclared (first use in this function) /opt/tinyos-2.1.0/tos/chips/atm128/timer/Atm128AlarmAsyncP.nc:102: (Each undeclared identifier is reported only once /opt/tinyos-2.1.0/tos/chips/atm128/timer/Atm128AlarmAsyncP.nc:102: for each function it appears in.) In file included from /opt/tinyos-2.1.0/tos/lib/net/6lowpan/IPC.nc:33: /opt/tinyos-2.1.0/tos/lib/net/6lowpan/IP_internal.h:256:28: warning: "/*" within comment In file included from /opt/tinyos-2.1.0/tos/lib/net/6lowpan/IPP.nc:99: /opt/tinyos-2.1.0/tos/lib/net/6lowpan/IP_internal.h:256:28: warning: "/*" within comment In file included from /opt/tinyos-2.1.0/tos/lib/net/6lowpan/IPC.nc:49, from UDPTransmissionAppC.nc:20: In component `IPP': /opt/tinyos-2.1.0/tos/lib/net/6lowpan/IPP.nc: In function `lowpan_input': /opt/tinyos-2.1.0/tos/lib/net/6lowpan/IPP.nc:1828: warning: label `frag_overlap' defined but not used /opt/tinyos-2.1.0/tos/lib/net/6lowpan/IPP.nc: In function `UDPClient.sendTo': /opt/tinyos-2.1.0/tos/lib/net/6lowpan/IPP.nc:2090: warning: passing argument 1 of `udp_compressed_output' discards `const' from pointer target type make: *** [sim-exe] Error 1 This is my *Makefile* contents: COMPONENT=UDPTransmissionAppC CFLAGS += -I$(TOSDIR)/lib/printf -I$(TOSDIR)/lib/net/6lowpan include $(MAKERULES) This is my *UDPTransmissionC.nc* ######################################################################## #include "Timer.h" module UDPTransmissionC { uses { interface Leds; interface Boot; interface IP; interface UDPClient; interface SplitControl as RadioControl; interface Timer<TMilli> as SendTimer; } } implementation { char *appMsg = "Hello World"; ip6_addr_t ip_addr = {{ 0xfe,0x80, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0xee,0x99 }}; ip6_addr_t peer_addr = {{ 0xfe,0x80, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x00,0x00, 0x53,0x31, }}; uint16_t udp_port = 9191; uint16_t interval = 250; event void Boot.booted() { call IP.setAddress(&ip_addr); call RadioControl.start(); call SendTimer.startPeriodic(interval); } event void RadioControl.startDone(error_t err) { call UDPClient.listen(udp_port); } event void RadioControl.stopDone(error_t err) {} event void UDPClient.receive(const ip6_addr_t *addr, const uint16_t port, uint8_t *buf, uint16_t len ) { printf("Recieve Message From %x \n" , *addr); printf("Message: %s\n\n", buf); call Leds.led1Toggle(); } event void UDPClient.sendDone(error_t result, void* buf) { call Leds.led1Toggle(); } event void SendTimer.fired(){ printf("Sending Message\n"); call UDPClient.sendTo(&peer_addr, udp_port, appMsg, strlen(appMsg)); call Leds.led0Toggle(); } } ######################################################################### My environment is: *- TinyOS 2.1.0 - ncc: 1.2.4 - nescc: 1.3.0 - gcc: gcc (GCC) 4.2.4 * Hopefully someone can give me some ideas. Thank you in advanced!
_______________________________________________ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help