Issues building sample programs

This is my environment:

IDE: VSC v1.82.1 with nRF Connect for VS Code Extension v2023.9.169

SDK: NCS v2.2.0

I am now unable to add and build any of the examples for nRF Connect SDK.  Seems to have occured since the latest update to VSC, although that may be coincidental.

Steps I am following:

1. From within VSC, select "Create a new application"

2. Select "Copy a sample"

3.  Select the sample I want - in this case its the advanced_non_blocking_internal_timer example

4.  Select the directory where I want the files to go - I'm just putting these in the normal location I put all the samples on my C:/

It then comes up with an error, to say it failed to create the application.  In the output window in VSC, I get this:

[07:55:21] Update available https://nsscprodmedia.blob.core.windows.net/prod/software-and-other-downloads/desktop-software/nrf-command-line-tools/sw/versions-10-x-x/10-23-0/nrf-command-line-tools-10.23.0-x64.exe
[07:55:22] nrfutil [28896]: LD { id: '1050373942', capabilities: { rtt: true, erase: false, recover: false }, device: { id: 2, jlink: [Object], serialNumber: '001050373942', serialPorts: [Array], traits: [Object], usb: [Object] } }
Command failed: git commit -m "Initial commit for advanced_non_blocking_internal_timer"
Author identity unknown

*** Please tell me who you are.

Run

  git config --global user.email "[email protected]"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'Mike@Mikes-SURFACE-PRO-7.(none)')

5.  I can see all the files on my C:/, so I just barge ahead and go an open and existing application, navigating to the application folder for the above example that was created.

6. I attempt to create a new build configuration, using these settings:

And this kicks up the following errors (sorry, but it won't let me insert it as "code" for some reason)

Building advanced_non_blocking_internal_timer
C:\WINDOWS\system32\cmd.exe /d /s /c "west build --build-dir c:/Nordic/Development/advanced_non_blocking_internal_timer/build c:/Nordic/Development/advanced_non_blocking_internal_timer --pristine --board nrf52dk_nrf52832 -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DBOARD_ROOT:STRING="c:/nordic/development/advanced_non_blocking_internal_timer""

-- west build: generating a build system
CMake Error at CMakeLists.txt:9 (include):
include could not find requested file:

C:/Nordic/Development/advanced_non_blocking_internal_timer/../../common/common.cmake


CMake Error at CMakeLists.txt:11 (GET_DEVICE_CONFIG_FILES):
Unknown CMake command "GET_DEVICE_CONFIG_FILES".


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: 'C:\Nordic\toolchains\v2.2.0\opt\bin\cmake.EXE' '-DWEST_PYTHON=C:\Nordic\toolchains\v2.2.0\opt\bin\python.exe' '-Bc:\Nordic\Development\advanced_non_blocking_internal_timer\build' -GNinja -DBOARD=nrf52dk_nrf52832 -DNCS_TOOLCHAIN_VERSION:STRING=NONE -DBOARD_ROOT:STRING=c:/nordic/development/advanced_non_blocking_internal_timer '-Sc:\Nordic\Development\advanced_non_blocking_internal_timer'

* The terminal process terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.

Is anyone else having similar problems?  Any ideas how to fix it?

Regards,

Mike

Parents Reply Children
  • Hi  

    What seems to be happening when I try and create a new application based on an existing example is:

    • it will copy all the relevant files to the specified location on my local drive
    • it will then come up with those errors about failing a git commit because I've not provided my identity in the relevant location

    The files are actually there, its just Visual Studio Code wants to try and do some sort of git commit I'm not wanting it to.

    If I go and then open an existing application and navigate to where the files were placed, I seem to be able to build and run the example.

    Not ideal, but its a procedure that seems to work!

    Wasn't like this before, so not sure what's changed.

    Best regards,

    Mike

  • Hello again. I'm glad you've found something that at least works.

    Mike Austin (LPI) said:
    Wasn't like this before, so not sure what's changed.

    I am not getting your git errors, but I am running into what you describe in 6) when trying an nrfx sample. Failing to move the common-folder is apparently recent bug that we are currently working on, though it might be fixed already as I am at least seeing the common-folder copied over when testing it myself. Though I do get the same error that you describe in 6) afterwards. Though changing: 

    C:/Nordic/Development/advanced_non_blocking_internal_timer/../../common/common.cmake

    to:

    C:/Nordic/Development/advanced_non_blocking_internal_timer/common/common.cmake

    Makes it build for me.

    Are you seeing any similar issues with other samples besides the nrfx ones? Does that count for the git problem as well? I am not seeing that on my side.

    Regards,

    Elfving

  • I've just started experimenting with NCS and came across this same issue, using 2.4.1, with the timer example, however I don't get the same issue with the nrf LED matrix sample.

  • Are you getting the same issue when simply building it in the SDK itself?

    If not, are you moving the common folder and changing the Cmakelists file to compensate?

    Regards,

    Elfving

  • No it builds within the SDK without issue.

    The post was more of I'm also seeing the issue here on a newer SDK, rather that needing help resolving the issue.
    I resolved it by coping the common folder to the above directory (due to common being set ${CMAKE_CURRENT_LIST_DIR}/../../../common ).

    I do seem to have an issue with the sample itself but I'll create a new post for that.

Related