Zigbee ZBOSS NCP HOST compile for ARMv7 (or other 32-bit arch)

Hello,

I have compiled the Zigbee ZBOSS NCP HOST on an ARMv7 (32-bit) architecture according to the docs (https://developer.nordicsemi.com/nRF_Connect_SDK/doc/zboss/3.11.2.0/zboss_ncp_host.html). I have
compiled both the ZBOSS libraries (according to 'Rebuilding the ZBOSS libraries for host') and the simple_gw
application.

However when I run the application is segfaults almost immediately and the following is written in the log:

0 76fbcbf0 2022-7-28 14:0:15 0/0/000.000 /usr/src/debug/ncp-host/2.2.0-r0/src/common/zb_init_ncp.c:141  [INFO1] FFD build
1 76fbcbf0 2022-7-28 14:0:15 0/0/000.013 /usr/src/debug/ncp-host/2.2.0-r0/src/common/zb_init_ncp.c:145  [INFO1] sizes: g_zb 10420 sched 1356 bpool 6660 addr 1612
2 76fbcbf0 2022-7-28 14:0:15 0/0/000.014 /usr/src/debug/ncp-host/2.2.0-r0/src/common/zb_init_ncp.c:147  [INFO1] zcl 572
3 76fbcbf0 2022-7-28 14:0:15 0/0/000.014 /usr/src/debug/ncp-host/2.2.0-r0/src/common/zb_init_ncp.c:156  [INFO1] nvram 144
4 76fbcbf0 2022-7-28 14:0:15 0/0/000.014 /usr/src/debug/ncp-host/2.2.0-r0/src/common/zb_init_ncp.c:162  [INFO1] err_ind 4
5 76fbcbf0 2022-7-28 14:0:15 0/0/000.014 /usr/src/debug/ncp-host/2.2.0-r0/src/common/zb_init_ncp.c:169  [INFO1] scheduler q size 64
6 76fbcbf0 2022-7-28 14:0:15 0/0/000.014 /usr/src/debug/ncp-host/2.2.0-r0/src/common/zb_init_ncp.c:175  [INFO1] ZB_IOBUF_POOL_SIZE 40
  zbncp_ll_init_complete: (RX-IDLE : TX-IDLE)
           zbncp_ll_poll: @ time 0 [ack size 1159438920]
zbncp_ll_rx_start_receiving: (RX-IDLE)
   zbncp_ll_rx_set_state: (RX-IDLE --> RX-RECEIVING-HDR)

I suspect this as something to do with struct alignment as many structs in the source are packed and in the
ZBOSS library code some pointer arithmetic is done which is probably 64-bit specific. Is there an easy fix? Somehow
there must be as not many gateway's have 64-bit processors.

Parents Reply
  • Hallo Marte,

    In the meantime we have found a workaround. We have disabled any debug logs from the stack. At first we still got a segfault. But then we have reset the nrf52840 so that the adapter had a clean state and the application now runs.

    • What board are you using: we are using an i.MX6UL Cortex A7 processor board with yocto linux.
    • We have the issue in two ways:
      • Using the on-board gcc compiler and following the user guide exactly.
      • I have set-up a cross compile toolchain and changed the ZBOSS build system to a more portable single CMake file with the same results.
    • As soon as we can reproduce the error again we will send the callstack. 

    Kind regards,
    Daan

Children
Related