0

Hello there I am trying to build the examples given as part of the Contiki-2.6 RTOS. The directory path is : contiki/contiki-2.6/examples/ping-ipv6

I am trying to build the example ping-ipv6 for TI's SMARTRF05-EB, the SoC being 2530.

1) contiki/contiki-2.6/examples/ping-ipv6# make TARGET=cc2530dk clean

2) contiki/contiki-2.6/examples/ping-ipv6# make TARGET=cc2530dk

but after executing the above 2 commands I get the following error ..I have just included the last part of information from the huge build output. Please let me know how to resolve it. Please note I am able to build the hello-world example and also the cc2530dk example using the above 2 commands.

30dk/nullradio.rel -Wp,-MMD,obj_cc2530dk/nullradio.d,-MQ,obj_cc2530dk/nullradio.rel
../../core/dev/nullradio.c:14: warning 85: in function prepare unreferenced function argument : 'payload'
../../core/dev/nullradio.c:14: warning 85: in function prepare unreferenced function argument : 'payload_len'
../../core/dev/nullradio.c:20: warning 85: in function transmit unreferenced function argument : 'transmit_len'
../../core/dev/nullradio.c:33: warning 85: in function read unreferenced function argument : 'buf'
../../core/dev/nullradio.c:33: warning 85: in function read unreferenced function argument : 'buf_len'
sdcc --codeseg BANK1 -DCONTIKI=1 -DCONTIKI_TARGET_CC2530DK=1 -DUIP_CONF_IPV6=1 -DUIP_CONF_IPV6_RPL=1 --model-huge --stack-auto --std-c99 -DCC2530_LAST_FLASH_BANK=7 -DHAVE_SDCC_BANKING  -I. -I../../platform/cc2530dk/. -I../../platform/cc2530dk/dev -I../../cpu/cc253x/. -I../../cpu/cc253x/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/ping6 -I../../platform/cc2530dk/ -c ../../apps/ping6/ping6.c -o obj_cc2530dk/ping6.rel -Wp,-MMD,obj_cc2530dk/ping6.d,-MQ,obj_cc2530dk/ping6.rel
../../apps/ping6/ping6.c:92: warning 112: function 'scanf' implicit declaration
../../apps/ping6/ping6.c:99: warning 112: function 'scanf' implicit declaration
../../apps/ping6/ping6.c:92: error 101: too many parameters 
../../apps/ping6/ping6.c:99: error 101: too many parameters 
../../apps/ping6/ping6.c:153: warning 85: in function ping6handler unreferenced function argument : 'ev'
../../apps/ping6/ping6.c:153: warning 85: in function ping6handler unreferenced function argument : 'data'
make: *** [obj_cc2530dk/ping6.rel] Error 1
linuxstack
  • 757
  • 8
  • 19

2 Answers2

0

It seems it has been a long time since the question is asked, but still...

The short answer is that scanf() function is not supported for the target cc2530dk. Instead of scanf(), uart0_set_input() function from /dev/uart0.h or serial_line_event_message event from dev/serial-line.h libraries should be used to read input from UART.

P.S.: There may be other similar incompatibilities as well even if you fix that.

0

For platforms that don't have scanf, you may want to edit apps/ping6/ping6.c and set MAC_DEBUG to 1. That way you'll be able to hard-code the IPv6 address you want to ping (in the #if MACDEBUG)

kartben
  • 2,485
  • 21
  • 24