Adil Amjad | 24 Jun 2012 14:14
Picon

udp-stream errors

Hello all,

I have updated the latest contiki source tree using  git clone git://contiki.git.sourceforge.net/gitroot/contiki/contiki  

This has added a new folder udp-stream in the examples folder. When I compile it I get the following warnings and errors.


user <at> ubuntu:~/contiki/examples/udp-stream$ make
msp430-gcc -DPROJECT_CONF_H=\"project-conf.h\" -DCONTIKI=1 -DCONTIKI_TARGET_SKY=1 -DUIP_CONF_IPV6=1 -DUIP_CONF_IPV6_RPL=1 -DWITH_UIP6=1 -Os -fno-strict-aliasing -ffunction-sections -Wall -mmcu=msp430f1611 -g   -I. -I../../platform/sky/. -I../../platform/sky/dev -I../../platform/sky/apps -I../../platform/sky/net -I../../cpu/msp430/f1xxx -I../../cpu/msp430/. -I../../cpu/msp430/dev -I../../core/dev -I../../core/lib -I../../core/net -I../../core/net/mac -I../../core/net/rime -I../../core/net/rpl -I../../core/sys -I../../core/cfs -I../../core/ctk -I../../core/lib/ctk -I../../core/loader -I../../core/. -I../../apps/servreg-hack -I../../platform/sky/ -DCONTIKI_VERSION_STRING=\"Contiki-2.5-release-663-g51b7312\" -DAUTOSTART_ENABLE -c udp-stream.c -o udp-stream.co
udp-stream.c: In function ‘set_global_address’:
udp-stream.c:82:3: warning: implicit declaration of function ‘printf’
udp-stream.c:82:3: warning: incompatible implicit declaration of built-in function ‘printf’
udp-stream.c:87:7: warning: implicit declaration of function ‘uip_debug_ipaddr_print’
udp-stream.c: In function ‘create_rpl_dag’:
udp-stream.c:104:5: warning: passing argument 1 of ‘rpl_set_root’ makes integer from pointer without a cast
../../core/./net/rpl/rpl.h:233:12: note: expected ‘uint8_t’ but argument is of type ‘union uip_ipaddr_t *’
udp-stream.c:104:5: error: too few arguments to function ‘rpl_set_root’
../../core/./net/rpl/rpl.h:233:12: note: declared here
udp-stream.c:105:5: warning: implicit declaration of function ‘rpl_get_dag’
udp-stream.c:105:23: error: ‘RPL_ANY_INSTANCE’ undeclared (first use in this function)
udp-stream.c:105:23: note: each undeclared identifier is reported only once for each function it appears in
udp-stream.c:108:5: warning: incompatible implicit declaration of built-in function ‘printf’
udp-stream.c:110:5: warning: incompatible implicit declaration of built-in function ‘printf’
udp-stream.c: In function ‘receiver’:
udp-stream.c:126:5: warning: incompatible implicit declaration of built-in function ‘printf’
udp-stream.c: In function ‘send_stream’:
udp-stream.c:137:3: warning: implicit declaration of function ‘memset’
udp-stream.c:137:3: warning: incompatible implicit declaration of built-in function ‘memset’
udp-stream.c: In function ‘process_thread_udpstream_process’:
udp-stream.c:154:3: warning: incompatible implicit declaration of built-in function ‘printf’
make: *** [udp-stream.co] Error 1
user <at> ubuntu:~/contiki/examples/udp-stream$ 

 The warnings are minor such as printf that can be fixed just by including stdio.h but the errors are tough, especially the ones regarding RPL. It seems that there is a version mismatch. Can someone please guide?

Best Regards,
Adil  

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Contiki-developers mailing list
Contiki-developers@...
https://lists.sourceforge.net/lists/listinfo/contiki-developers
David Kopf | 24 Jun 2012 21:38
Gravatar

Re: udp-stream errors

RPL has changed quite a bit since that folder was added. It looks to be a 
simple matter of replacing the rpl_set_root method with the one in 
/examples/ipv6/rpl-udp

uip_ds6_addr_add(&ipaddr, 0, ADDR_MANUAL);
root_if = uip_ds6_addr_lookup(&ipaddr);
if(root_if != NULL) {
  rpl_dag_t *dag;
  dag = rpl_set_root(RPL_DEFAULT_INSTANCE,(uip_ip6addr_t *)&ipaddr);
  uip_ip6addr(&ipaddr, 0xaaaa, 0, 0, 0, 0, 0, 0, 0);
  rpl_set_prefix(dag, &ipaddr, 64);
  PRINTF("created a new RPL dag\n");
} else {
  PRINTF("failed to create a new RPL DAG\n");
}

Since you have a git clone you can easily back the head to when that folder 
was added at commit dd8576830efd6630e52ffa7758db204741e6dae5. You would lose 
the lollipop counter and other changes designed to make the mesh adapt more 
quickly to changing topology.

-----Original Message----- 
From: Adil Amjad
Sent: Sunday, June 24, 2012 8:14 AM
To: Contiki developer mailing list
Subject: [Contiki-developers] udp-stream errors

Hello all,

I have updated the latest contiki source tree using  git clone 
git://contiki.git.sourceforge.net/gitroot/contiki/contiki

This has added a new folder udp-stream in the examples folder. When I 
compile it I get the following warnings and errors.

udp-stream.c:104:5: error: too few arguments to function ‘rpl_set_root’

------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/

Gmane