Unable to build RCP firmware for nRF52840 Dongle with nRF Connect SDK v2.0.2

Hello,

I am trying to build OpenThread Radio Co-Processor (RCP) firmware for nRF52840 Dongle with the new nRF Connect SDK v2.0.2.
My VM is running Ubuntu 20.04.3 LTS with Python 3.8.10.

I found this command line in the tutorial video : Developing Matter products with nRF Connect SDK 


user@ubuntu:~/ncs/v2.0.2/nrf/samples/openthread/coprocessor$ west build -b nrf52840dongle_nrf52840 -- -DOVERLAY_CONFIG="overlay-rcp.conf ../cli/overlay-thread_1_2.conf overlay-usb.conf"

-- west build: generating a build system
Loading Zephyr default modules (Zephyr base (cached)).
-- Application: /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor
-- Using NCS Toolchain 2.0.2 for building. (/home/user/ncs/toolchains/v2.0.2/cmake)
-- Cache files will be written to: /home/user/.cache/zephyr
-- Zephyr version: 3.0.99 (/home/user/ncs/v2.0.2/zephyr)
-- Found west (found suitable version "0.13.1", minimum required is "0.7.1")
-- Board: nrf52840dongle_nrf52840
-- Found host-tools: zephyr 0.14.2 (/home/user/zephyr-sdk-0.14.2)
-- Found dtc: /home/user/ncs/toolchains/v2.0.2/usr/local/bin/dtc (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: zephyr 0.14.2 (/home/user/zephyr-sdk-0.14.2)
-- Found BOARD.dts: /home/user/ncs/v2.0.2/zephyr/boards/arm/nrf52840dongle_nrf52840/nrf52840dongle_nrf52840.dts
-- Generated zephyr.dts: /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/dts.cmake
CMake Error at /home/user/ncs/v2.0.2/zephyr/cmake/modules/kconfig.cmake:226 (message):
File not found:
/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/overlay-rcp.conf
Call Stack (most recent call first):
/home/user/ncs/v2.0.2/zephyr/cmake/modules/zephyr_default.cmake:121 (include)
/home/user/ncs/v2.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:51 (include)
/home/user/ncs/v2.0.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:81 (include_boilerplate)
CMakeLists.txt:11 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /usr/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build -S/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor -GNinja -DBOARD=nrf52840dongle_nrf52840 '-DOVERLAY_CONFIG=overlay-rcp.conf ../cli/overlay-thread_1_2.conf overlay-usb.conf'

And I am getting an error. Could you you tell me how to fix that?

Regards
Ludovic

  • Also I can't find overlay-rcp.conf file in nrf/samples/openthread/coprocessor directory:

    ubuntu:~/ncs/v2.0.2/nrf/samples/openthread/coprocessor$ ls overlay-*
    overlay-logging.conf overlay-minimal.conf overlay-rtt.conf overlay-usb.conf overlay-vendor_hook.conf

    If I change with overlay-rtt.conf overlay-usb.conf it fails too:

    user@ubuntu:~/ncs/v2.0.2/nrf/samples/openthread/coprocessor$ west build -b nrf52840dongle_nrf52840 -- -DOVERLAY_CONFIG="overlay-rtt.conf overlay-usb.conf" -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base (cached)).
    -- Application: /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor
    -- Using NCS Toolchain 2.0.2 for building. (/home/user/ncs/toolchains/v2.0.2/cmake)
    -- Cache files will be written to: /home/user/.cache/zephyr
    -- Zephyr version: 3.0.99 (/home/user/ncs/v2.0.2/zephyr)
    -- Found west (found suitable version "0.13.1", minimum required is "0.7.1")
    -- Board: nrf52840dongle_nrf52840
    -- Found host-tools: zephyr 0.14.2 (/home/user/zephyr-sdk-0.14.2)
    -- Found dtc: /home/user/ncs/toolchains/v2.0.2/usr/local/bin/dtc (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: zephyr 0.14.2 (/home/user/zephyr-sdk-0.14.2)
    -- Found BOARD.dts: /home/user/ncs/v2.0.2/zephyr/boards/arm/nrf52840dongle_nrf52840/nrf52840dongle_nrf52840.dts
    -- Generated zephyr.dts: /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/dts.cmake
    Parsing /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/Kconfig
    Loaded configuration '/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/.config'
    No change to configuration in '/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/.config'
    No change to Kconfig header in '/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/include/generated/autoconf.h'
    -- OpenThread Source Directory: /home/user/ncs/v2.0.2/modules/lib/openthread
    -- Package Name: OPENTHREAD
    -- Setting default package version: v2.0.1-117-gaacd9eb0b
    -- Package Version: v2.0.1-117-gaacd9eb0b
    CMake Warning at /home/user/ncs/v2.0.2/zephyr/CMakeLists.txt:1803 (message):
    __ASSERT() statements are globally ENABLED


    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build
    -- west build: building application
    [68/279] cd /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/...r.h"" -P /home/user/ncs/v2.0.2/modules/lib/openthread/etc/cmake/print.cmake
    OPENTHREAD_CONFIG_ASSERT_ENABLE=1
    OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE=0
    OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE=0
    OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS=0
    OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT=0
    OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE=1
    OPENTHREAD_CONFIG_COAP_API_ENABLE=1
    OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE=1
    OPENTHREAD_CONFIG_COMMISSIONER_ENABLE=1
    OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE=1
    OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE=1
    OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE=1
    OPENTHREAD_CONFIG_DIAG_ENABLE=1
    OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_ECDSA_ENABLE=1
    OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_DUA_ENABLE=1
    OPENTHREAD_CONFIG_MLR_ENABLE=1
    OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=1
    OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE=1
    OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE=1
    OPENTHREAD_CONFIG_JOINER_ENABLE=1
    OPENTHREAD_CONFIG_LINK_RAW_ENABLE=1
    OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE=1
    OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE=1
    OPENTHREAD_CONFIG_MAC_FILTER_ENABLE=1
    OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=1
    OPENTHREAD_CONFIG_PING_SENDER_ENABLE=1
    OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=1
    OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1
    OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=1
    OPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT=0
    PACKAGE_NAME=OPENTHREAD
    OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_3
    OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1
    KERNEL
    __ZEPHYR__=1
    _FORTIFY_SOURCE=2
    __LINUX_ERRNO_EXTENSIONS__
    USE_PARTITION_MANAGER=0
    __PROGRAM_START
    NRF52840_XXAA
    NRF_802154_CCA_CORR_LIMIT_DEFAULT=2
    NRF_802154_CCA_CORR_THRESHOLD_DEFAULT=45
    NRF_802154_CCA_ED_THRESHOLD_DEFAULT=45
    NRF_802154_CCA_MODE_DEFAULT=NRF_RADIO_CCA_MODE_ED
    NRF_802154_USE_RAW_API=1
    NRF_802154_PENDING_SHORT_ADDRESSES=16
    NRF_802154_PENDING_EXTENDED_ADDRESSES=16
    NRF_802154_RX_BUFFERS=16
    NRF_802154_TX_STARTED_NOTIFY_ENABLED=1
    NRF_802154_ACK_TIMEOUT_ENABLED=1
    NRF_802154_ENCRYPTION_ENABLED=1
    NRF_802154_SECURITY_WRITER_ENABLED=1
    NRF_802154_IE_WRITER_ENABLED=1
    NRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0
    NRF_802154_ECB_PRIORITY=-1
    NRF_802154_SWI_PRIORITY=1
    MBEDTLS_CONFIG_FILE=nrf-config.h
    MBEDTLS_USER_CONFIG_FILE=nrf-config-user.h
    [89/279] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/usb/device/class/cdc_acm.c.obj
    /home/user/ncs/v2.0.2/zephyr/subsys/usb/device/class/cdc_acm.c:460:12: warning: 'cdc_acm_init' defined but not used [-Wunused-function]
    460 | static int cdc_acm_init(const struct device *dev)
    | ^~~~~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/subsys/usb/device/class/cdc_acm.c:417:13: warning: 'cdc_interface_config' defined but not used [-Wunused-function]
    417 | static void cdc_interface_config(struct usb_desc_header *head,
    | ^~~~~~~~~~~~~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/subsys/usb/device/class/cdc_acm.c:397:13: warning: 'cdc_acm_dev_status_cb' defined but not used [-Wunused-function]
    397 | static void cdc_acm_dev_status_cb(struct usb_cfg_data *cfg,
    | ^~~~~~~~~~~~~~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/subsys/usb/device/class/cdc_acm.c:300:13: warning: 'cdc_acm_int_in' defined but not used [-Wunused-function]
    300 | static void cdc_acm_int_in(uint8_t ep, enum usb_dc_ep_cb_status_code ep_status)
    | ^~~~~~~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/subsys/usb/device/class/cdc_acm.c:919:37: warning: 'cdc_acm_driver_api' defined but not used [-Wunused-const-variable=]
    919 | static const struct uart_driver_api cdc_acm_driver_api = {
    | ^~~~~~~~~~~~~~~~~~
    [140/279] Building C object zephyr/subsys/net/lib/openthread/platform/CMakeFiles/openthread_platform.dir/uart.c.obj
    FAILED: zephyr/subsys/net/lib/openthread/platform/CMakeFiles/openthread_platform.dir/uart.c.obj
    ccache /home/user/zephyr-sdk-0.14.2/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DKERNEL -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DMBEDTLS_USER_CONFIG_FILE=\"nrf-config-user.h\" -DNRF52840_XXAA -DNRF_802154_ACK_TIMEOUT_ENABLED=1 -DNRF_802154_CCA_CORR_LIMIT_DEFAULT=2 -DNRF_802154_CCA_CORR_THRESHOLD_DEFAULT=45 -DNRF_802154_CCA_ED_THRESHOLD_DEFAULT=45 -DNRF_802154_CCA_MODE_DEFAULT=NRF_RADIO_CCA_MODE_ED -DNRF_802154_ECB_PRIORITY=-1 -DNRF_802154_ENCRYPTION_ENABLED=1 -DNRF_802154_IE_WRITER_ENABLED=1 -DNRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0 -DNRF_802154_PENDING_EXTENDED_ADDRESSES=16 -DNRF_802154_PENDING_SHORT_ADDRESSES=16 -DNRF_802154_RX_BUFFERS=16 -DNRF_802154_SECURITY_WRITER_ENABLED=1 -DNRF_802154_SWI_PRIORITY=1 -DNRF_802154_TX_STARTED_NOTIFY_ENABLED=1 -DNRF_802154_USE_RAW_API=1 -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/user/ncs/v2.0.2/nrf/drivers/mpsl/clock_control -I/home/user/ncs/v2.0.2/zephyr/include/zephyr -I/home/user/ncs/v2.0.2/zephyr/include -I/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/include/generated -I/home/user/ncs/v2.0.2/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/user/ncs/v2.0.2/zephyr/lib/libc/newlib/include -I/home/user/ncs/v2.0.2/zephyr/soc/arm/nordic_nrf/common/. -I/home/user/ncs/v2.0.2/zephyr/subsys/net/lib/openthread/platform/. -I/home/user/ncs/v2.0.2/zephyr/subsys/usb/device -I/home/user/ncs/v2.0.2/zephyr/subsys/settings/include -I/home/user/ncs/v2.0.2/nrf/include -I/home/user/ncs/v2.0.2/nrf/lib/multithreading_lock/. -I/home/user/ncs/v2.0.2/zephyr/drivers/flash -I/home/user/ncs/v2.0.2/modules/hal/cmsis/CMSIS/Core/Include -I/home/user/ncs/v2.0.2/modules/hal/nordic/nrfx -I/home/user/ncs/v2.0.2/modules/hal/nordic/nrfx/drivers/include -I/home/user/ncs/v2.0.2/modules/hal/nordic/nrfx/mdk -I/home/user/ncs/v2.0.2/zephyr/modules/hal_nordic/nrfx/. -I/home/user/ncs/v2.0.2/modules/debug/segger/SEGGER -I/home/user/ncs/v2.0.2/modules/debug/segger/Config -I/home/user/ncs/v2.0.2/zephyr/modules/segger/. -I/home/user/ncs/v2.0.2/nrfxlib/mpsl/include -I/home/user/ncs/v2.0.2/nrfxlib/mpsl/include/protocol -I/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/modules/openthread/build/etc/cmake -I/home/user/ncs/v2.0.2/modules/lib/openthread/etc/cmake -I/home/user/ncs/v2.0.2/nrfxlib/nrf_802154/driver/include -I/home/user/ncs/v2.0.2/nrfxlib/nrf_802154/sl/include -I/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/modules/nrfxlib/nrfxlib/nrf_security/src/include/generated -I/home/user/ncs/v2.0.2/nrfxlib/nrf_security/include -I/home/user/ncs/v2.0.2/nrfxlib/nrf_security/include/mbedtls -I/home/user/ncs/v2.0.2/nrfxlib/nrf_security/include/psa -I/home/user/ncs/v2.0.2/mbedtls/include -I/home/user/ncs/v2.0.2/mbedtls/include/mbedtls -I/home/user/ncs/v2.0.2/mbedtls/include/psa -I/home/user/ncs/v2.0.2/mbedtls/library -I/home/user/ncs/v2.0.2/nrfxlib/nrf_security/../crypto/nrf_oberon/include -I/home/user/ncs/v2.0.2/nrfxlib/nrf_security/../crypto/nrf_oberon/include/mbedtls -I/home/user/ncs/v2.0.2/nrfxlib/nrf_security/../crypto/nrf_oberon/include/psa -I/home/user/ncs/v2.0.2/nrfxlib/crypto/nrf_oberon/include/mbedtls -I/home/user/ncs/v2.0.2/nrfxlib/crypto/nrf_oberon/include -isystem /home/user/ncs/v2.0.2/zephyr/subsys/cpp/include -isystem /home/user/ncs/v2.0.2/modules/lib/openthread/include -isystem /home/user/ncs/v2.0.2/modules/lib/openthread/examples/platforms -isystem /home/user/ncs/v2.0.2/nrfxlib/crypto/nrf_cc310_platform/include -Os -imacros /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mfp16-format=ieee -imacros /home/user/ncs/v2.0.2/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/user/ncs/v2.0.2/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/user/ncs/v2.0.2=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -std=c99 -MD -MT zephyr/subsys/net/lib/openthread/platform/CMakeFiles/openthread_platform.dir/uart.c.obj -MF zephyr/subsys/net/lib/openthread/platform/CMakeFiles/openthread_platform.dir/uart.c.obj.d -o zephyr/subsys/net/lib/openthread/platform/CMakeFiles/openthread_platform.dir/uart.c.obj -c /home/user/ncs/v2.0.2/zephyr/subsys/net/lib/openthread/platform/uart.c
    In file included from /home/user/ncs/v2.0.2/zephyr/include/zephyr/toolchain/gcc.h:88,
    from /home/user/ncs/v2.0.2/zephyr/include/zephyr/toolchain.h:50,
    from /home/user/ncs/v2.0.2/zephyr/include/zephyr/sys/atomic.h:12,
    from /home/user/ncs/v2.0.2/zephyr/include/zephyr/logging/log_msg.h:9,
    from /home/user/ncs/v2.0.2/zephyr/include/zephyr/logging/log_core.h:9,
    from /home/user/ncs/v2.0.2/zephyr/include/zephyr/logging/log.h:11,
    from /home/user/ncs/v2.0.2/zephyr/subsys/net/lib/openthread/platform/uart.c:10:
    /home/user/ncs/v2.0.2/zephyr/subsys/net/lib/openthread/platform/uart.c: In function 'otPlatUartEnable':
    /home/user/ncs/v2.0.2/zephyr/include/zephyr/device.h:96:39: error: '__device_dts_ord_DT_CHOSEN_zephyr_ot_uart_ORD' undeclared (first use in this function)
    96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
    | ^~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
    132 | #define _DO_CONCAT(x, y) x ## y
    | ^
    /home/user/ncs/v2.0.2/zephyr/include/zephyr/device.h:96:31: note: in expansion of macro '_CONCAT'
    96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
    | ^~~~~~~
    /home/user/ncs/v2.0.2/zephyr/include/zephyr/device.h:291:37: note: in expansion of macro 'DEVICE_NAME_GET'
    291 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_NAME(node_id))
    | ^~~~~~~~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/include/zephyr/device.h:311:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
    311 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
    | ^~~~~~~~~~~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/subsys/net/lib/openthread/platform/uart.c:160:16: note: in expansion of macro 'DEVICE_DT_GET'
    160 | ot_uart.dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_ot_uart));
    | ^~~~~~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/include/zephyr/device.h:96:39: note: each undeclared identifier is reported only once for each function it appears in
    96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
    | ^~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
    132 | #define _DO_CONCAT(x, y) x ## y
    | ^
    /home/user/ncs/v2.0.2/zephyr/include/zephyr/device.h:96:31: note: in expansion of macro '_CONCAT'
    96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
    | ^~~~~~~
    /home/user/ncs/v2.0.2/zephyr/include/zephyr/device.h:291:37: note: in expansion of macro 'DEVICE_NAME_GET'
    291 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_NAME(node_id))
    | ^~~~~~~~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/include/zephyr/device.h:311:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
    311 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
    | ^~~~~~~~~~~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/subsys/net/lib/openthread/platform/uart.c:160:16: note: in expansion of macro 'DEVICE_DT_GET'
    160 | ot_uart.dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_ot_uart));
    | ^~~~~~~~~~~~~
    [144/279] Building C object zephyr/drivers/usb/device/CMakeFiles/drivers__usb__device.dir/usb_dc_nrfx.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build

  • Hi,

    To build the for the nRF52840 Dongle as an RCP, I recommend following our docs on Configuring a radio co-processor.

    Regards,
    Sigurd Hellesvik

  • Thanks Sigurd. Unfortunately It fails too:

    user@ubuntu:~/ncs/v2.0.2$ west build -p always -b nrf52840dongle_nrf52840 nrf/samples/openthread/coprocessor/ -- -DOVERLAY_CONFIG="overlay-usb.conf" -DDTC_OVERLAY_FILE="usb.overlay"
    -- west build: making build dir /home/user/ncs/v2.0.2/build pristine
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor
    -- Using NCS Toolchain 2.0.2 for building. (/home/user/ncs/toolchains/v2.0.2/cmake)
    -- Found Python3: /home/user/ncs/toolchains/v2.0.2/usr/local/bin/python3 (found suitable exact version "3.8.10") found components: Interpreter
    -- Cache files will be written to: /home/user/.cache/zephyr
    -- Zephyr version: 3.0.99 (/home/user/ncs/v2.0.2/zephyr)
    -- Found west (found suitable version "0.13.1", minimum required is "0.7.1")
    -- Board: nrf52840dongle_nrf52840
    -- Found host-tools: zephyr 0.14.2 (/home/user/zephyr-sdk-0.14.2)
    -- Found dtc: /home/user/ncs/toolchains/v2.0.2/usr/local/bin/dtc (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: zephyr 0.14.2 (/home/user/zephyr-sdk-0.14.2)
    -- Found BOARD.dts: /home/user/ncs/v2.0.2/zephyr/boards/arm/nrf52840dongle_nrf52840/nrf52840dongle_nrf52840.dts
    -- Found devicetree overlay: usb.overlay
    -- Generated zephyr.dts: /home/user/ncs/v2.0.2/build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: /home/user/ncs/v2.0.2/build/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: /home/user/ncs/v2.0.2/build/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: /home/user/ncs/v2.0.2/build/zephyr/dts.cmake
    Parsing /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/Kconfig
    Loaded configuration '/home/user/ncs/v2.0.2/zephyr/boards/arm/nrf52840dongle_nrf52840/nrf52840dongle_nrf52840_defconfig'
    Merged configuration '/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/prj.conf'
    Merged configuration '/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/overlay-usb.conf'
    Configuration saved to '/home/user/ncs/v2.0.2/build/zephyr/.config'
    Kconfig header saved to '/home/user/ncs/v2.0.2/build/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 10.3.0
    -- The CXX compiler identification is GNU 10.3.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /home/user/zephyr-sdk-0.14.2/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- OpenThread Source Directory: /home/user/ncs/v2.0.2/modules/lib/openthread
    -- Check if the system is big endian
    -- Searching 16 bit integer
    -- Looking for sys/types.h
    -- Looking for sys/types.h - found
    -- Looking for stdint.h
    -- Looking for stdint.h - found
    -- Looking for stddef.h
    -- Looking for stddef.h - found
    -- Check size of unsigned short
    -- Check size of unsigned short - done
    -- Searching 16 bit integer - Using unsigned short
    -- Check if the system is big endian - little endian
    -- Package Name: OPENTHREAD
    -- Setting default package version: v2.0.1-117-gaacd9eb0b
    -- Package Version: v2.0.1-117-gaacd9eb0b
    CMake Warning at /home/user/ncs/v2.0.2/zephyr/CMakeLists.txt:1803 (message):
    __ASSERT() statements are globally ENABLED


    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/user/ncs/v2.0.2/build
    -- west build: building application
    [1/418] Preparing syscall dependency handling

    [2/418] Generating include/generated/version.h
    -- Zephyr version: 3.0.99 (/home/user/ncs/v2.0.2/zephyr), build: v3.0.99-ncs1-1
    [96/418] cd /home/user/ncs/v2.0.2/build/modules/openthread/build && /usr/bi...r.h"" -P /home/user/ncs/v2.0.2/modules/lib/openthread/etc/cmake/print.cmake
    OPENTHREAD_CONFIG_ASSERT_ENABLE=1
    OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE=0
    OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE=0
    OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS=0
    OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT=0
    OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE=1
    OPENTHREAD_CONFIG_COAP_API_ENABLE=1
    OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE=1
    OPENTHREAD_CONFIG_COMMISSIONER_ENABLE=1
    OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE=1
    OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE=1
    OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE=1
    OPENTHREAD_CONFIG_DIAG_ENABLE=1
    OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_ECDSA_ENABLE=1
    OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_DUA_ENABLE=1
    OPENTHREAD_CONFIG_MLR_ENABLE=1
    OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=1
    OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE=1
    OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE=1
    OPENTHREAD_CONFIG_JOINER_ENABLE=1
    OPENTHREAD_CONFIG_LINK_RAW_ENABLE=1
    OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE=1
    OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE=1
    OPENTHREAD_CONFIG_MAC_FILTER_ENABLE=1
    OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=1
    OPENTHREAD_CONFIG_PING_SENDER_ENABLE=1
    OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=1
    OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1
    OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=1
    OPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT=0
    PACKAGE_NAME=OPENTHREAD
    OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_3
    OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1
    KERNEL
    __ZEPHYR__=1
    _FORTIFY_SOURCE=2
    __LINUX_ERRNO_EXTENSIONS__
    USE_PARTITION_MANAGER=0
    __PROGRAM_START
    NRF52840_XXAA
    NRF_802154_CCA_CORR_LIMIT_DEFAULT=2
    NRF_802154_CCA_CORR_THRESHOLD_DEFAULT=45
    NRF_802154_CCA_ED_THRESHOLD_DEFAULT=45
    NRF_802154_CCA_MODE_DEFAULT=NRF_RADIO_CCA_MODE_ED
    NRF_802154_USE_RAW_API=1
    NRF_802154_PENDING_SHORT_ADDRESSES=16
    NRF_802154_PENDING_EXTENDED_ADDRESSES=16
    NRF_802154_RX_BUFFERS=16
    NRF_802154_TX_STARTED_NOTIFY_ENABLED=1
    NRF_802154_ACK_TIMEOUT_ENABLED=1
    NRF_802154_ENCRYPTION_ENABLED=1
    NRF_802154_SECURITY_WRITER_ENABLED=1
    NRF_802154_IE_WRITER_ENABLED=1
    NRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0
    NRF_802154_ECB_PRIORITY=-1
    NRF_802154_SWI_PRIORITY=1
    MBEDTLS_CONFIG_FILE=nrf-config.h
    MBEDTLS_USER_CONFIG_FILE=nrf-config-user.h
    [408/418] Linking CXX executable zephyr/zephyr_pre0.elf
    FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map /home/user/ncs/v2.0.2/build/zephyr/zephyr_pre0.map
    : && ccache /home/user/zephyr-sdk-0.14.2/arm-zephyr-eabi/bin/arm-zephyr-eabi-g++ zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr/zephyr_pre0.elf zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj -fuse-ld=bfd -Wl,-T zephyr/linker_zephyr_pre0.cmd -Wl,-Map=/home/user/ncs/v2.0.2/build/zephyr/zephyr_pre0.map -Wl,--whole-archive app/libapp.a zephyr/libzephyr.a zephyr/arch/common/libarch__common.a zephyr/arch/arch/arm/core/aarch32/libarch__arm__core__aarch32.a zephyr/arch/arch/arm/core/aarch32/cortex_m/libarch__arm__core__aarch32__cortex_m.a zephyr/arch/arch/arm/core/aarch32/mpu/libarch__arm__core__aarch32__mpu.a zephyr/lib/libc/newlib/liblib__libc__newlib.a zephyr/lib/posix/liblib__posix.a zephyr/soc/arm/common/cortex_m/libsoc__arm__common__cortex_m.a zephyr/soc/arm/nordic_nrf/nrf52/libsoc__arm__nordic_nrf__nrf52.a zephyr/boards/arm/nrf52840dongle_nrf52840/libboards__arm__nrf52840dongle_nrf52840.a zephyr/subsys/net/libsubsys__net.a zephyr/subsys/net/l2/openthread/libsubsys__net__ip__l2__openthread.a zephyr/subsys/net/ip/libsubsys__net__ip.a zephyr/subsys/net/lib/openthread/platform/libopenthread_platform.a zephyr/subsys/random/libsubsys__random.a zephyr/drivers/usb/device/libdrivers__usb__device.a zephyr/drivers/clock_control/libdrivers__clock_control.a zephyr/drivers/gpio/libdrivers__gpio.a zephyr/drivers/ieee802154/libdrivers__ieee802154.a zephyr/drivers/hwinfo/libdrivers__hwinfo.a zephyr/drivers/flash/libdrivers__flash.a zephyr/drivers/serial/libdrivers__serial.a zephyr/drivers/entropy/libdrivers__entropy.a zephyr/drivers/timer/libdrivers__timer.a zephyr/drivers/pinctrl/libdrivers__pinctrl.a modules/nrf/lib/multithreading_lock/lib..__nrf__lib__multithreading_lock.a modules/nrf/lib/fatal_error/lib..__nrf__lib__fatal_error.a modules/nrf/subsys/mpsl/init/lib..__nrf__subsys__mpsl__init.a modules/nrf/subsys/ieee802154/lib..__nrf__subsys__ieee802154.a modules/nrf/drivers/mpsl/clock_control/lib..__nrf__drivers__mpsl__clock_control.a modules/nrf/drivers/mpsl/flash_sync/lib..__nrf__drivers__mpsl__flash_sync.a modules/nrf/drivers/mpsl/temp_nrf5/lib..__nrf__drivers__mpsl__temp_nrf5.a modules/nrf/drivers/hw_cc310/lib..__nrf__drivers__hw_cc310.a modules/hal_nordic/nrf_802154/libnrf-802154-platform.a modules/nrfxlib/nrf_802154/nrf_802154/driver/libnrf-802154-driver.a modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a modules/nrfxlib/nrfxlib/nrf_security/src/zephyr/libmbedtls_zephyr.a -Wl,--no-whole-archive zephyr/kernel/libkernel.a -L"/home/user/zephyr-sdk-0.14.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/thumb/v7e-m+fp/hard" -L/home/user/ncs/v2.0.2/build/zephyr -lgcc zephyr/arch/common/libisr_tables.a modules/hal_nordic/nrf_802154/libnrf-802154-platform.a /home/user/ncs/v2.0.2/nrfxlib/nrf_802154/sl/sl/lib/nRF52840/hard-float/libnrf-802154-sl.a -no-pie -Wl,--gc-sections -Wl,--build-id=none -Wl,--sort-common=descending -Wl,--sort-section=alignment -Wl,-u,_OffsetAbsSyms -Wl,-u,_ConfigAbsSyms -nostdlib -static -Wl,-X -Wl,-N -Wl,--orphan-handling=warn -lm -Wl,-lc -L"/home/user/zephyr-sdk-0.14.2/arm-zephyr-eabi/arm-zephyr-eabi"/lib/thumb/v7e-m+fp/hard -Wl,-lgcc -lc -specs=nano.specs modules/openthread/build/src/ncp/libopenthread-rcp.a modules/openthread/build/src/core/libopenthread-radio.a modules/openthread/build/src/lib/hdlc/libopenthread-hdlc.a modules/openthread/build/src/lib/spinel/libopenthread-spinel-rcp.a /home/user/ncs/v2.0.2/nrfxlib/mpsl/lib/cortex-m4/hard-float/libmpsl.a modules/nrfxlib/nrfxlib/nrf_security/src/libmbedtls.a modules/nrfxlib/nrfxlib/nrf_security/src/libmbedx509.a modules/nrfxlib/nrfxlib/nrf_security/src/libmbedcrypto.a /home/user/ncs/v2.0.2/nrfxlib/crypto/nrf_cc310_platform/lib/cortex-m4/hard-float/no-interrupts/libnrf_cc310_platform_0.9.14.a /home/user/ncs/v2.0.2/nrfxlib/crypto/nrf_oberon/lib/cortex-m4/hard-float/liboberon_psa_3.0.11.a /home/user/ncs/v2.0.2/nrfxlib/crypto/nrf_oberon/lib/cortex-m4/hard-float/liboberon_mbedtls_3.0.11.a modules/nrfxlib/nrfxlib/nrf_security/src/libmbedcrypto_base.a -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=fpv4-sp-d16 -mfp16-format=ieee -lc /home/user/ncs/v2.0.2/nrfxlib/crypto/nrf_oberon/lib/cortex-m4/hard-float/liboberon_3.0.11.a && cd /home/user/ncs/v2.0.2/build/zephyr && /usr/bin/cmake -E echo
    /home/user/zephyr-sdk-0.14.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /home/user/zephyr-sdk-0.14.2/arm-zephyr-eabi/arm-zephyr-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(lib_a-svfprintf.o): in function `_svfprintf_r':
    vfprintf.c:(.text._svfprintf_r+0x33e): undefined reference to `__aeabi_dcmpun'
    /home/user/zephyr-sdk-0.14.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.bfd: vfprintf.c:(.text._svfprintf_r+0x394): undefined reference to `__aeabi_dcmpun'
    /home/user/zephyr-sdk-0.14.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.bfd: vfprintf.c:(.text._svfprintf_r+0x4bc): undefined reference to `__aeabi_d2iz'
    /home/user/zephyr-sdk-0.14.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.bfd: /home/user/zephyr-sdk-0.14.2/arm-zephyr-eabi/arm-zephyr-eabi/lib/thumb/v7e-m+fp/hard/libc_nano.a(lib_a-dtoa.o): in function `_dtoa_r':
    dtoa.c:(.text._dtoa_r+0x15a): undefined reference to `__aeabi_d2iz'
    /home/user/zephyr-sdk-0.14.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.bfd: dtoa.c:(.text._dtoa_r+0x514): undefined reference to `__aeabi_d2iz'
    /home/user/zephyr-sdk-0.14.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.bfd: dtoa.c:(.text._dtoa_r+0x598): undefined reference to `__aeabi_d2iz'
    /home/user/zephyr-sdk-0.14.2/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/10.3.0/../../../../arm-zephyr-eabi/bin/ld.bfd: dtoa.c:(.text._dtoa_r+0x646): undefined reference to `__aeabi_d2iz'
    collect2: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /home/user/ncs/v2.0.2/build
    user@ubuntu:~/ncs/v2.0.2$

    Regards

  • Hello Sigurd

    I downgraded to zephyr-sdk to 0.14.1 and I am still getting the same error :

    user@ubuntu:~/ncs/v2.0.2/nrf/samples/openthread/coprocessor$ west build -p always -b nrf52840dongle_nrf52840 -- -DOVERLAY_CONFIG="overlay-usb.conf" -DCONFIG_OPENTHREAD_THREAD_VERSION_1_2=y
    -- west build: making build dir /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build pristine
    -- west build: generating a build system
    Loading Zephyr default modules (Zephyr base).
    -- Application: /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor
    -- Using NCS Toolchain 2.0.2 for building. (/home/user/ncs/toolchains/v2.0.2/cmake)
    -- Found Python3: /home/user/ncs/toolchains/v2.0.2/usr/local/bin/python3 (found suitable exact version "3.8.10") found components: Interpreter
    -- Cache files will be written to: /home/user/.cache/zephyr
    -- Zephyr version: 3.0.99 (/home/user/ncs/v2.0.2/zephyr)
    -- Found west (found suitable version "0.13.1", minimum required is "0.7.1")
    -- Board: nrf52840dongle_nrf52840
    -- Found host-tools: zephyr 0.14.1 (/home/user/zephyr-sdk-0.14.1)
    -- Found dtc: /home/user/ncs/toolchains/v2.0.2/usr/local/bin/dtc (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: zephyr 0.14.1 (/home/user/zephyr-sdk-0.14.1)
    -- Found BOARD.dts: /home/user/ncs/v2.0.2/zephyr/boards/arm/nrf52840dongle_nrf52840/nrf52840dongle_nrf52840.dts
    -- Generated zephyr.dts: /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/dts.cmake
    Parsing /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/Kconfig
    Loaded configuration '/home/user/ncs/v2.0.2/zephyr/boards/arm/nrf52840dongle_nrf52840/nrf52840dongle_nrf52840_defconfig'
    Merged configuration '/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/prj.conf'
    Merged configuration '/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/overlay-usb.conf'
    Merged configuration '/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to '/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/.config'
    Kconfig header saved to '/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 10.3.0
    -- The CXX compiler identification is GNU 10.3.0
    -- The ASM compiler identification is GNU
    -- Found assembler: /home/user/zephyr-sdk-0.14.1/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc
    -- OpenThread Source Directory: /home/user/ncs/v2.0.2/modules/lib/openthread
    -- Check if the system is big endian
    -- Searching 16 bit integer
    -- Looking for sys/types.h
    -- Looking for sys/types.h - found
    -- Looking for stdint.h
    -- Looking for stdint.h - found
    -- Looking for stddef.h
    -- Looking for stddef.h - found
    -- Check size of unsigned short
    -- Check size of unsigned short - done
    -- Searching 16 bit integer - Using unsigned short
    -- Check if the system is big endian - little endian
    -- Package Name: OPENTHREAD
    -- Setting default package version: v2.0.1-117-gaacd9eb0b
    -- Package Version: v2.0.1-117-gaacd9eb0b
    CMake Warning at /home/user/ncs/v2.0.2/zephyr/CMakeLists.txt:1803 (message):
    __ASSERT() statements are globally ENABLED


    -- Configuring done
    -- Generating done
    -- Build files have been written to: /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build
    -- west build: building application
    [1/418] Preparing syscall dependency handling

    [3/418] Generating include/generated/version.h
    -- Zephyr version: 3.0.99 (/home/user/ncs/v2.0.2/zephyr), build: v3.0.99-ncs1-1
    [7/418] cd /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/m...r.h"" -P /home/user/ncs/v2.0.2/modules/lib/openthread/etc/cmake/print.cmake
    OPENTHREAD_CONFIG_ASSERT_ENABLE=1
    OPENTHREAD_CONFIG_BACKBONE_ROUTER_DUA_NDPROXYING_ENABLE=0
    OPENTHREAD_CONFIG_BACKBONE_ROUTER_MULTICAST_ROUTING_ENABLE=0
    OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS=0
    OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT=0
    OPENTHREAD_CONFIG_CHILD_SUPERVISION_ENABLE=1
    OPENTHREAD_CONFIG_COAP_API_ENABLE=1
    OPENTHREAD_CONFIG_COAP_SECURE_API_ENABLE=1
    OPENTHREAD_CONFIG_COMMISSIONER_ENABLE=1
    OPENTHREAD_CONFIG_MAC_CSL_RECEIVER_ENABLE=1
    OPENTHREAD_CONFIG_MAC_CSL_AUTO_SYNC_ENABLE=1
    OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE=1
    OPENTHREAD_CONFIG_DIAG_ENABLE=1
    OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_ECDSA_ENABLE=1
    OPENTHREAD_CONFIG_SRP_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_DUA_ENABLE=1
    OPENTHREAD_CONFIG_MLR_ENABLE=1
    OPENTHREAD_CONFIG_HEAP_EXTERNAL_ENABLE=1
    OPENTHREAD_CONFIG_IP6_FRAGMENTATION_ENABLE=1
    OPENTHREAD_CONFIG_JAM_DETECTION_ENABLE=1
    OPENTHREAD_CONFIG_JOINER_ENABLE=1
    OPENTHREAD_CONFIG_LINK_RAW_ENABLE=1
    OPENTHREAD_CONFIG_MLE_LINK_METRICS_INITIATOR_ENABLE=1
    OPENTHREAD_CONFIG_MLE_LINK_METRICS_SUBJECT_ENABLE=1
    OPENTHREAD_CONFIG_MAC_FILTER_ENABLE=1
    OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=1
    OPENTHREAD_CONFIG_PING_SENDER_ENABLE=1
    OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=1
    OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1
    OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=1
    OPENTHREAD_CONFIG_UDP_FORWARD_ENABLE=1
    OPENTHREAD_SPINEL_CONFIG_RCP_RESTORATION_MAX_COUNT=0
    PACKAGE_NAME=OPENTHREAD
    OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_2
    OPENTHREAD_CONFIG_NCP_HDLC_ENABLE=1
    KERNEL
    __ZEPHYR__=1
    _FORTIFY_SOURCE=2
    __LINUX_ERRNO_EXTENSIONS__
    USE_PARTITION_MANAGER=0
    __PROGRAM_START
    NRF52840_XXAA
    NRF_802154_CCA_CORR_LIMIT_DEFAULT=2
    NRF_802154_CCA_CORR_THRESHOLD_DEFAULT=45
    NRF_802154_CCA_ED_THRESHOLD_DEFAULT=45
    NRF_802154_CCA_MODE_DEFAULT=NRF_RADIO_CCA_MODE_ED
    NRF_802154_USE_RAW_API=1
    NRF_802154_PENDING_SHORT_ADDRESSES=16
    NRF_802154_PENDING_EXTENDED_ADDRESSES=16
    NRF_802154_RX_BUFFERS=16
    NRF_802154_TX_STARTED_NOTIFY_ENABLED=1
    NRF_802154_ACK_TIMEOUT_ENABLED=1
    NRF_802154_ENCRYPTION_ENABLED=1
    NRF_802154_SECURITY_WRITER_ENABLED=1
    NRF_802154_IE_WRITER_ENABLED=1
    NRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0
    NRF_802154_ECB_PRIORITY=-1
    NRF_802154_SWI_PRIORITY=1
    MBEDTLS_CONFIG_FILE=nrf-config.h
    MBEDTLS_USER_CONFIG_FILE=nrf-config-user.h
    [191/418] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/usb/device/class/cdc_acm.c.obj
    /home/user/ncs/v2.0.2/zephyr/subsys/usb/device/class/cdc_acm.c:460:12: warning: 'cdc_acm_init' defined but not used [-Wunused-function]
    460 | static int cdc_acm_init(const struct device *dev)
    | ^~~~~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/subsys/usb/device/class/cdc_acm.c:417:13: warning: 'cdc_interface_config' defined but not used [-Wunused-function]
    417 | static void cdc_interface_config(struct usb_desc_header *head,
    | ^~~~~~~~~~~~~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/subsys/usb/device/class/cdc_acm.c:397:13: warning: 'cdc_acm_dev_status_cb' defined but not used [-Wunused-function]
    397 | static void cdc_acm_dev_status_cb(struct usb_cfg_data *cfg,
    | ^~~~~~~~~~~~~~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/subsys/usb/device/class/cdc_acm.c:300:13: warning: 'cdc_acm_int_in' defined but not used [-Wunused-function]
    300 | static void cdc_acm_int_in(uint8_t ep, enum usb_dc_ep_cb_status_code ep_status)
    | ^~~~~~~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/subsys/usb/device/class/cdc_acm.c:919:37: warning: 'cdc_acm_driver_api' defined but not used [-Wunused-const-variable=]
    919 | static const struct uart_driver_api cdc_acm_driver_api = {
    | ^~~~~~~~~~~~~~~~~~
    [279/418] Building C object zephyr/subsys/net/lib/openthread/platform/CMakeFiles/openthread_platform.dir/uart.c.obj
    FAILED: zephyr/subsys/net/lib/openthread/platform/CMakeFiles/openthread_platform.dir/uart.c.obj
    ccache /home/user/zephyr-sdk-0.14.1/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc -DKERNEL -DMBEDTLS_CONFIG_FILE=\"nrf-config.h\" -DMBEDTLS_USER_CONFIG_FILE=\"nrf-config-user.h\" -DNRF52840_XXAA -DNRF_802154_ACK_TIMEOUT_ENABLED=1 -DNRF_802154_CCA_CORR_LIMIT_DEFAULT=2 -DNRF_802154_CCA_CORR_THRESHOLD_DEFAULT=45 -DNRF_802154_CCA_ED_THRESHOLD_DEFAULT=45 -DNRF_802154_CCA_MODE_DEFAULT=NRF_RADIO_CCA_MODE_ED -DNRF_802154_ECB_PRIORITY=-1 -DNRF_802154_ENCRYPTION_ENABLED=1 -DNRF_802154_IE_WRITER_ENABLED=1 -DNRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0 -DNRF_802154_PENDING_EXTENDED_ADDRESSES=16 -DNRF_802154_PENDING_SHORT_ADDRESSES=16 -DNRF_802154_RX_BUFFERS=16 -DNRF_802154_SECURITY_WRITER_ENABLED=1 -DNRF_802154_SWI_PRIORITY=1 -DNRF_802154_TX_STARTED_NOTIFY_ENABLED=1 -DNRF_802154_USE_RAW_API=1 -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__LINUX_ERRNO_EXTENSIONS__ -D__PROGRAM_START -D__ZEPHYR__=1 -I/home/user/ncs/v2.0.2/nrf/drivers/mpsl/clock_control -I/home/user/ncs/v2.0.2/zephyr/include/zephyr -I/home/user/ncs/v2.0.2/zephyr/include -I/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/include/generated -I/home/user/ncs/v2.0.2/zephyr/soc/arm/nordic_nrf/nrf52 -I/home/user/ncs/v2.0.2/zephyr/lib/libc/newlib/include -I/home/user/ncs/v2.0.2/zephyr/soc/arm/nordic_nrf/common/. -I/home/user/ncs/v2.0.2/zephyr/subsys/net/lib/openthread/platform/. -I/home/user/ncs/v2.0.2/zephyr/subsys/usb/device -I/home/user/ncs/v2.0.2/zephyr/subsys/settings/include -I/home/user/ncs/v2.0.2/nrf/include -I/home/user/ncs/v2.0.2/nrf/lib/multithreading_lock/. -I/home/user/ncs/v2.0.2/zephyr/drivers/flash -I/home/user/ncs/v2.0.2/modules/hal/cmsis/CMSIS/Core/Include -I/home/user/ncs/v2.0.2/modules/hal/nordic/nrfx -I/home/user/ncs/v2.0.2/modules/hal/nordic/nrfx/drivers/include -I/home/user/ncs/v2.0.2/modules/hal/nordic/nrfx/mdk -I/home/user/ncs/v2.0.2/zephyr/modules/hal_nordic/nrfx/. -I/home/user/ncs/v2.0.2/nrfxlib/mpsl/include -I/home/user/ncs/v2.0.2/nrfxlib/mpsl/include/protocol -I/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/modules/openthread/build/etc/cmake -I/home/user/ncs/v2.0.2/modules/lib/openthread/etc/cmake -I/home/user/ncs/v2.0.2/nrfxlib/nrf_802154/driver/include -I/home/user/ncs/v2.0.2/nrfxlib/nrf_802154/sl/include -I/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/modules/nrfxlib/nrfxlib/nrf_security/src/include/generated -I/home/user/ncs/v2.0.2/nrfxlib/nrf_security/include -I/home/user/ncs/v2.0.2/nrfxlib/nrf_security/include/mbedtls -I/home/user/ncs/v2.0.2/nrfxlib/nrf_security/include/psa -I/home/user/ncs/v2.0.2/mbedtls/include -I/home/user/ncs/v2.0.2/mbedtls/include/mbedtls -I/home/user/ncs/v2.0.2/mbedtls/include/psa -I/home/user/ncs/v2.0.2/mbedtls/library -I/home/user/ncs/v2.0.2/nrfxlib/nrf_security/../crypto/nrf_oberon/include -I/home/user/ncs/v2.0.2/nrfxlib/nrf_security/../crypto/nrf_oberon/include/mbedtls -I/home/user/ncs/v2.0.2/nrfxlib/nrf_security/../crypto/nrf_oberon/include/psa -I/home/user/ncs/v2.0.2/nrfxlib/crypto/nrf_oberon/include/mbedtls -I/home/user/ncs/v2.0.2/nrfxlib/crypto/nrf_oberon/include -isystem /home/user/ncs/v2.0.2/zephyr/subsys/cpp/include -isystem /home/user/ncs/v2.0.2/modules/lib/openthread/include -isystem /home/user/ncs/v2.0.2/modules/lib/openthread/examples/platforms -isystem /home/user/ncs/v2.0.2/nrfxlib/crypto/nrf_cc310_platform/include -Os -imacros /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfpu=fpv4-sp-d16 -mfloat-abi=hard -mfp16-format=ieee -imacros /home/user/ncs/v2.0.2/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor=CMAKE_SOURCE_DIR -fmacro-prefix-map=/home/user/ncs/v2.0.2/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/home/user/ncs/v2.0.2=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -std=c99 -MD -MT zephyr/subsys/net/lib/openthread/platform/CMakeFiles/openthread_platform.dir/uart.c.obj -MF zephyr/subsys/net/lib/openthread/platform/CMakeFiles/openthread_platform.dir/uart.c.obj.d -o zephyr/subsys/net/lib/openthread/platform/CMakeFiles/openthread_platform.dir/uart.c.obj -c /home/user/ncs/v2.0.2/zephyr/subsys/net/lib/openthread/platform/uart.c
    In file included from /home/user/ncs/v2.0.2/zephyr/include/zephyr/toolchain/gcc.h:88,
    from /home/user/ncs/v2.0.2/zephyr/include/zephyr/toolchain.h:50,
    from /home/user/ncs/v2.0.2/zephyr/include/zephyr/sys/atomic.h:12,
    from /home/user/ncs/v2.0.2/zephyr/include/zephyr/logging/log_msg.h:9,
    from /home/user/ncs/v2.0.2/zephyr/include/zephyr/logging/log_core.h:9,
    from /home/user/ncs/v2.0.2/zephyr/include/zephyr/logging/log.h:11,
    from /home/user/ncs/v2.0.2/zephyr/subsys/net/lib/openthread/platform/uart.c:10:
    /home/user/ncs/v2.0.2/zephyr/subsys/net/lib/openthread/platform/uart.c: In function 'otPlatUartEnable':
    /home/user/ncs/v2.0.2/zephyr/include/zephyr/device.h:96:39: error: '__device_dts_ord_DT_CHOSEN_zephyr_ot_uart_ORD' undeclared (first use in this function)
    96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
    | ^~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
    132 | #define _DO_CONCAT(x, y) x ## y
    | ^
    /home/user/ncs/v2.0.2/zephyr/include/zephyr/device.h:96:31: note: in expansion of macro '_CONCAT'
    96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
    | ^~~~~~~
    /home/user/ncs/v2.0.2/zephyr/include/zephyr/device.h:291:37: note: in expansion of macro 'DEVICE_NAME_GET'
    291 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_NAME(node_id))
    | ^~~~~~~~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/include/zephyr/device.h:311:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
    311 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
    | ^~~~~~~~~~~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/subsys/net/lib/openthread/platform/uart.c:160:16: note: in expansion of macro 'DEVICE_DT_GET'
    160 | ot_uart.dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_ot_uart));
    | ^~~~~~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/include/zephyr/device.h:96:39: note: each undeclared identifier is reported only once for each function it appears in
    96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
    | ^~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
    132 | #define _DO_CONCAT(x, y) x ## y
    | ^
    /home/user/ncs/v2.0.2/zephyr/include/zephyr/device.h:96:31: note: in expansion of macro '_CONCAT'
    96 | #define DEVICE_NAME_GET(name) _CONCAT(__device_, name)
    | ^~~~~~~
    /home/user/ncs/v2.0.2/zephyr/include/zephyr/device.h:291:37: note: in expansion of macro 'DEVICE_NAME_GET'
    291 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_NAME(node_id))
    | ^~~~~~~~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/include/zephyr/device.h:311:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
    311 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
    | ^~~~~~~~~~~~~~~~~~
    /home/user/ncs/v2.0.2/zephyr/subsys/net/lib/openthread/platform/uart.c:160:16: note: in expansion of macro 'DEVICE_DT_GET'
    160 | ot_uart.dev = DEVICE_DT_GET(DT_CHOSEN(zephyr_ot_uart));
    | ^~~~~~~~~~~~~
    [283/418] Building C object zephyr/drivers/usb/device/CMakeFiles/drivers__usb__device.dir/usb_dc_nrfx.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: /usr/bin/cmake --build /home/user/ncs/v2.0.2/nrf/samples/openthread/coprocessor/build

    Do you have another idea?

    Regards

    Ludovic

Related