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

Parents
  • 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

Reply
  • 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

Children
No Data
Related