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

"No CMAKE_CXX_COMPILER could be found." in asset_tracker application

I downloaded the nRF Connect SDK v0.4.0-rc1 by following instructions from the Getting Started Assistant, but I am unable to set in up in SES.

I tried to set the environment variable "CXX" to "C:\gnuarmemb\bin\arm-none-eabi-g++.exe" but it didn't change my results.

Loading solution at_client.emProject
Executing load commands
cmake -GNinja -DBOARD=nrf9160_pca10090ns -DBOARD_DIR=C:/Users/Luis/Desktop/nrf9160/ncs-v0.4.0-rc1/zephyr/boards/arm/nrf9160_pca10090 -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=C:/gnuarmemb -BC:/Users/Luis/Desktop/nrf9160/ncs-v0.4.0-rc1/nrf/samples/nrf9160/at_client/build_nrf9160_pca10090ns -HC:/Users/Luis/Desktop/nrf9160/ncs-v0.4.0-rc1/nrf/samples/nrf9160/at_client -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=C:/Program Files/arm_segger_embedded_studio_v416_win_x64_nordic/html/configure_nordic_project_menuconfig.py
CMake Error at CMakeLists.txt:9 (include):
  include could not find load file:

    C:/Users/Luis/Desktop/nrf9160/ncs-v0.4.0-rc1/nrf/zephyr/cmake/app/boilerplate.cmake


-- The C compiler identification is GNU 8.2.1
-- The CXX compiler identification is unknown
-- Check for working C compiler: C:/Program Files/arm_segger_embedded_studio_v416_win_x64_nordic/bin/cc.exe
-- Check for working C compiler: C:/Program Files/arm_segger_embedded_studio_v416_win_x64_nordic/bin/cc.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - failed
-- Detecting C compile features
-- Detecting C compile features - failed
CMake Error at CMakeLists.txt:10 (project):
  No CMAKE_CXX_COMPILER could be found.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


-- Configuring incomplete, errors occurred!
See also "C:/Users/Luis/Desktop/nrf9160/ncs-v0.4.0-rc1/nrf/samples/nrf9160/at_client/build_nrf9160_pca10090ns/CMakeFiles/CMakeOutput.log".
See also "C:/Users/Luis/Desktop/nrf9160/ncs-v0.4.0-rc1/nrf/samples/nrf9160/at_client/build_nrf9160_pca10090ns/CMakeFiles/CMakeError.log".
Project load failed
Reported error: solution load command failed (1)

  • Hey,

    go to options in SES and then nRF Connect. Make sure all options are according to the screenshot below.

    Substitute the paths for your respective toolchain and Zephyr paths.

  • I did set these paths to where my gnuarmemb directory is and where my zephyr directory is.
    This is why I'm confused about why it doesn't work..

  • Have you tried installing the 7 2018-q2-update release of the arm gcc toolchain? That's the recommended version.

  • To make sure that I had the right arm gcc toolchain I reinstalled the toolchain itself and cmake, but the log didn't really change:

    Loading solution asset_tracker.emProject
    Executing load commands
    cmake -GNinja -DBOARD=nrf9160_pca10090ns -DBOARD_DIR=C:/Users/Luis/Desktop/nrf9160/ncs/zephyr/boards/arm/nrf9160_pca10090 -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=C:/gnuarmemb -BC:/Users/Luis/Desktop/nrf9160/ncs/nrf/samples/nrf9160/asset_tracker/build_nrf9160_pca10090ns -HC:/Users/Luis/Desktop/nrf9160/ncs/nrf/samples/nrf9160/asset_tracker -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=C:/Program Files/arm_segger_embedded_studio_v416_win_x64_nordic/html/configure_nordic_project_menuconfig.py
    CMake Error at CMakeLists.txt:9 (include):
      include could not find load file:
    
        C:/Users/Luis/Desktop/nrf9160/ncs-v0.4.0-rc1/nrf/zephyr/cmake/app/boilerplate.cmake
    
    
    -- The C compiler identification is GNU 8.2.1
    CMake Error at C:/Program Files/CMake/share/cmake-3.14/Modules/CMakeDetermineCXXCompiler.cmake:48 (message):
      Could not find compiler set in environment variable CXX:
    
      C:\gnuarmemb\bin\arm-none-eabi-g++.exe --works.
    
    Call Stack (most recent call first):
      CMakeLists.txt:10 (project)
    
    
    CMake Error: CMAKE_CXX_COMPILER not set, after EnableLanguage
    -- Configuring incomplete, errors occurred!
    See also "C:/Users/Luis/Desktop/nrf9160/ncs/nrf/samples/nrf9160/asset_tracker/build_nrf9160_pca10090ns/CMakeFiles/CMakeOutput.log".
    See also "C:/Users/Luis/Desktop/nrf9160/ncs/nrf/samples/nrf9160/asset_tracker/build_nrf9160_pca10090ns/CMakeFiles/CMakeError.log".
    Project load failed
    Reported error: solution load command failed (1)

  • Have you tried building using the command line? Did it work?

Related