iotivity / iotivity-constrained

This mirror is deprecated. Please visit https://github.com/iotivity/iotivity-lite for forking the IoTivity-Lite project. To contribute code to the project, please visit https://www.iotivity.org/get-involved, https://www.iotivity.org/
https://iotivity.org/getting-started
Apache License 2.0
66 stars 42 forks source link

Failed to compile for Zephyr with CC2520 module #2

Closed kiendinh closed 7 years ago

kiendinh commented 7 years ago

Hi,

I have a CC2520 module and wonder if it can work with the Arduino 101 board. I'm trying to compile the Zephyr app with CC2520 module, but it failed. I'm using Zephyr 1.5.0 release. Below is the log. Is there any recommended Zephyr board that can work with the module then? Thanks.

==== kien@zephyr(master)$ make pristine && make BOARD=arduino_101_factory CONF_FILE=prj_802154.conf Using /home/kien/workspace/zephyr/zephyrLF/boards/arduino_101/arduino_101_defconfig as base Merging /home/kien/workspace/zephyr/zephyrLF/kernel/configs/nano.config Merging prj_802154.conf #

configuration written to .config

# make[1]: Entering directory /home/kien/workspace/zephyr/zephyrLF' make[2]: Entering directory/home/kien/workspace/git/iotivity-constrained/port/zephyr/outdir' GEN ./Makefile scripts/kconfig/conf --silentoldconfig Kconfig make[2]: Leaving directory /home/kien/workspace/git/iotivity-constrained/port/zephyr/outdir' make[2]: Entering directory/home/kien/workspace/git/iotivity-constrained/port/zephyr/outdir' Using /home/kien/workspace/zephyr/zephyrLF as source for kernel GEN ./Makefile CHK include/generated/version.h UPD include/generated/version.h HOSTCC scripts/gen_idt/gen_idt.o HOSTLD scripts/gen_idt/gen_idt CHK misc/generated/configs.c UPD misc/generated/configs.c CHK include/generated/offsets.h UPD include/generated/offsets.h CC lib/libc/minimal/source/stdlib/strtol.o CC lib/libc/minimal/source/stdlib/strtoul.o CC lib/libc/minimal/source/stdlib/atoi.o LD lib/libc/minimal/source/stdlib/built-in.o CC lib/libc/minimal/source/stdout/fprintf.o CC lib/libc/minimal/source/stdout/prf.o CC lib/libc/minimal/source/stdout/sprintf.o CC lib/libc/minimal/source/stdout/stdout_console.o LD lib/libc/minimal/source/stdout/built-in.o CC lib/libc/minimal/source/string/string.o CC lib/libc/minimal/source/string/strncasecmp.o CC lib/libc/minimal/source/string/strstr.o LD lib/libc/minimal/source/string/built-in.o LD lib/libc/minimal/source/built-in.o LD lib/libc/minimal/built-in.o LD lib/libc/built-in.o LD lib/built-in.o CC kernel/nanokernel/nano_fiber.o CC kernel/nanokernel/nano_lifo.o CC kernel/nanokernel/nano_fifo.o CC kernel/nanokernel/nano_stack.o CC kernel/nanokernel/nano_sys_clock.o CC kernel/nanokernel/nano_context.o CC kernel/nanokernel/nano_init.o CC kernel/nanokernel/nano_sema.o CC kernel/nanokernel/version.o CC kernel/nanokernel/device.o CC kernel/nanokernel/wait_q.o CC kernel/nanokernel/nano_sleep.o CC kernel/nanokernel/nano_timer.o CC kernel/nanokernel/ring_buffer.o CC kernel/nanokernel/errno.o CC kernel/nanokernel/timeout_q.o LD kernel/nanokernel/built-in.o LD kernel/built-in.o CC misc/printk.o LD misc/debug/built-in.o CC misc/generated/configs.o LD misc/generated/built-in.o LD misc/built-in.o CC net/buf.o CC net/ip/net_core.o CC net/ip/ip_buf.o CC net/ip/net_context.o CC net/ip/l2_buf.o CC net/ip/contiki/netstack.o CC net/ip/contiki/nbr-table.o CC net/ip/contiki/linkaddr.o CC net/ip/contiki/ip/uip-debug.o CC net/ip/contiki/ip/uip-packetqueue.o CC net/ip/contiki/ip/uip-udp-packet.o CC net/ip/contiki/ip/udp-socket.o CC net/ip/contiki/ip/simple-udp.o CC net/ip/contiki/ip/uiplib.o CC net/ip/contiki/ip/uip-nameserver.o CC net/ip/contiki/ip/tcpip.o CC net/ip/contiki/os/sys/process.o CC net/ip/contiki/os/sys/stimer.o CC net/ip/contiki/os/sys/etimer.o CC net/ip/contiki/os/sys/timer.o CC net/ip/contiki/os/sys/arg.o CC net/ip/contiki/os/sys/ctimer.o CC net/ip/contiki/os/sys/rtimer.o CC net/ip/contiki/os/sys/clock.o CC net/ip/contiki/os/dev/nullradio.o CC net/ip/contiki/os/lib/mmem.o CC net/ip/contiki/os/lib/memb.o CC net/ip/contiki/os/lib/list.o CC net/ip/contiki/os/lib/random.o CC net/ip/contiki/os/lib/aes-128.o CC net/ip/contiki/llsec/nullsec.o CC net/ip/contiki/ipv6/uip6.o CC net/ip/contiki/ipv6/uip-icmp6.o CC net/ip/contiki/ipv6/uip-ds6.o CC net/ip/contiki/ipv6/uip-nd6.o CC net/ip/contiki/ipv6/uip-ds6-route.o CC net/ip/contiki/ipv6/uip-ds6-nbr.o CC net/ip/contiki/sicslowpan/sicslowpan_compression.o CC net/ip/contiki/sicslowpan/sicslowpan_fragmentation.o CC net/ip/contiki/mac/simplerdc.o CC net/ip/contiki/uip-log.o CC net/ip/net_driver_15_4.o CC net/ip/contiki/packetbuf.o CC net/ip/contiki/queuebuf.o CC net/ip/contiki/mac/mac.o CC net/ip/contiki/mac/framer.o CC net/ip/contiki/mac/frame802154.o CC net/ip/contiki/mac/framer-802154.o CC net/ip/contiki/mac/mac-sequence.o CC net/ip/contiki/mac/nullmac.o LD net/ip/built-in.o LD net/built-in.o CC boards/arduino_101/pinmux.o CC boards/arduino_101/board.o LD boards/arduino_101/built-in.o LD boards/built-in.o LD ext/fs/built-in.o CC ext/hal/qmsi/drivers/clk.o CC ext/hal/qmsi/drivers/qm_flash.o CC ext/hal/qmsi/soc/quark_se/drivers/power_states.o CC ext/hal/qmsi/soc/quark_se/drivers/vreg.o CC ext/hal/qmsi/drivers/qm_uart.o LD ext/hal/qmsi/built-in.o LD ext/hal/built-in.o LD ext/lib/crypto/built-in.o LD ext/lib/built-in.o LD ext/built-in.o LD usb/built-in.o LD fs/built-in.o CC arch/x86/core/cpuhalt.o CC arch/x86/core/msr.o CC arch/x86/core/dynamic.o CC arch/x86/core/intconnect.o CC arch/x86/core/excconnect.o CC arch/x86/core/sys_fatal_error_handler.o AS arch/x86/core/crt0.o AS arch/x86/core/cache_s.o CC arch/x86/core/cache.o AS arch/x86/core/excstub.o AS arch/x86/core/intstub.o AS arch/x86/core/swap.o CC arch/x86/core/thread.o CC arch/x86/core/fatal.o LD arch/x86/core/built-in.o CC arch/x86/soc/quark_se/soc.o CC arch/x86/soc/quark_se/soc_config.o CC arch/x86/soc/quark_se/eoi.o CC arch/x86/soc/quark_se/power.o AS arch/x86/soc/quark_se/soc_power.o LD arch/x86/soc/quark_se/built-in.o LD arch/x86/built-in.o LD arch/built-in.o CC drivers/console/uart_console.o CC drivers/console/ipm_console_receiver.o LD drivers/console/built-in.o CC drivers/ieee802154/ieee802154_cc2520.o /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c: In function 'set_reset': /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:298:31: error: 'CC2520_GPIO_IDX_RESET' undeclared (first use in this function) gpio_pin_write(cc2520->gpios[CC2520_GPIO_IDX_RESET], ^ /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:298:31: note: each undeclared identifier is reported only once for each function it appears in /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:299:10: error: 'CONFIG_CC2520_GPIO_RESET' undeclared (first use in this function) CONFIG_CC2520_GPIO_RESET, value); ^ /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c: In function 'set_vreg_en': /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:306:31: error: 'CC2520_GPIO_IDX_VREG_EN' undeclared (first use in this function) gpio_pin_write(cc2520->gpios[CC2520_GPIO_IDX_VREG_EN], ^ /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:307:10: error: 'CONFIG_CC2520_GPIO_VREG_EN' undeclared (first use in this function) CONFIG_CC2520_GPIO_VREG_EN, value); ^ /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c: In function 'get_fifo': /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:314:30: error: 'CC2520_GPIO_IDX_FIFO' undeclared (first use in this function) gpio_pin_read(cc2520->gpios[CC2520_GPIO_IDX_FIFO], ^ /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:315:9: error: 'CONFIG_CC2520_GPIO_FIFO' undeclared (first use in this function) CONFIG_CC2520_GPIO_FIFO, &pin_value); ^ /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c: In function 'get_fifop': /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:324:30: error: 'CC2520_GPIO_IDX_FIFOP' undeclared (first use in this function) gpio_pin_read(cc2520->gpios[CC2520_GPIO_IDX_FIFOP], ^ /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:325:9: error: 'CONFIG_CC2520_GPIO_FIFOP' undeclared (first use in this function) CONFIG_CC2520_GPIO_FIFOP, &pin_value); ^ /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c: In function 'get_cca': /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:334:30: error: 'CC2520_GPIO_IDX_CCA' undeclared (first use in this function) gpio_pin_read(cc2520->gpios[CC2520_GPIO_IDX_CCA], ^ /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:335:9: error: 'CONFIG_CC2520_GPIO_CCA' undeclared (first use in this function) CONFIG_CC2520_GPIO_CCA, &pin_value); ^ /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c: In function 'enable_fifop_interrupt': /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:374:42: error: 'CC2520_GPIO_IDX_FIFOP' undeclared (first use in this function) gpio_pin_enable_callback(cc2520->gpios[CC2520_GPIO_IDX_FIFOP], ^ /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:375:7: error: 'CONFIG_CC2520_GPIO_FIFOP' undeclared (first use in this function) CONFIG_CC2520_GPIO_FIFOP); ^ /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c: In function 'enable_sfd_interrupt': /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:386:42: error: 'CC2520_GPIO_IDX_SFD' undeclared (first use in this function) gpio_pin_enable_callback(cc2520->gpios[CC2520_GPIO_IDX_SFD], ^ /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:387:7: error: 'CONFIG_CC2520_GPIO_SFD' undeclared (first use in this function) CONFIG_CC2520_GPIO_SFD); ^ In file included from /home/kien/workspace/zephyr/zephyrLF/arch/x86/soc/quark_se/soc.h:27:0, from /home/kien/workspace/zephyr/zephyrLF/boards/arduino_101/board.h:20, from /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:24: /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c: In function 'setup_gpio_callbacks': /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:399:28: error: 'CONFIG_CC2520_GPIO_SFD' undeclared (first use in this function) sfd_int_handler, BIT(CONFIG_CC2520_GPIO_SFD)); ^ /home/kien/workspace/zephyr/zephyrLF/include/misc/util.h:102:26: note: in definition of macro 'BIT'

