This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Build failure for bluetooth hci rpmsg example for nrf5340 pdk when following youtube tutorial

I am having an issue when building the hci rpmsg example for the following youtube tutorial

Zephyr RTOS and Bluetooth LE on the dual-core nRF5340

I've tried figuring this out but I keep getting the same output when building with the following:

ncs/fw-nrfconnect-nrf/zephyr on HEAD (7ddab66)
❯ west build -b nrf5340_dk_nrf5340_cpunet samples/bluetooth/hci_rpmsg
-- west build: build configuration:
source directory: PATH_TO_NCS/ncs/fw-nrfconnect-nrf/zephyr/samples/bluetooth/hci_rpmsg
build directory: PATH_TO_NCS/ncs/fw-nrfconnect-nrf/zephyr/build
BOARD: nrf5340_dk_nrf5340_cpunet (origin: CMakeCache.txt)
-- west build: building application
[0/1] Re-running CMake...
-- Zephyr version: 2.1.99
-- Selected BOARD nrf5340_dk_nrf5340_cpunet
-- Found west: /PATH_TO_NCS/.local/bin/west (found suitable version "0.6.3", minimum required is "0.6.0")
-- Loading PATH_TO_NCS/ncs/fw-nrfconnect-nrf/zephyr/boards/arm/nrf5340_dk_nrf5340/nrf5340_dk_nrf5340_cpunet.dts as base
nrf5340_dk_nrf5340_cpunet.dts.pre.tmp:79.25-85.5: Warning (unique_unit_address_if_enabled): /soc/clock@41005000: duplicate unit-address (also used in node /soc/power@41005000)
Devicetree configuration written to PATH_TO_NCS/ncs/fw-nrfconnect-nrf/zephyr/build/zephyr/include/generated/devicetree.conf
Parsing PATH_TO_NCS/ncs/fw-nrfconnect-nrf/zephyr/Kconfig
PATH_TO_NCS/ncs/fw-nrfconnect-nrf/nrf/lib/fprotect/Kconfig:19: WARNING: dt_int_val is deprecated.
PATH_TO_NCS/ncs/fw-nrfconnect-nrf/bootloader/mcuboot/zephyr/Kconfig:37: WARNING: dt_int_val is deprecated.
Loaded configuration 'PATH_TO_NCS/ncs/fw-nrfconnect-nrf/zephyr/build/zephyr/.config'
No change to 'PATH_TO_NCS/ncs/fw-nrfconnect-nrf/zephyr/build/zephyr/.config'
-- Cache files will be written to: /PATH_TO_NCS/.cache/zephyr
-- Build type: Debug
-- Host: Linux/x86_64
-- Target: Generic/arm
-- Machine: cortexm
-- Host: Linux/x86_64
-- Target: Generic/arm
-- Machine: cortexm
-- C_FLAGS : -Wall -Wextra
-- Configuring done
-- Generating done
-- Build files have been written to: PATH_TO_NCS/ncs/fw-nrfconnect-nrf/zephyr/build
ninja: error: 'cmake_object_order_depends_target_metal_', needed by 'cmake_object_order_depends_target_zephyr_final_', missing and no known rule to make it
ERROR: command exited with status 1: /usr/bin/cmake --build PATH_TO_NCS/ncs/fw-nrfconnect-nrf/zephyr/build

Parents
  • I was able to get this to build by applying a search and replace in vim using the following commands;

    :%s/depends_target_metal_ /depends_target_metal_Debug

    and

    :%s/depends_target_open_amp_ /depends_target_open_amp_Debug

    My question now is whey was this necessary ? Shouldn't these files be generated such that the proper rules are referenced?

  • What tag are you on? I was able to build samples/bluetooth/hci_rpmsg without any problems using NCS v1.2.0. Try to install NCS v1.2.0 (latest stable version) using the Toolchain Manager and see if you get the same error message.

    Best regards,

    Simon

  • Sorry for the delay, I'm on commit db49cffdce1806f55f90

  • It seems like there is an issue with CMake version 3.17.0.

    A solution could be to use CMake version 3.16.x instead, or you could check out the newest master of NCS, where this fix should be merged in.

    Best regards,

    Simon

Reply Children