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

StudioDir variable issue

I am attempting to install the nRF Connect SDK on my CentOS 8 machine. It looked like it installed correctly, but when I attempt to load the zephyr sample "Hello World" in the SES application, it errors out with the below messages.  My initial guess is that the StudioDir variable is set incorrectly. Does anyone know how to globally reset it?

Creating solution hello_world.emProject
cmake -GNinja -DBOARD=thingy91_nrf9160ns -DBOARD_DIR=/home/rs/Downloads/nrf/boards/arm/thingy91_nrf9160 -B/home/rs/Downloads/zephyr/samples/hello_world/build_thingy91_nrf9160ns -S/home/rs/Downloads/zephyr/samples/hello_world -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=/opt/gnuarmemb -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=/home/rs/Downloads/EmbeddedStudio_ARM_Nordic_v534a_linux_x64/arm_segger_embedded_studio_v534a_linux_x64_nordic/html/configure_nordic_project_menuconfig.py
-- Application: /home/rs/Downloads/zephyr/samples/hello_world
-- Zephyr version: 2.4.99 (/home/rs/Downloads/zephyr)
-- Found Python3: /usr/bin/python3.8 (found suitable exact version "3.8.3") found components: Interpreter
-- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
-- Board: thingy91_nrf9160ns
-- Cache files will be written to: /home/rs/.cache/zephyr
-- Found toolchain: gnuarmemb (/opt/gnuarmemb)
-- Found BOARD.dts: /home/rs/Downloads/nrf/boards/arm/thingy91_nrf9160/thingy91_nrf9160ns.dts
-- Generated zephyr.dts: /home/rs/Downloads/zephyr/samples/hello_world/build_thingy91_nrf9160ns/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /home/rs/Downloads/zephyr/samples/hello_world/build_thingy91_nrf9160ns/zephyr/include/generated/devicetree_unfixed.h
Parsing /home/rs/Downloads/zephyr/Kconfig
Loaded configuration '/home/rs/Downloads/nrf/boards/arm/thingy91_nrf9160/thingy91_nrf9160ns_defconfig'
Merged configuration '/home/rs/Downloads/zephyr/samples/hello_world/prj.conf'
-- Configuring incomplete, errors occurred!
Including boilerplate (Zephyr base): /home/rs/Downloads/zephyr/cmake/app/boilerplate.cmake
FATAL ERROR: no west workspace found from "/home/rs/Downloads/zephyr"; "west topdir" requires one.
Things to try:
- Change directory to somewhere inside a west workspace and retry.
- Set ZEPHYR_BASE to a zephyr repository path in a west workspace.
- Run "west init" to set up a workspace here.
- Run "west init -h" for additional information.


/home/rs/Downloads/nrf/boards/arm/thingy91_nrf9160/thingy91_nrf9160ns_defconfig:35: warning: attempt to assign the value 'y' to the undefined symbol ADP536X

error: Aborting due to Kconfig warnings

CMake Error at /home/rs/Downloads/zephyr/cmake/kconfig.cmake:255 (message):
command failed with return code: 1
Call Stack (most recent call first):
/home/rs/Downloads/zephyr/cmake/app/boilerplate.cmake:507 (include)
/home/rs/Downloads/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
/home/rs/Downloads/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
CMakeLists.txt:5 (find_package)



error: cmake failed
create_nordic_project.py failed (1)

Parents
  • Hi!

    It looks like you haven't set up west yet.

    In Cloning the repositories, do steps 4, 5 and 6 to set ncs as a west workspace and your first fatal error should disappear.

    Best regards,

    Heidi

  • I have set up the west repository, just in the /home/rs/Downloads/ncs directory instead of the /zephyr directory above. How do I change that variable to update the path specifics?

  • Here is an updated error code after removing the other false directories.

    Creating solution hello_world.emProject
    cmake -GNinja -DBOARD=thingy91_nrf9160ns -DBOARD_DIR=/home/rs/Downloads/ncs/nrf/boards/arm/thingy91_nrf9160 -B/home/rs/Downloads/ncs/zephyr/samples/hello_world/build_thingy91_nrf9160ns -S/home/rs/Downloads/ncs/zephyr/samples/hello_world -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=/opt/gnuarmemb -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=/home/rs/Downloads/EmbeddedStudio_ARM_Nordic_v534a_linux_x64/arm_segger_embedded_studio_v534a_linux_x64_nordic/html/configure_nordic_project_menuconfig.py
    -- The C compiler identification is GNU 8.3.1
    -- The CXX compiler identification is GNU 8.3.1
    -- Detecting C compiler ABI info
    -- Detecting C compiler ABI info - failed
    -- Check for working C compiler: /opt/gnuarmemb/bin/arm-none-eabi-gcc
    -- Check for working C compiler: /opt/gnuarmemb/bin/arm-none-eabi-gcc - broken
    -- Configuring incomplete, errors occurred!
    See also "/home/rs/Downloads/ncs/zephyr/samples/hello_world/build_thingy91_nrf9160ns/CMakeFiles/CMakeOutput.log".
    See also "/home/rs/Downloads/ncs/zephyr/samples/hello_world/build_thingy91_nrf9160ns/CMakeFiles/CMakeError.log".
    Including boilerplate (Zephyr base (cached)): /home/rs/Downloads/zephyr/cmake/app/boilerplate.cmake
    CMake Error at /home/rs/Downloads/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include):
    include could not find load file:
    
    /home/rs/Downloads/zephyr/cmake/app/boilerplate.cmake
    Call Stack (most recent call first):
    /home/rs/Downloads/ncs/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:40 (include_boilerplate)
    CMakeLists.txt:5 (find_package)
    
    
    CMake Error at /usr/local/share/cmake-3.19/Modules/CMakeTestCCompiler.cmake:66 (message):
    The C compiler
    
    "/opt/gnuarmemb/bin/arm-none-eabi-gcc"
    
    is not able to compile a simple test program.
    
    It fails with the following output:
    
    Change Dir: /home/rs/Downloads/ncs/zephyr/samples/hello_world/build_thingy91_nrf9160ns/CMakeFiles/CMakeTmp
    
    Run Build Command(s):/usr/bin/ninja-build cmTC_758a5 && [1/2] Building C object CMakeFiles/cmTC_758a5.dir/testCCompiler.c.o
    [2/2] Linking C executable cmTC_758a5
    FAILED: cmTC_758a5
    : && /opt/gnuarmemb/bin/arm-none-eabi-gcc CMakeFiles/cmTC_758a5.dir/testCCompiler.c.o -o cmTC_758a5 && :
    /opt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/bin/ld: /opt/gnuarmemb/bin/../lib/gcc/arm-none-eabi/8.3.1/../../../../arm-none-eabi/lib/libc.a(lib_a-exit.o): in function `exit':
    exit.c:(.text.exit+0x2c): undefined reference to `_exit'
    collect2: error: ld returned 1 exit status
    ninja: build stopped: subcommand failed.
    
    
    
    
    
    CMake will not be able to correctly generate this project.
    Call Stack (most recent call first):
    CMakeLists.txt:6 (project)
    
    
    
    error: cmake failed
    create_nordic_project.py failed (1)

  • Could you send me the full build folder so I can take a look at the error messages from CMake?

    I believe you need to initialize the "nrf" directory (ncs/nrf) as the west workspace, not "ncs". 

  • Hi, could you try updating to version 9-2019-q4-major of the GNU Arm Embedded Toolchain?

    I see from the log you are using an older version.

  • That did seem to fix the issue! Thank you for your support!

Reply Children
No Data
Related