Getting started with blinky doesn't work

I followed all the steps from the website:
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/develop/getting_started/index.html

But I get the following error message:

~/zephyrproject/zephyr$ west build -p always -b nrf52840dk_nrf52840 samples/basic/blinky
-- west build: making build dir /home/ephimee/zephyrproject/zephyr/build pristine
-- west build: generating a build system
Including boilerplate (Zephyr base): /home/ephimee/zephyrproject/zephyr/cmake/app/boilerplate.cmake
CMake Deprecation Warning at /home/ephimee/zephyrproject/zephyr/cmake/app/boilerplate.cmake:37 (cmake_policy):
The OLD behavior for policy CMP0079 will be removed from a future version
of CMake.

The cmake-policies(7) manual explains that the OLD behaviors of all
policies are deprecated and that a policy should be set to OLD only under
specific short-term circumstances. Projects should be ported to the NEW
behavior and not rely on setting a policy to OLD.
Call Stack (most recent call first):
/home/ephimee/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
/home/ephimee/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
CMakeLists.txt:4 (find_package)


-- Application: /home/ephimee/zephyrproject/zephyr/samples/basic/blinky
-- Zephyr version: 2.4.99 (/home/ephimee/zephyrproject/zephyr)
-- Found Python3: /usr/bin/python3.8 (found suitable exact version "3.8.10") found components: Interpreter
-- Found west (found suitable version "0.13.1", minimum required is "0.7.1")
-- Board: nrf52840dk_nrf52840
-- Cache files will be written to: /home/ephimee/.cache/zephyr
-- Found toolchain: zephyr (/home/ephimee/ncs_v2.0.2/toolchains/v2.0.2/opt/zephyr-sdk)
-- Found dtc: /usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found BOARD.dts: /home/ephimee/zephyrproject/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
CMake Error at /home/ephimee/zephyrproject/zephyr/cmake/extensions.cmake:1585 (file):
file failed to open for reading (No such file or directory):

/home/ephimee/zephyrproject/zephyr/build/zephyr/nrf52840dk_nrf52840.dts.pre.d
Call Stack (most recent call first):
/home/ephimee/zephyrproject/zephyr/cmake/dts.cmake:162 (toolchain_parse_make_rule)
/home/ephimee/zephyrproject/zephyr/cmake/app/boilerplate.cmake:506 (include)
/home/ephimee/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
/home/ephimee/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
CMakeLists.txt:4 (find_package)


FATAL ERROR: Couldn't open "nrf52840dk_nrf52840.dts.pre.tmp": No such file or directory
CMake Error at /home/ephimee/zephyrproject/zephyr/cmake/dts.cmake:205 (message):
command failed with return code: 1
Call Stack (most recent call first):
/home/ephimee/zephyrproject/zephyr/cmake/app/boilerplate.cmake:506 (include)
/home/ephimee/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
/home/ephimee/zephyrproject/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
CMakeLists.txt:4 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: /home/ephimee/.local/bin/cmake -DWEST_PYTHON=/usr/bin/python3 -B/home/ephimee/zephyrproject/zephyr/build -S/home/ephimee/zephyrproject/zephyr/samples/basic/blinky -GNinja -DBOARD=nrf52840dk_nrf52840

  • Hello,

    I have started to look at this, but was not able to reproduce the error on a Windows device. It seems you are using a Linux device, so I will try to reproduce the issue on a Linux device as well.

    In the meantime, you can help by providing some additonal information about your setup:

    1. What OS and which version of it are you using?

    2. Is there a particular reason you are using Zephyr project and not nRF Connect SDK?

    Kind Regards,
    Maria

  • I'm on Ubuntu 20.04.5 LTS.

    According to the Nordic website, they use this Zephyr project example. So if this is incorrect, the website needs to be updated.

  • Hello,

    I was not able to reproduce the error on Windows subsystem for Linux running Ubuntu 20.04 LTS. I used the virtual environment install. Did you use the virtual environment or the global install?

    Sorry for the back and forth here, I am trying to understand what goes wrong on your end.

    ephimee said:
    According to the Nordic website, they use this Zephyr project example. So if this is incorrect, the website needs to be updated.

    Yes, Zephyr samples are used for Nordic devices, but usually by installing nRF Connect SDK, and not only Zephyr project. The install guide for NCS is found here.

    Kind Regards,
    Maria

  • I am continuing to study the build log you have provided.

    -- Zephyr version: 2.4.99 (/home/ephimee/zephyrproject/zephyr)

    This version of Zephyr was tagged over two years ago. The newest tagged release is v3.2.0. The two versions of the Zephyr project uses different toolchains. If your SDK version and your toolchain version does not match, this could be the cause of your error.

    -- Found toolchain: zephyr (/home/ephimee/ncs_v2.0.2/toolchains/v2.0.2/opt/zephyr-sdk)

    Zephyr Project v3.0.99 is used with NCS v2.0.2. The toolchain version is zephyr-sdk-0.14.1.

    Since you are using Zephyr Project, I am not sure why you have a folder referring to NCS. Have you got a previous install of NCS on your computer? This could be the reason for any version incompatibilities.

    Regards,
    Maria

Related