nRF Connect SDK

Hi,

I am trying to install nRFconnect SDK and VS Code Windows 10 by following NORDIC Dev Academy lessons. 

Encountering following errors while building the following example

zephyr\samples\basic\blinky

FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\0b393f9e1b\opt\bin\cmake.EXE' --build C:/myfw/ncsfund/l1_e2/build

Parents Reply Children
  • Hi,

    Thanks for the reply.

    Attempt was made to install nRF Connect SDK and flash first example as per NORDIC Dev Academy.

    Find attached a complete log of scrrenshots and error messages encountered.

    Also find attached TERMINAL output log while building.

    Hope this helps to find a solution.

    Please note in the past I have successfully run nRF connect SDK older versions perhaps but I am getting into development with NORDIC SoCs again after a long interval.

    Regards,

    Jogen 

    NORDIC_DEVZONE.pdf

     *  Executing task: nRF Connect: Generate config nrf52840dk/nrf52840 for c:\myfw\ncsfund\l1_e2 
    
    Building l1_e2
    C:\Windows\system32\cmd.exe /d /s /c "west build --build-dir c:/myfw/ncsfund/l1_e2/build c:/myfw/ncsfund/l1_e2 --pristine --board nrf52840dk/nrf52840 -- -DBOARD_ROOT=c:/myfw/ncsfund/l1_e2"
    
    -- west build: generating a build system
    Loading Zephyr module(s) (Zephyr base): sysbuild_default
    -- Found Python3: C:/ncs/toolchains/0b393f9e1b/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: C:/ncs/v3.0.2/zephyr/.cache
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf52840dk, qualifiers: nrf52840
    Parsing C:/ncs/v3.0.2/zephyr/share/sysbuild/Kconfig
    Loaded configuration 'C:/myfw/ncsfund/l1_e2/build/_sysbuild/empty.conf'
    Merged configuration 'C:/myfw/ncsfund/l1_e2/build/_sysbuild/empty.conf'
    Configuration saved to 'C:/myfw/ncsfund/l1_e2/build/zephyr/.config'
    Kconfig header saved to 'C:/myfw/ncsfund/l1_e2/build/_sysbuild/autoconf.h'
    -- 
       ***************************
       * Running CMake for l1_e2 *
       ***************************
    
    Loading Zephyr default modules (Zephyr base).
    -- Application: C:/myfw/ncsfund/l1_e2
    -- CMake version: 3.21.0
    -- Found Python3: C:/ncs/toolchains/0b393f9e1b/opt/bin/python.exe (found suitable version "3.12.4", minimum required is "3.10") found components: Interpreter 
    -- Cache files will be written to: C:/ncs/v3.0.2/zephyr/.cache
    -- Zephyr version: 4.0.99 (C:/ncs/v3.0.2/zephyr)
    -- Found west (found suitable version "1.2.0", minimum required is "0.14.0")
    -- Board: nrf52840dk, qualifiers: nrf52840
    -- Found host-tools: zephyr 0.17.0 (C:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk)
    -- Found toolchain: zephyr 0.17.0 (C:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk)
    -- Found Dtc: C:/ncs/toolchains/0b393f9e1b/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6") 
    -- Found BOARD.dts: C:/ncs/v3.0.2/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840.dts
    -- Generated zephyr.dts: C:/myfw/ncsfund/l1_e2/build/l1_e2/zephyr/zephyr.dts
    -- Generated pickled edt: C:/myfw/ncsfund/l1_e2/build/l1_e2/zephyr/edt.pickle
    -- Generated zephyr.dts: C:/myfw/ncsfund/l1_e2/build/l1_e2/zephyr/zephyr.dts
    -- Generated devicetree_generated.h: C:/myfw/ncsfund/l1_e2/build/l1_e2/zephyr/include/generated/zephyr/devicetree_generated.h
    -- Including generated dts.cmake file: C:/myfw/ncsfund/l1_e2/build/l1_e2/zephyr/dts.cmake
    Parsing C:/ncs/v3.0.2/zephyr/Kconfig
    Loaded configuration 'C:/ncs/v3.0.2/zephyr/boards/nordic/nrf52840dk/nrf52840dk_nrf52840_defconfig'
    Merged configuration 'C:/myfw/ncsfund/l1_e2/prj.conf'
    Merged configuration 'C:/myfw/ncsfund/l1_e2/build/l1_e2/zephyr/.config.sysbuild'
    Configuration saved to 'C:/myfw/ncsfund/l1_e2/build/l1_e2/zephyr/.config'
    Kconfig header saved to 'C:/myfw/ncsfund/l1_e2/build/l1_e2/zephyr/include/generated/zephyr/autoconf.h'
    -- Found GnuLd: c:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi/bin/ld.bfd.exe (found version "2.38") 
    -- The C compiler identification is GNU 12.2.0
    -- The CXX compiler identification is GNU 12.2.0
    -- The ASM compiler identification is GNU
    -- Found assembler: C:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk/arm-zephyr-eabi/bin/arm-zephyr-eabi-gcc.exe
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/myfw/ncsfund/l1_e2/build/l1_e2
    -- Configuring done
    -- Generating done
    -- Build files have been written to: C:/myfw/ncsfund/l1_e2/build
    -- west build: building application
    [4/152] Generating include/generated/zephyr/version.h
    -- Zephyr version: 4.0.99 (C:/ncs/v3.0.2/zephyr), build: v4.0.99-ncs1-2
    [147/152] Linking C executable zephyr\zephyr_pre0.elf
    FAILED: zephyr/zephyr_pre0.elf zephyr/zephyr_pre0.map C:/myfw/ncsfund/l1_e2/build/l1_e2/zephyr/zephyr_pre0.map 
    cmd.exe /C "cd . && C:\ncs\toolchains\0b393f9e1b\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe  -gdwarf-4 zephyr/CMakeFiles/zephyr_pre0.dir/misc/empty_file.c.obj -o zephyr\zephyr_pre0.elf  zephyr/CMakeFiles/offsets.dir/./arch/arm/core/offsets/offsets.c.obj  -T  zephyr/linker_zephyr_pre0.cmd  -Wl,-Map=C:/myfw/ncsfund/l1_e2/build/l1_e2/zephyr/zephyr_pre0.map  -Wl,--whole-archive  app/libapp.a  zephyr/libzephyr.a  zephyr/arch/common/libarch__common.a  zephyr/arch/arch/arm/core/libarch__arm__core.a  zephyr/arch/arch/arm/core/cortex_m/libarch__arm__core__cortex_m.a  zephyr/arch/arch/arm/core/mpu/libarch__arm__core__mpu.a  zephyr/lib/libc/picolibc/liblib__libc__picolibc.a  zephyr/lib/libc/common/liblib__libc__common.a  zephyr/soc/soc/nrf52840/libsoc__nordic.a  zephyr/drivers/clock_control/libdrivers__clock_control.a  zephyr/drivers/console/libdrivers__console.a  zephyr/drivers/gpio/libdrivers__gpio.a  zephyr/drivers/pinctrl/libdrivers__pinctrl.a  zephyr/drivers/serial/libdrivers__serial.a  zephyr/drivers/timer/libdrivers__timer.a  modules/nrf/drivers/hw_cc3xx/lib..__nrf__drivers__hw_cc3xx.a  modules/hal_nordic/modules/hal_nordic/nrfx/libmodules__hal_nordic__nrfx.a  modules/segger/libmodules__segger.a  -Wl,--no-whole-archive  zephyr/kernel/libkernel.a  -LC:/myfw/ncsfund/l1_e2/build/l1_e2/zephyr  zephyr/arch/common/libisr_tables.a  -mcpu=cortex-m4  -mthumb  -mabi=aapcs  -mfp16-format=ieee  -mtp=soft  -fuse-ld=bfd  -Wl,--gc-sections  -Wl,--build-id=none  -Wl,--sort-common=descending  -Wl,--sort-section=alignment  -Wl,-u,_OffsetAbsSyms  -Wl,-u,_ConfigAbsSyms  -nostdlib  -static  -Wl,-X  -Wl,-N  -Wl,--orphan-handling=warn  -Wl,-no-pie  -specs=picolibc.specs  -DPICOLIBC_LONG_LONG_PRINTF_SCANF  C:/ncs/v3.0.2/nrfxlib/crypto/nrf_cc310_platform/lib/cortex-m4/soft-float/no-interrupts/libnrf_cc310_platform_0.9.19.a -L"c:/ncs/toolchains/0b393f9e1b/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.2.0/thumb/v7e-m/nofp" -lc -lgcc && cmd.exe /C "cd /D C:\myfw\ncsfund\l1_e2\build\l1_e2\zephyr && C:\ncs\toolchains\0b393f9e1b\opt\bin\cmake.exe -E true""
    'cmd.exe' is not recognized as an internal or external command,
    operable program or batch file.
    ninja: build stopped: subcommand failed.
    FAILED: _sysbuild/sysbuild/images/l1_e2-prefix/src/l1_e2-stamp/l1_e2-build C:/myfw/ncsfund/l1_e2/build/_sysbuild/sysbuild/images/l1_e2-prefix/src/l1_e2-stamp/l1_e2-build 
    cmd.exe /C "cd /D C:\myfw\ncsfund\l1_e2\build\l1_e2 && C:\ncs\toolchains\0b393f9e1b\opt\bin\cmake.exe --build ."
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'C:\ncs\toolchains\0b393f9e1b\opt\bin\cmake.EXE' --build C:/myfw/ncsfund/l1_e2/build
    
     *  The terminal process terminated with exit code: 1. 
     *  Terminal will be reused by tasks, press any key to close it. 
    

  • Hi Jogen,

    Could you select your Environment variables and check if the following are present? i.e. Path should have C:\Windows\System32 (along with many other stuff, but it should have this)

    and ComSpec should have C:\Windows\System32\cmd.exe

    If not, edit them as shown below.

    -Priyanka

  • Hi Priyanka,

    Paths are correctly appearing. see below.

    Problem appears to be with Cmake path.

    Kindly help how to resolve this issue.

    Where to install CMake and what path to be given.

    Regards.

    Jogen

  • Hi Jogen,

    This looks like maybe VSCode is trying to use another CMake Tool, but nRF Connect uses its own CMake at: C:\ncs\toolchains\0b393f9e1b\opt\bin\cmake.exe . This confusion might be the issue.

    Could you try to disable the CMake Tools only for this workspace?

    Then reload VSCode and try to build again.

    -Priyanka

Related