define BIT(n) (1UL << (n))

                      ^

/home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:400:34: error: 'CC2520_GPIO_IDX_SFD' undeclared (first use in this function) gpio_add_callback(cc2520->gpios[CC2520_GPIO_IDX_SFD], ^ In file included from /home/kien/workspace/zephyr/zephyrLF/arch/x86/soc/quark_se/soc.h:27:0, from /home/kien/workspace/zephyr/zephyrLF/boards/arduino_101/board.h:20, from /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:24: /home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:404:30: error: 'CONFIG_CC2520_GPIO_FIFOP' undeclared (first use in this function) fifop_int_handler, BIT(CONFIG_CC2520_GPIO_FIFOP)); ^ /home/kien/workspace/zephyr/zephyrLF/include/misc/util.h:102:26: note: in definition of macro 'BIT'

define BIT(n) (1UL << (n))

                      ^

/home/kien/workspace/zephyr/zephyrLF/drivers/ieee802154/ieee802154_cc2520.c:405:34: error: 'CC2520_GPIO_IDX_FIFOP' undeclared (first use in this function) gpio_add_callback(cc2520->gpios[CC2520_GPIO_IDX_FIFOP], ^ make[4]: [drivers/ieee802154/ieee802154_cc2520.o] Error 1 make[3]: [drivers/ieee802154] Error 2 make[2]: [drivers] Error 2 make[2]: Leaving directory `/home/kien/workspace/git/iotivity-constrained/port/zephyr/outdir' make[1]: [sub-make] Error 2 make[1]: Leaving directory `/home/kien/workspace/zephyr/zephyrLF' make: *** [all] Error 2 kien@zephyr(master)$

kmaloor commented 7 years ago

Hello, The build error you're seeing seems to be unrelated to IoTivity-Constrained. In any case, the sample builds OK for qemu against Zephyr master. Please reach out to the Zephyr community to root cause your build error, as well as for relevant hardware suggestions. Thanks.

kiendinh commented 7 years ago

Thanks, I've verified it is built for Mount Atlas. I'd like to close the issue.