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

Parents
  • 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:

    git rev-parse HEAD


    And paste the parse for each:
    mbedtls
    mcuboot
    modules
    nrf
    nrfxlib
    test
    zephyr

  • 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

    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 
    
    The output was:
    0
    
    
    Compilation of the CXX compiler identification source "CMakeCXXCompilerId.cpp" produced "CMakeCXXCompilerId.o"
    
    The CXX compiler identification is GNU, found in "C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/nrf/applications/asset_tracker/build_nrf9160_pca10090ns/CMakeFiles/3.15.2/CompilerIdCXX/CMakeCXXCompilerId.o"
    
    Checking whether the ASM compiler is GNU using "--version" matched "(GNU assembler)|(GCC)|(Free Software Foundation)":
    arm-none-eabi-gcc.exe (GNU Tools for Arm Embedded Processors 7-2018-q2-update) 7.3.1 20180622 (release) [ARM/embedded-7-branch revision 261907]
    Copyright (C) 2017 Free Software Foundation, Inc.
    This is free software; see the source for copying conditions.  There is NO
    warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
    
    Performing C SOURCE FILE Test toolchain_is_ok succeeded with the following output:
    Change Dir: C:/Mockingbird/johncrisford/Nordic_sourcecode_root/ncs/nrf/applications/asset_tracker/build_nrf9160_pca10090ns/CMakeFiles/CMakeTmp
    
    Run Build Command(s):C:/ProgramData/chocolatey/bin/ninja.exe cmTC_a53f8 && [1/2] Building C object CMakeFiles/cmTC_a53f8.dir/src.c.obj
    
    [2/2] Linking C executable cmTC_a53f8
    
    c:/gnuarmemb/bin/../lib/gcc/arm-none-eabi/7.3.1/../../../../arm-none-eabi/bin/ld.exe: warning: cannot find entry symbol _start; defaulting to 00008000
    
    
    
    Source file was:
    int main(void) { return 0; }
    
    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
    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
    
    
    

  • Have you tried with same procedures given below? If not able to fix, please register a new ticket so that we can keep track of your issue. 

    Thank you!

    Kind regards,
    Øyvind

  • Hi Øyvind
    Thanks for the clarification. Below is the output from those commands.
    And if I now try to import the asset_tracker example, it fails in exactly the same way as before.
    Kind regards
    Grant
    c:\Mockingbird\johncrisford\Nordic_sourcecode_root\ncs\nrf>git checkout master
    Previous HEAD position was 1f3f87d manifest: Updated manifest to use v1.0.0 release tags
    Switched to branch 'master'
    Your branch is up to date with 'origin/master'.
    c:\Mockingbird\johncrisford\Nordic_sourcecode_root\ncs\nrf>git pull
    remote: Enumerating objects: 8, done.
    remote: Counting objects: 100% (8/8), done.
    remote: Total 11 (delta 8), reused 8 (delta 8), pack-reused 3
    Unpacking objects: 100% (11/11), done.
    From github.com/.../fw-nrfconnect-nrf
       5ac4434..5978e80  master     -> origin/master
    Updating 5ac4434..5978e80
    Fast-forward
     subsys/bluetooth/gatt_pool.c | 6 ++++++
     subsys/spm/Kconfig           | 4 ++++
     subsys/spm/spm.c             | 2 ++
     3 files changed, 12 insertions(+)
    c:\Mockingbird\johncrisford\Nordic_sourcecode_root\ncs\nrf>git checkout v1.0.0
    Note: switching to 'v1.0.0'.
    You are in 'detached HEAD' state. You can look around, make experimental
    changes and commit them, and you can discard any commits you make in this
    state without impacting any branches by switching back to a branch.
    If you want to create a new branch to retain commits you create, you may
    do so (now or later) by using -c with the switch command. Example:
      git switch -c <new-branch-name>
    Or undo this operation with:
      git switch -
    Turn off this advice by setting config variable advice.detachedHead to false
    HEAD is now at 1f3f87d manifest: Updated manifest to use v1.0.0 release tags
    c:\Mockingbird\johncrisford\Nordic_sourcecode_root\ncs\nrf>west update
    === updating fw-nrfconnect-zephyr (zephyr):
    --- fw-nrfconnect-zephyr: checked out bd8fd7f8982a2a2b03d65e415b8de17b94fa5a9a as detached HEAD
    === updating nffs (modules\fs\nffs):
    --- nffs: checked out bc62a2fa9d98ddb5d633c932ea199bc68e10f194 as detached HEAD
    === updating segger (modules\debug\segger):
    --- segger: checked out 6fcf61606d6012d2c44129edc033f59331e268bc as detached HEAD
    === updating fw-nrfconnect-mcuboot (mcuboot):
    --- fw-nrfconnect-mcuboot: checked out 424c716fb23234c3b0710d86dab6b2d5c64f8110 as detached HEAD
    === updating fw-nrfconnect-mcumgr (modules\lib\mcumgr):
    --- fw-nrfconnect-mcumgr: checked out f663988d35da559a37f263d369842dbce309d1fa as detached HEAD
    === updating fw-nrfconnect-tinycbor (modules\lib\tinycbor):
    --- fw-nrfconnect-tinycbor: checked out 543ecb7c8662580ef803d59ceda7bd3b8a84a11b as detached HEAD
    === updating nrfxlib (nrfxlib):
    --- nrfxlib: checked out 757708d44dfc118397c7586af45e5d1ebed08509 as detached HEAD
    === updating cmock (test\cmock):
    --- cmock: checked out c243b9a7a7b3c471023193992b46cf1bd1910450 as detached HEAD
    === updating unity (test\cmock\vendor\unity):
    --- unity: checked out 031f3bbe45f8adf504ca3d13e6f093869920b091 as detached HEAD
    === updating mbedtls (mbedtls):
    --- mbedtls: checked out 53546ea099f6f53d0be653a64accd250e170337f as detached HEAD
  • We may have found a bug with the latest version of west. Please run the following and then try west update again.

    pip3 install west==0.6.0 --upgrade

  • Hi Øyvind

    Thanks for your help - that has fixed it. 

    I also needed to shorten a couple of directory names as the import complained about path length, but after that it built fine.

    Kind regards

    Grant

Reply Children
No Data
Related