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

west build works, but SES open fails

I've been using west build and SES open for projects that only use the app processor without issue.  However, I'm not trying them with a project using both the app and network processor.  I can do a command line west build and flash for nrf/samples/bluetooth/peripheral_lbs.  But when I try to open it in SES I get the failure shown below.  It looks like maybe it can't find ninja when trying to build the network processor firmware?  The path for ninja is setup in SES and works for projects that are just app projects.  Am I missing some other setup?

Creating solution peripheral_lbs.emProject
/usr/local/bin/cmake -GNinja -DBOARD=nrf5340dk_nrf5340_cpuapp -DBOARD_DIR=/Users/denis/sandbox/ncs/zephyr/boards/arm/nrf5340dk_nrf5340 -B/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp -S/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=/Users/denis/sandbox/gcc-arm-none-eabi-9-2019-q4-major -DPYTHON_EXECUTABLE=/usr/local/bin/python3 -DCMAKE_MAKE_PROGRAM=/usr/local/bin/ninja -DDTC=/usr/local/bin/dtc -DCMAKE_BUILD_TYPE=Debug -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=/Applications/arm_segger_embedded_studio_v534a_macos_x64_nordic/html/configure_nordic_project_menuconfig.py
-- Application: /Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs
-- Zephyr version: 2.4.0 (/Users/denis/sandbox/ncs/zephyr)
-- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
-- Board: nrf5340dk_nrf5340_cpuapp
-- Cache files will be written to: /Users/denis/Library/Caches/zephyr
-- Found dtc: /usr/local/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/Users/denis/sandbox/gcc-arm-none-eabi-9-2019-q4-major)
-- Found BOARD.dts: /Users/denis/sandbox/ncs/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp.dts
-- Generated zephyr.dts: /Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/zephyr/include/generated/devicetree_unfixed.h
Parsing /Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/Kconfig
Loaded configuration '/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/zephyr/.config'
No change to configuration in '/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/zephyr/.config'
No change to Kconfig header in '/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/zephyr/include/generated/autoconf.h'
-- Application: /Users/denis/sandbox/ncs/zephyr/samples/bluetooth/hci_rpmsg
-- Zephyr version: 2.4.0 (/Users/denis/sandbox/ncs/zephyr)
-- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
-- Board: nrf5340dk_nrf5340_cpunet
-- Cache files will be written to: /Users/denis/Library/Caches/zephyr
-- Found toolchain: gnuarmemb (/Users/denis/sandbox/gcc-arm-none-eabi-9-2019-q4-major)
-- Found BOARD.dts: /Users/denis/sandbox/ncs/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpunet.dts
-- Generated zephyr.dts: /Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/hci_rpmsg/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/hci_rpmsg/zephyr/include/generated/devicetree_unfixed.h
Parsing /Users/denis/sandbox/ncs/zephyr/Kconfig
Loaded configuration '/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/hci_rpmsg/zephyr/.config'
No change to configuration in '/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/hci_rpmsg/zephyr/.config'
No change to Kconfig header in '/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/hci_rpmsg/zephyr/include/generated/autoconf.h'
-- Configuring incomplete, errors occurred!
See also "/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/hci_rpmsg/CMakeFiles/CMakeOutput.log".
-- Configuring incomplete, errors occurred!
See also "/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/CMakeFiles/CMakeOutput.log".
See also "/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/CMakeFiles/CMakeError.log".
Including boilerplate (Zephyr base (cached)): /Users/denis/sandbox/ncs/zephyr/cmake/app/boilerplate.cmake
nrf5340dk_nrf5340_cpuapp.dts.pre.tmp:55.42-67.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@50000000/flash-controller@39000: duplicate unit-address (also used in node /soc/peripheral@50000000/kmu@39000)
nrf5340dk_nrf5340_cpuapp.dts.pre.tmp:329.19-335.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@50000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@50000000/power@5000)
nrf5340dk_nrf5340_cpuapp.dts.pre.tmp:584.31-585.5: Warning (unique_unit_address_if_enabled): /reserved-memory/image@20000000: duplicate unit-address (also used in node /reserved-memory/image_s@20000000)
also defined at nrf5340dk_nrf5340_cpuapp.dts.pre.tmp:604.14-606.3
Adding 'hci_rpmsg' sample as child image since CONFIG_BT_RPMSG_NRF53 is set to 'y'

