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

Having trouble getting any NRF Connect project to connect to board

I am attempting to load up the default NRF project "AT_Client" located at ...\ncs\v1.4.2\nrf\samples\nrf9160\at_client project, however, whenever I attempt to load it with the SEGGER Embedded Studio software that the nRF Connect Tool Chain Manager installed, it keeps breaking during the cmake of the project. Following error has been posted below. Also, I cannot actually connect to my device by going to the "Target -> connect" option in the toolbar. Can I have some assistance please? I seem to be chasing my tail here...

"""

Creating solution at_client.emProject
.../ncs/v1.4.2/toolchain/opt/bin/cmake.exe -GNinja -DBOARD=thingy91_nrf9160ns -DBOARD_DIR=...\ncs\v1.4.2\nrf\boards\arm\thingy91_nrf9160 -B...\ncs\v1.4.2\nrf\samples\nrf9160\at_client\build_thingy91_nrf9160ns -S...\ncs\v1.4.2\nrf\samples\nrf9160\at_client -DNCS_TOOLCHAIN_VERSION=1.4.2 -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=...\ncs\v1.4.2\toolchain\segger_embedded_studio/html/configure_nordic_project_menuconfig.py
-- Application: .../ncs/v1.4.2/nrf/samples/nrf9160/at_client
-- Zephyr version: 2.4.0 (.../ncs/v1.4.2/zephyr)
-- Found Python3: .../ncs/v1.4.2/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "0.7.2", minimum required is "0.7.1")
-- Board: thingy91_nrf9160ns
-- Cache files will be written to: .../ncs/v1.4.2/zephyr/.cache
-- Found dtc: .../ncs/v1.4.2/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (.../ncs/v1.4.2/toolchain/opt)
-- Found BOARD.dts: .../ncs/v1.4.2/nrf/boards/arm/thingy91_nrf9160/thingy91_nrf9160ns.dts
-- Generated zephyr.dts: .../ncs/v1.4.2/nrf/samples/nrf9160/at_client/build_thingy91_nrf9160ns/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: .../ncs/v1.4.2/nrf/samples/nrf9160/at_client/build_thingy91_nrf9160ns/zephyr/include/generated/devicetree_unfixed.h
-- Configuring incomplete, errors occurred!
Including boilerplate (Zephyr base): .../ncs/v1.4.2/zephyr/cmake/app/boilerplate.cmake
-- Using NCS Toolchain 1.4.2 for building. (.../ncs/v1.4.2/toolchain/cmake)
CMake Error at .../ncs/v1.4.2/zephyr/cmake/kconfig.cmake:181 (message):
File not found: ...
Call Stack (most recent call first):
.../ncs/v1.4.2/zephyr/cmake/app/boilerplate.cmake:591 (include)
.../ncs/v1.4.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
.../ncs/v1.4.2/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
CMakeLists.txt:9 (find_package)



error: cmake failed
create_nordic_project.py failed (1)

"'"

  • Hi,

    From the board you chose when opening the project, I'm assuming you are trying to program a Thingy:91. Have you connected the Thingy:91 directly to your computer with the USB or are you using an external debug probe? In order to program the Thingy:91 with SES you need to use an external debug probe, such as nRF9160 DK or any J-Link device supporting ARM Cortex-M33. When connecting the Thingy:91 directly to your PC through USB, the device uses MCUboot in order to program the device, so you can only program MCUboot compatible images, such as app_signed.hex, and you must to so with the nRF Connect Programmer, which can be found in nRF Connect for Desktop. Please see the working with Thingy:91 page for more information about how to program the device.

    Best regards,

    Marte

  • I have an official J-Link Pro debug probe that I was trying to use with the device, however, if I can just post the hex file to the board directly, then maybe that will work for me. What would be the steps in order to convert a c project to the hex format (using the nRF Embedded Studio SDK) so that I can send it to the Nordic Thingy 91 device over the programmer application?

  • Hi,

    You get the app_signed.hex file after building the project, and it will be located inside the zephyr folder in your build folder. This is however only for the applications in NCS, such as Asset Tracker and Serial LTE modem, and not the samples, unfortunately. For the samples, you must use a debug probe.

    When you have connected the Thingy:91 to your computer with the debug probe, you should be able to choose it in the LTE Link Monitor application in nRF Connect for Desktop. There you should be able to see what's printed by the application, as well as the status of the modem and whether you're connected to a network or not. Could you please verify whether you're able to open your device in LTE Link Monitor or not?

    You said that you had problems with building the project as well. How did you install NCS, and which OS are you using? Have you made any changes to the project? I just tried with a clean installation of v1.4.2, installed using the Toolchain Manager, and I couldn't reproduce your problem.

    Best regards,

    Marte

  • When I have connected the Thingy:91 to the computer via the J-Link Pro, I cannot see the device from the drop down list, there are no devices available in the LTE Link Monitor.

    As for building the project, I think the cmake error was related to a space in the ncs path (windows has a space in the user's name). I did a remove and reinstalled to a path without a space in the name. I removed/installed through the toolchain manager in the nRF Connect v3.6.1 application. I have made no changes to the default project in the ncs directory (the at_client folder). I am using Windows 10 Home.

    After reinstalling, I just double checked and it looks like the build of the project does work, so that will be good. Do you know if it is possible to create a hex file in a project that I create? As in, for example, I want to just print off a statement every 20 seconds or something like that, could I create a c-project that would do that, and then build it, then load the hex file to the Thingy:91 and just have it run automatically at startup?

  • Just so you know, I am able to see the Nordic nRF9160 through the J-Link Pro now. There was a problem with the cable that we were using. So just a quick update on the issue above: I figured out the compile issue for the projects, the build is producing a *.hex file under the "zephyr" folder, which I believe is the hex file that I should write to the Thingy:91 that I am using. Inside the SEGGER Embedded Studio for ARM v5.10d program, when I attempt to connect to the target by going to "Target -> Connect J-Link", I get an error saying "Failed to connect to target. No idcode detected. Please check connection and Target Interface Type". Do you know why I am getting this error, and also if you wouldn't mind answering my questions above, that would be very helpful.

    Thank you for your time!

Related