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!

    This error is likely caused by the space character (" ") in your path, specifically "Dropbox (Kiso)". Try to remove the space character or install the SDK at another location.

    Best regards,
    Carl Richard

  • Hi Carl Richard

    and thank you very much for your quick response

    How stupid I am, I had seen this comment before and I thought I had checked it, but I can see it when you point it out. I moved the project to another folder without space - and it worked!

    Actually I get 3 CDC comports when I plug in my nRF5340-DK board, only one of them (COM22) is giving me the printed output.

    Is this normal and what are the others for?

    Once again I really appreciate your quick help (I have used other brands of ARM and never got this quick and good help before. I feel that I am not alone in the world anymore when using nRF. I will certainly give Nordic a chance since I can get this good help)

    Baldur

  • Hi again, Baldur!

    You're welcome! I'm glad to help and glad to hear that it works now!

    What you're seeing is correct. These are the three virtual com ports emulated by the nRF5340, as described in the documentation. Two of them are for logging output from the network and application cores respectively, while the third one is silent. 

    That's a very appreciated comment. Thank you very much!

    Best regards,
    Carl Richard

  • Hi Carl Richard

    I hope it is OK to follow up on last question here even though it is about something slight different. 

    I now like to compile a BLE project. From the list of examples in the documentation 

    https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/examples.html

    I would like to compile the Bluetooth: Peripheral Heart Rate Monitor with Coded PHY project.

    In the list in nRF connect not the exact name could be found, but the peripheral_hr was the most likely:

    It compiled and I did a "build and run". It looked like it programmed the board but I could not find the device in nRF Toolbox on my Android phone (as I could with the hex load example)

    To see the logic of the program I wanted to debug it but then the program started to ask about some files that I could not find, beginning with this one:

    I ignored the files and it seemed like the debug got started, but still no device found on my phone.

    I reset the board and tried several times without luck.

    When importing the project there are 3 options for the 5340dk board:

    I'm not sure what to choose. Somewhere it was recommended to choose ns endings so I used nrf5340dk_nrf5340_cpuappns.

    From the documentation is looks like the peripheral_hr is to be used with central_hr.

    Is there perhaps a better project to test against the android phone?

    Any comments here?

    Best regards,

    Baldur

  • Hi again, Baldur!

    You are correct that the name of the samples in the SDK are shortened, but in this case peripheral_hr is the sample located under zephyr\samples\bluetooth\peripheral_hr. While Bluetooth: Peripheral Heart Rate Monitor with Coded PHY is peripheral_hr_coded, located in the nrf\samples\bluetooth folder.

    Based on the sample description it's supposed to be tested with central_hr so it doesn't necessarily show up properly on a phone. I suggest testing with peripheral_uart or peripheral_lbs instead, which both can be interacted with using a phone.

    As you can see there are three possible board targets for the nRF5340DK:
    - nRF5340_cpuapp: this is the secure domain application core and it's what I recommend using initially.
    - nRF5340_cpuappns: this is the non-secure domain application core, meaning that the application will run in separate domain with certain permissions. This is controlled by the Secure Partition Manager running in the secure domain. Using this allows for more secure applications, where sensitive information and such can be stored in the secure domain.
    - nRF5340_cpunet: this is the network core, which usually run the hci_rpmsg sample enabling the application core to use the network core as a BLE controller. This should be pre programmed on the core, and you should only need to reprogram it if you change anything in the controller code (hci_rpmsg). 

    I suggest following Getting started with nRF Connect SDK (nRF53 Series) and Working with the nRF53 series guides closely.

    EDIT: Corrected some wrong info about the sample name.

    Best regards,
    Carl Richard

Reply
  • Hi again, Baldur!

    You are correct that the name of the samples in the SDK are shortened, but in this case peripheral_hr is the sample located under zephyr\samples\bluetooth\peripheral_hr. While Bluetooth: Peripheral Heart Rate Monitor with Coded PHY is peripheral_hr_coded, located in the nrf\samples\bluetooth folder.

    Based on the sample description it's supposed to be tested with central_hr so it doesn't necessarily show up properly on a phone. I suggest testing with peripheral_uart or peripheral_lbs instead, which both can be interacted with using a phone.

    As you can see there are three possible board targets for the nRF5340DK:
    - nRF5340_cpuapp: this is the secure domain application core and it's what I recommend using initially.
    - nRF5340_cpuappns: this is the non-secure domain application core, meaning that the application will run in separate domain with certain permissions. This is controlled by the Secure Partition Manager running in the secure domain. Using this allows for more secure applications, where sensitive information and such can be stored in the secure domain.
    - nRF5340_cpunet: this is the network core, which usually run the hci_rpmsg sample enabling the application core to use the network core as a BLE controller. This should be pre programmed on the core, and you should only need to reprogram it if you change anything in the controller code (hci_rpmsg). 

    I suggest following Getting started with nRF Connect SDK (nRF53 Series) and Working with the nRF53 series guides closely.

    EDIT: Corrected some wrong info about the sample name.

    Best regards,
    Carl Richard

Children
  • Hi Carl Richards

    I have tried to follow the directions as close as possible, but have not had luck compiling the peripheral_lbs example and run successfully. There are also other issues that I ran into that makes me unsure.

    Question 1)

    When I download the two hex files delivered in the Peripheral _Heart_rate example, it works if I use the programmer via nRF Connect, not If I just drag and drop to the MSD device that appears when kit is plugged in. After dragging the first file over, the drive reopens with an fail.txt file saying "Error during erase"

    I thought both methods should work. Is this normal?

    (since I have the programmer option this is not a major issue, but makes me uncertain so It would be good to know)

    Question 2:

    When I open the peripheral_lbs project via nRF connect->Toolchain manager->open IDE->Open nRF connect SDK project and do a "build and run", everything goes as expected. In my CDC terminal I get:

    But I never see any Nordic_LBS device in my phone that I can connect to (as the example https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/samples/bluetooth/peripheral_lbs/README.html indicates I should see)

    How can I debug this or get more information what to do?

    (this is a major issue since I don't have a clue how to precede)

    Question 3:

    I can build and run the blinky project, but if I try to build the biinky_pwm project

    I get the following error

    Looking at the readme.rst file for this project, 5340 is not mentioned.

    Are not all projects in the SDK meant for for 5340?

    Are there instructions for how to make it work?

    (this is not a major issue, more for me to understand how the environment is meant to be)

    Question 5

    I'm also a little confused in the nomenclature in the last image. I expected single blinky project in a solution, but in the above image there are multiple "projects" (which looks more like folders or just files (ending with .a, I guess libraries)) . I have seen videos where with a more recognizable structure

    Here there is a solution with a blinky project that has folders.

    (not a major issue but would be interesting to get a comment on this)

    Best regards,

    Baldur

Related