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

nRF5340-DK problem starting own project ncs v1.5.0

HI

I'm in the process of evaluating nRF5340 but am new to Nordic chips and development environment. Im running Windows 10 and I installed nRF Connect 3.6.1 and installed the toolchain through it.

I managed to run the blinky proiect but have problems starting an own project.

I followed this guide

https://devzone.nordicsemi.com/nordic/nrf-connect-sdk-guides/b/getting-started/posts/nrf-connect-sdk-tutorial---part-1-ncs-v1-4-0

but when I build, I get this error

Creating solution Bprufa02.emProject
C:/Users/Notandi/ncs/v1.5.0/toolchain/opt/bin/cmake.exe -GNinja -DBOARD=nrf5340dk_nrf5340_cpuappns -DBOARD_DIR=C:\Users\Notandi\ncs\v1.5.0\zephyr\boards\arm\nrf5340dk_nrf5340 -BC:\Users\Notandi\Dropbox (Kiso)\BVerk\Geometer\V4\nordic\Bprufa02\build_nrf5340dk_nrf5340_cpuappns -SC:\Users\Notandi\Dropbox (Kiso)\BVerk\Geometer\V4\nordic\Bprufa02 -DNCS_TOOLCHAIN_VERSION=1.5.0 -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=C:\Users\Notandi\ncs\v1.5.0\toolchain\segger_embedded_studio/html/configure_nordic_project_menuconfig.py
-- Application: C:/Users/Notandi/Dropbox (Kiso)/BVerk/Geometer/V4/nordic/Bprufa02
-- Zephyr version: 2.4.99 (C:/Users/Notandi/ncs/v1.5.0/zephyr)
-- Found Python3: C:/Users/Notandi/ncs/v1.5.0/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "0.9.0", minimum required is "0.7.1")
-- Board: nrf5340dk_nrf5340_cpuappns
-- Cache files will be written to: C:/Users/Notandi/ncs/v1.5.0/zephyr/.cache
-- Found dtc: C:/Users/Notandi/ncs/v1.5.0/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (C:/Users/Notandi/ncs/v1.5.0/toolchain/opt)
-- Found BOARD.dts: C:/Users/Notandi/ncs/v1.5.0/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuappns.dts
-- Generated zephyr.dts: C:/Users/Notandi/Dropbox (Kiso)/BVerk/Geometer/V4/nordic/Bprufa02/build_nrf5340dk_nrf5340_cpuappns/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/Users/Notandi/Dropbox (Kiso)/BVerk/Geometer/V4/nordic/Bprufa02/build_nrf5340dk_nrf5340_cpuappns/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: C:/Users/Notandi/Dropbox (Kiso)/BVerk/Geometer/V4/nordic/Bprufa02/build_nrf5340dk_nrf5340_cpuappns/zephyr/include/generated/device_extern.h
-- Configuring incomplete, errors occurred!
Including boilerplate (Zephyr base): C:/Users/Notandi/ncs/v1.5.0/zephyr/cmake/app/boilerplate.cmake
-- Using NCS Toolchain 1.5.0 for building. (C:/Users/Notandi/ncs/v1.5.0/toolchain/cmake)
CMake Error at C:/Users/Notandi/ncs/v1.5.0/zephyr/cmake/kconfig.cmake:204 (message):
File not found: C:/Users/Notandi/Dropbox
Call Stack (most recent call first):
C:/Users/Notandi/ncs/v1.5.0/zephyr/cmake/app/boilerplate.cmake:534 (include)
C:/Users/Notandi/ncs/v1.5.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
C:/Users/Notandi/ncs/v1.5.0/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
CMakeLists.txt:3 (find_package)



error: cmake failed
create_nordic_project.py failed (1)

I have spend several days on this problems and looked around but cannot find a solution. I would be very happy for any hint.

Does it matter that the example uses version 1.4 and I have 1.5?

Best regards,

Baldur

Parents
  • Hi Carl Richards.

    I did not find the reply button to my last post so I put this here.

    I finally managed to compile, download and run an BLE sample application. :-)

    I found the following guide very useful:

    https://www.programmersought.com/article/51616750462/

    It goes step by step through the process mentioning all the details for a specific task.

    I think it makes better clear that I need to download two codes(and which one), one for each processor than the following example:

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/peripheral_lbs/README.html

    What I had to do in addition to the guide is to program both files at the same time with the programmer and reset afterwards:

    It would still be interesting to get comments to my previous questions.

    Best regards, and thanks again for your help,

    Baldur

  • Hi!

    Great to hear that you finally got it to work. It's correct that the programming process isn't covered for every sample, but I believe the Building and programming a sample section of the nRF53 guide should cover this part quite well.

    As for your questions:

    1.  This is likely due to the readback protection the nRF5340, which is enabled after resets. You can disable it by recovering the device as described in the documentation.

    2. You solved this, but the issue was likely that the network core wasn't programmed with the BLE controller image(hci_rpmsg).

    3. This is a issue in the board definition for the nRF5340DK in Zephyr. In short, the sample checks if the nRF5340 has a PWM led node in its devicetree (which is a data structure Zephyr uses for describing hardware) and it can't find any due to it not being listed. Thus, it fails. 

    I'll see to it being fixed, but you can replace <ncs_root>\zephyr\boards\arm\nrf5340dk_nrf5340\nrf5340_cpuapp_common.dts with the attached file (which contains the rather simple fix).

    4. The confusing project structure of NCS projects in Segger Embedded Studio is an unfortunate side effect of the build environment. The main project is the one with the CMake logo beside it and your source code inside. 

    I hope this answers your questions! Please reach out if you face any other issues!

    Best regards,
    Carl Richard

Reply
  • Hi!

    Great to hear that you finally got it to work. It's correct that the programming process isn't covered for every sample, but I believe the Building and programming a sample section of the nRF53 guide should cover this part quite well.

    As for your questions:

    1.  This is likely due to the readback protection the nRF5340, which is enabled after resets. You can disable it by recovering the device as described in the documentation.

    2. You solved this, but the issue was likely that the network core wasn't programmed with the BLE controller image(hci_rpmsg).

    3. This is a issue in the board definition for the nRF5340DK in Zephyr. In short, the sample checks if the nRF5340 has a PWM led node in its devicetree (which is a data structure Zephyr uses for describing hardware) and it can't find any due to it not being listed. Thus, it fails. 

    I'll see to it being fixed, but you can replace <ncs_root>\zephyr\boards\arm\nrf5340dk_nrf5340\nrf5340_cpuapp_common.dts with the attached file (which contains the rather simple fix).

    4. The confusing project structure of NCS projects in Segger Embedded Studio is an unfortunate side effect of the build environment. The main project is the one with the CMake logo beside it and your source code inside. 

    I hope this answers your questions! Please reach out if you face any other issues!

    Best regards,
    Carl Richard

Children
No Data
Related