=== child image hci_rpmsg - CPUNET begin ===
Including boilerplate (Zephyr base (cached)): /Users/denis/sandbox/ncs/zephyr/cmake/app/boilerplate.cmake
CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
CMake Error at ../../../cmake/multi_image.cmake:214 (message):
CMake generation for hci_rpmsg failed, aborting. Command: 1
Call Stack (most recent call first):
../../../cmake/multi_image.cmake:75 (add_child_image_from_source)
../../CMakeLists.txt:85 (add_child_image)



error: cmake failed
create_nordic_project.py failed (1)

  • Hi Denis, 

    What version of NCS SDK and Segger are you using?

    Please try to delete the build folders for nrf5340dk_nrf5340_cpunet and nrf5340dk_nrf5340_cpuapp, and select nrf5340dk_nrf5340_cpuapp as the board name to build.

    -Amanda H. 

  • NCS 1.4.2

    SES 5.34a

    I've tried deleting the build folders and am using nrf5340dk_nrf5340_cpuapp for the board name.  Same issue seen:

    Creating solution peripheral_lbs.emProject
    /usr/local/bin/cmake -GNinja -DBOARD=nrf5340dk_nrf5340_cpuapp -DBOARD_DIR=/Users/denis/sandbox/ncs/zephyr/boards/arm/nrf5340dk_nrf5340 -B/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp -S/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=/Users/denis/sandbox/gcc-arm-none-eabi-9-2019-q4-major -DPYTHON_EXECUTABLE=/usr/local/bin/python3 -DCMAKE_MAKE_PROGRAM=/usr/local/bin/ninja -DDTC=/usr/local/bin/dtc -DCMAKE_BUILD_TYPE=Debug -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=/Applications/arm_segger_embedded_studio_v534a_macos_x64_nordic/html/configure_nordic_project_menuconfig.py
    -- Application: /Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs
    -- Zephyr version: 2.4.0 (/Users/denis/sandbox/ncs/zephyr)
    -- Found Python3: /usr/bin/python3 (found suitable exact version "3.8.2") found components: Interpreter
    -- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
    -- Board: nrf5340dk_nrf5340_cpuapp
    -- Cache files will be written to: /Users/denis/Library/Caches/zephyr
    -- Found dtc: /usr/local/bin/dtc (found suitable version "1.6.0", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (/Users/denis/sandbox/gcc-arm-none-eabi-9-2019-q4-major)
    -- Found BOARD.dts: /Users/denis/sandbox/ncs/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp.dts
    -- Generated zephyr.dts: /Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: /Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/zephyr/include/generated/devicetree_unfixed.h
    Parsing /Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/Kconfig
    Loaded configuration '/Users/denis/sandbox/ncs/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpuapp_defconfig'
    Merged configuration '/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/prj.conf'
    Configuration saved to '/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/zephyr/.config'
    Kconfig header saved to '/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/zephyr/include/generated/autoconf.h'
    -- The C compiler identification is GNU 9.2.1
    -- The CXX compiler identification is GNU 9.2.1
    -- The ASM compiler identification is GNU
    -- Found assembler: /Users/denis/sandbox/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc
    -- Application: /Users/denis/sandbox/ncs/zephyr/samples/bluetooth/hci_rpmsg
    -- Zephyr version: 2.4.0 (/Users/denis/sandbox/ncs/zephyr)
    -- Found Python3: /usr/bin/python3 (found suitable exact version "3.8.2") found components: Interpreter
    -- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
    -- Board: nrf5340dk_nrf5340_cpunet
    -- Cache files will be written to: /Users/denis/Library/Caches/zephyr
    -- Found toolchain: gnuarmemb (/Users/denis/sandbox/gcc-arm-none-eabi-9-2019-q4-major)
    -- Found BOARD.dts: /Users/denis/sandbox/ncs/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpunet.dts
    -- Generated zephyr.dts: /Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/hci_rpmsg/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: /Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/hci_rpmsg/zephyr/include/generated/devicetree_unfixed.h
    Parsing /Users/denis/sandbox/ncs/zephyr/Kconfig
    Loaded configuration '/Users/denis/sandbox/ncs/zephyr/boards/arm/nrf5340dk_nrf5340/nrf5340dk_nrf5340_cpunet_defconfig'
    Merged configuration '/Users/denis/sandbox/ncs/zephyr/samples/bluetooth/hci_rpmsg/prj.conf'
    Configuration saved to '/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/hci_rpmsg/zephyr/.config'
    Kconfig header saved to '/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/hci_rpmsg/zephyr/include/generated/autoconf.h'
    -- Configuring incomplete, errors occurred!
    See also "/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/hci_rpmsg/CMakeFiles/CMakeOutput.log".
    -- Configuring incomplete, errors occurred!
    See also "/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/CMakeFiles/CMakeOutput.log".
    See also "/Users/denis/sandbox/ncs/nrf/samples/bluetooth/peripheral_lbs/build_nrf5340dk_nrf5340_cpuapp/CMakeFiles/CMakeError.log".
    Including boilerplate (Zephyr base): /Users/denis/sandbox/ncs/zephyr/cmake/app/boilerplate.cmake
    nrf5340dk_nrf5340_cpuapp.dts.pre.tmp:55.42-67.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@50000000/flash-controller@39000: duplicate unit-address (also used in node /soc/peripheral@50000000/kmu@39000)
    nrf5340dk_nrf5340_cpuapp.dts.pre.tmp:329.19-335.3: Warning (unique_unit_address_if_enabled): /soc/peripheral@50000000/clock@5000: duplicate unit-address (also used in node /soc/peripheral@50000000/power@5000)
    nrf5340dk_nrf5340_cpuapp.dts.pre.tmp:584.31-585.5: Warning (unique_unit_address_if_enabled): /reserved-memory/image@20000000: duplicate unit-address (also used in node /reserved-memory/image_s@20000000)
    also defined at nrf5340dk_nrf5340_cpuapp.dts.pre.tmp:604.14-606.3
    Adding 'hci_rpmsg' sample as child image since CONFIG_BT_RPMSG_NRF53 is set to 'y'

    === child image hci_rpmsg - CPUNET begin ===
    Including boilerplate (Zephyr base): /Users/denis/sandbox/ncs/zephyr/cmake/app/boilerplate.cmake
    CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.
    CMake Error at ../../../cmake/multi_image.cmake:214 (message):
    CMake generation for hci_rpmsg failed, aborting. Command: 1
    Call Stack (most recent call first):
    ../../../cmake/multi_image.cmake:75 (add_child_image_from_source)
    ../../CMakeLists.txt:85 (add_child_image)



    error: cmake failed
    create_nordic_project.py failed (1)

  • Hi Denis,

    denis said:
    CMake Error: CMake was unable to find a build program corresponding to "Ninja". CMAKE_MAKE_PROGRAM is not set. You probably need to select a different build tool.

    I think you install NCS manually on mac os. Please correct me if I am wrong. From your current error, it seems like the "Ninja" tool is not present on the path. Could you try the following things:

    1. Check if the "ninja" command is recognized if you run it on the command line. Try "ninja --version". What does it return?

    2. Set the toolchain path in the Tool -> Option -> nRF Connect

    3. Set the toolchain to use the SES setting while opening the NCS project.

    Please let me know they can help or not. Thanks. 

    -Amanda H.

  • As I mentioned initially, I can build from the command line.  Ninja is present in the path:

    $ which ninja

    /usr/local/bin/ninja

    $ ninja --version

    1.10.2

    Here are the SES settings:

    Still getting the same error.

    It seems like the environment may not be being passed down when it is trying to build the network processor sub project?

  • Hi Denis,

    denis said:
    It seems like the environment may not be being passed down when it is trying to build the network processor sub project?

    No, it's a part of building for the app processor project and the environment is not set correctly for SES. 

    Do you open SES from the terminal or with the app icon? If the latter, could you try to open it from the terminal, after calling "source zephyr-env.sh" first? See this similar post

    If it still fails, Could you provide me the output of the following commands:

    echo $ZEPHYR_BASE
    echo $PATH

    Check that 
    - ZEPHYR_BASE is set to <path_to_ncs_root>/zephyr
    - <path_to_ncs_root>/zephyr/scripts is added to the PATH environment variable

    -Amanda H.

Related