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

create_nordic_project.py failed Cannot specify sources for target "app"

I'm trying to open a nRF Connect SDK project in Segger Embedded Studio for ARM (Nordic Edition) V5.30a

When I try opening the project I get an error box with the following message:

create_nordic_project.py failed (1)

In the output terminal I see the following:

Creating solution myproject.emProject
cmake -GNinja -DBOARD=myboard -DBOARD_DIR=/home/ephimee/git/mycompany/myproject/boards/arm/myboard -B/home/ephimee/git/mycompany/myproject/build_myboard_mycompany -S/home/ephimee/git/mycompany/myproject -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=/home/ephimee/Downloads/nordic/arm_segger_embedded_studio_v530a_linux_x64_nordic -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=/home/ephimee/Downloads/nordic/arm_segger_embedded_studio_v530a_linux_x64_nordic/html/configure_nordic_project_menuconfig.py
-- Configuring incomplete, errors occurred!
See also "/home/ephimee/git/mycompany/myproject/build_myboard_mycompany/CMakeFiles/CMakeOutput.log".
Including boilerplate (Zephyr base (cached)): /home/ephimee/zephyr-sdk-0.11.4/cmake/app/boilerplate.cmake
CMake Error at /home/ephimee/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include):
  include could not find load file:

    /home/ephimee/zephyr-sdk-0.11.4/cmake/app/boilerplate.cmake
Call Stack (most recent call first):
  /home/ephimee/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
  CMakeLists.txt:9 (find_package)


CMake Error at CMakeLists.txt:12 (target_include_directories):
  Cannot specify include directories for target "app" which is not built by
  this project.


CMake Error at CMakeLists.txt:15 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:16 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:18 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:19 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:20 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:21 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:22 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:23 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:24 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:27 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:28 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:29 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:30 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:31 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:32 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:33 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:36 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:37 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:38 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:39 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:40 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:41 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:42 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:46 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:47 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:48 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:49 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:52 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.


CMake Error at CMakeLists.txt:53 (target_sources):
  Cannot specify sources for target "app" which is not built by this project.



error: cmake failed
create_nordic_project.py failed (1)

According to the log, it seems the following file does not exist:

/home/ephimee/zephyr-sdk-0.11.4/cmake/app/boilerplate.cmake

But according to the website, the boilerplate should be generated elsewhere:
https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/nrf/gs_installing.html
In the directory $HOME/ncs, execute:

west zephyr-export

This will result in the file:

$HOME/ncs/zephyr/cmake/app/boilerplate.cmake

Why is Segger looking in the wrong directory?

  • Hi,

    The boilerplate.cmake file should be located in /ncs/zephyr/cmake/app/boilerplate.cmake. When the project can't find the boilerplate.cmake file, the problem is often with the installation of the SDK and toolchain, or with some configuration when you open the project. I also know that some people have had problems with opening a project if they've installed the SDK in another location than C:\ncs, such as C:\Users\username\ncs. This is however on Windows, but it might be that the same problem could happen on Linux.

    How did you install NCS, and which version of NCS are you using? How did you configure the project when trying to open it in SES? I see that you're using a custom board with your project. Did you follow a guide when creating it, such as in the nRF Connect SDK Tutorial or the Board Porting Guide in Zephyr? Also, is the error there only with your custom board, or is it also a problem when using some of the boards in NCS?

    I will try to see if I can replicate your issue on Linux. It's not certain that I'll get the same problem if the issue is with your custom board or the installation, or if I'm testing with another version of NCS, but I'll try and then I'll come back to you.

    Best regards,

    Marte

  • > How did you install NCS, and which version of NCS are you using?

    I installed NCS following the instructions here:
    developer.nordicsemi.com/.../gs_installing.html

    I have NCS version 1.4.99

    > How did you configure the project when trying to open it in SES?
    I start bin/emStudio, then I get a popup window with nRF connect options.
    I select the project folder and I select the board folder. The rest I leave default and press OK.
    When it fails, I close SES and empty the build folder.

    > I see that you're using a custom board with your project. Did you follow a guide when creating it, such as in the nRF Connect SDK Tutorial or the Board Porting Guide in Zephyr?
    I did not create the board folder. It was created by someone else under Windows. In Windows everything is working fine, I'm trying to figure out why it doesn't work on Linux.

    > Also, is the error there only with your custom board, or is it also a problem when using some of the boards in NCS?
    I don't understand the question regarding "in NCS"? I have actually no idea what NCS is. It's not explained in the documentation (see link).

  • Hi,

    I'm sorry for the late reply. I'm still looking into your issue, but I haven't been able to replicate it so far.

    ephimee said:
    I have NCS version 1.4.99

    I would recommend using the latest official release, as the master branch might be unstable. The latest official release as of now is v1.4.2.

    ephimee said:
    I have actually no idea what NCS is

     NCS is simply the short version of nRF Connect SDK. To clarify my question, I was wondering whether you only saw this issue with your custom board or with any of the other boards already in the SDK, such as nRF9160DK (with build target nrf9160dk_nrf9160ns).

    Best regards,

    Marte

Related