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

Can't build nRF Connect asset tracker

Hi all

I have an identical problem to this: https://devzone.nordicsemi.com/f/nordic-q-a/51567/can-t-build-nrf-connect-project

All my setup is the same, and the problem is exactly the same.

I've run west update after switching to tag v1.0.0

I have a mbedtls director in my ncs folder

Kind regards

Grant

  • Hello Grant,

    I am not able to reproduce this problem. Can you please provide output from your case in Segger Embedded Studio?

    Did you follow all steps

    What version of Segger Embedded Studio are you using? 

    In each subfolder of NCS, please issue the command:

    Fullscreen
    1
    git rev-parse HEAD
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX


    And paste the parse for each:
    Fullscreen
    1
    2
    3
    4
    5
    6
    7
    mbedtls
    mcuboot
    modules
    nrf
    nrfxlib
    test
    zephyr
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Hi Øyvind

    I'm running a clean version of Windows 10, and using SES V4.20a.

    Yes I followed all the steps using the Getting Started Assistant v1.0.1, and they all verify ok.

    I initially cloned the SDK into a path that had a space in a folder name, and that created issues when importing the project. So I deleted that whole directory (sourcecode_root) and re-cloned the SDK.

    Below are the git rev-parse results:

    mbedtls
    53546ea099f6f53d0be653a64accd250e170337f

    mcuboot
    424c716fb23234c3b0710d86dab6b2d5c64f8110

    modules
    fatal: not a git repository (or any of the parent directories): .git

    nrf
    1f3f87db7158ea553061a68782154a2dcc87ebb5

    nrfxlib
    757708d44dfc118397c7586af45e5d1ebed08509

    test
    fatal: not a git repository (or any of the parent directories): .git

    zephyr
    bd8fd7f8982a2a2b03d65e415b8de17b94fa5a9a

    From SES I initially get this JavaScript alert:

    The output in SES is:

    Loading solution asset_tracker.emProject
    Executing load commands
    cmake -GNinja -DBOARD=nrf9160_pca10090ns -DBOARD_DIR=C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/zephyr/boards/arm/nrf9160_pca10090 -DZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb -DGNUARMEMB_TOOLCHAIN_PATH=C:/gnuarmemb -BC:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/nrf/applications/asset_tracker/build_nrf9160_pca10090ns -HC:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/nrf/applications/asset_tracker -DEXTRA_KCONFIG_TARGETS=menuconfig_ses -DEXTRA_KCONFIG_TARGET_COMMAND_FOR_menuconfig_ses=C:/Mockingbird/arm_segger_embedded_studio_v420a_win_x64_nordic/html/configure_nordic_project_menuconfig.py
    -- Using application from 'C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/nrf/applications/asset_tracker'
    Zephyr version: 1.14.99
    -- Selected BOARD nrf9160_pca10090ns
    -- Found west: C:/Python37/Scripts/west.exe (found suitable version "0.6.1", minimum required is "0.6.0")
    -- Cache files will be written to: C:\Users\user\AppData\Local/.cache/zephyr
    USING OUT OF TREE BOARD
    -- Loading C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090ns.dts as base
    -- Overlaying C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/zephyr/dts/common/common.dts
    Device tree configuration written to C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/nrf/applications/asset_tracker/build_nrf9160_pca10090ns/zephyr/include/generated/generated_dts_board.conf
    Parsing Kconfig tree in C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/nrf/applications/asset_tracker/Kconfig
    Loaded configuration 'C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/nrf/applications/asset_tracker/build_nrf9160_pca10090ns/zephyr/.config'
    No change to 'C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/nrf/applications/asset_tracker/build_nrf9160_pca10090ns/zephyr/.config'
    Including module: nrf in path: C:\Mockingbird\johncrisford\Nordic_sourcecode_root\ncs\nrf
    -- Using application from 'C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/nrf/samples/nrf9160/spm'
    Zephyr version: 1.14.99
    Changed board to secure nrf9160_pca10090 (NOT NS)
    USING OUT OF TREE BOARD
    -- Loading C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/zephyr/boards/arm/nrf9160_pca10090/nrf9160_pca10090.dts as base
    -- Overlaying C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/zephyr/dts/common/common.dts
    -- Overlaying C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/nrf/samples/nrf9160/spm/nrf9160_pca10090.overlay
    Device tree configuration written to C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/nrf/applications/asset_tracker/build_nrf9160_pca10090ns/spm/zephyr/include/generated/generated_dts_board.conf
    Parsing Kconfig tree in C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/zephyr/Kconfig
    Loaded configuration 'C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/nrf/applications/asset_tracker/build_nrf9160_pca10090ns/spm/zephyr/.config'
    No change to 'C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/nrf/applications/asset_tracker/build_nrf9160_pca10090ns/spm/zephyr/.config'
    Including module: nrf in path: C:\Mockingbird\johncrisford\Nordic_sourcecode_root\ncs\nrf
    Including module: nffs in path: C:\Mockingbird\johncrisford\Nordic_sourcecode_root\ncs\modules\fs\nffs
    Including module: segger in path: C:\Mockingbird\johncrisford\Nordic_sourcecode_root\ncs\modules\debug\segger
    Including module: mcuboot in path: C:\Mockingbird\johncrisford\Nordic_sourcecode_root\ncs\mcuboot\zephyr
    Including module: mcumgr in path: C:\Mockingbird\johncrisford\Nordic_sourcecode_root\ncs\modules\lib\mcumgr
    Including module: tinycbor in path: C:\Mockingbird\johncrisford\Nordic_sourcecode_root\ncs\modules\lib\tinycbor
    Including module: nrfxlib in path: C:\Mockingbird\johncrisford\Nordic_sourcecode_root\ncs\nrfxlib
    FATAL ERROR: Unknown project name/path: mbedtls-nrf (use "west list" to list all projects)
    CMake Error at C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/nrfxlib/nrf_security/CMakeLists.txt:31 (message):
    Failed to find mbedtls, cannot build security libraries


    -- Configuring incomplete, errors occurred!
    See also "C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/nrf/applications/asset_tracker/build_nrf9160_pca10090ns/CMakeFiles/CMakeOutput.log".
    See also "C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/nrf/applications/asset_tracker/build_nrf9160_pca10090ns/CMakeFiles/CMakeError.log".
    Project load failed
    Reported error: solution load command failed (1)

    And I've attached the CMakeError.log and CMakeOutput.log

    Kind regards

    Grant

    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    The target system is: Generic - 1.14.99 - arm
    The host system is: Windows - 10.0.17134 - AMD64
    Compiling the C compiler identification source file "CMakeCCompilerId.c" succeeded.
    Compiler: C:/gnuarmemb/bin/arm-none-eabi-gcc.exe
    Build flags:
    Id flags: -c
    The output was:
    0
    Compilation of the C compiler identification source "CMakeCCompilerId.c" produced "CMakeCCompilerId.o"
    The C compiler identification is GNU, found in "C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/nrf/applications/asset_tracker/build_nrf9160_pca10090ns/CMakeFiles/3.15.2/CompilerIdC/CMakeCCompilerId.o"
    Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" succeeded.
    Compiler: C:/gnuarmemb/bin/arm-none-eabi-gcc.exe
    Build flags:
    Id flags: -c
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
    1
    2
    3
    4
    5
    6
    7
    8
    9
    10
    11
    12
    13
    14
    15
    16
    17
    18
    19
    Compiling the C compiler identification source file "CMakeCCompilerId.c" failed.
    Compiler: C:/gnuarmemb/bin/arm-none-eabi-gcc.exe
    Build flags:
    Id flags:
    The output was:
    1
    c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.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.exe: error: ld returned 1 exit status
    Compiling the CXX compiler identification source file "CMakeCXXCompilerId.cpp" failed.
    Compiler: C:/gnuarmemb/bin/arm-none-eabi-gcc.exe
    Build flags:
    Id flags:
    The output was:
    1
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

  • Thanks for providing this information! This will be very useful to find the issue. I am working to find a solution. Could you also please take a screenshot of the Environment Options in SES? Go to Tools-->Options-->nRF Connect and screenshot this window. 

    Thanks!

    -Øyvind

  • Great, thanks for your support!

    Here's the requested screenshot.

    Kind regards

    Grant

  • Hi Grant, 

    Looking at the nrfxlib and zephyr git rev-parse results, these are not correct. Did you get any errors or warnings when running west update? Can you please run the following to verify that NCS is up to date:

    Fullscreen
    1
    2
    3
    4
    git checkout master
    git pull
    git checkout v1.0.0
    west update
    XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

    Kind regards,
    Øyvind

1 2 3