connectedhomeip: compile lighting-app/nrfconnect example failed

I try to compile the latest commit 8d7486f in ubuntu 20.04 LTS, as in the README , I use the ‘native shell setup’, compiled this example but got the following error (west build -b nrf52840dk_nrf52840 -t menuconfig also report the same error):

root@ubuntu:# export ZEPHYR_TOOLCHAIN_VARIANT=gnuarmemb
root@ubuntu:# export GNUARMEMB_TOOLCHAIN_PATH=/opt/gcc-arm-none-eabi-9-2019-q4-major/
root@ubuntu:# west build -b nrf52840dk_nrf52840
WARNING: ZEPHYR_BASE=~/work_src/ncs/zephyr in the calling environment will be used,
but the zephyr.base config option in ~/work_src/connectedhomeip/examples/lighting-app/nrfconnect is "zephyr"
which implies a different ZEPHYR_BASE=~/work_src/connectedhomeip/examples/lighting-app/nrfconnect/zephyr
To disable this warning in the future, execute 'west config --global zephyr.base-prefer env'
-- west build: generating a build system
-- Found Python3: ~/work_src/connectedhomeip/.environment/pigweed-venv/bin/python3 (found version "3.8.5") found components: Interpreter 
Including boilerplate (Zephyr base): ~/work_src/ncs/zephyr/cmake/app/boilerplate.cmake
-- Application: ~/work_src/connectedhomeip/examples/lighting-app/nrfconnect
-- Zephyr version: 2.5.99 ~/work_src/ncs/zephyr)
-- Found Python3: ~/work_src/connectedhomeip/.environment/pigweed-venv/bin/python3 (found suitable exact version "3.8.5") found components: Interpreter 
-- Found west (found suitable version "0.10.1", minimum required is "0.7.1")
-- Board: nrf52840dk_nrf52840
-- Cache files will be written to: /root/.cache/zephyr
-- Found dtc: /usr/bin/dtc (found suitable version "1.5.0", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/opt/gcc-arm-none-eabi-9-2019-q4-major)
-- Found BOARD.dts: ~/work_src/ncs/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
-- Found devicetree overlay: ~/work_src/connectedhomeip/examples/lighting-app/nrfconnect/boards/nrf52840dk_nrf52840.overlay
-- Generated zephyr.dts: ~/work_src/connectedhomeip/examples/lighting-app/nrfconnect/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: ~/work_src/connectedhomeip/examples/lighting-app/nrfconnect/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: ~/work_src/connectedhomeip/examples/lighting-app/nrfconnect/build/zephyr/include/generated/device_extern.h
Parsing ~/work_src/ncs/zephyr/Kconfig
Loaded configuration '~/work_src/ncs/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
Merged configuration '~/work_src/connectedhomeip/config/nrfconnect/app/sample-defaults.conf'
Merged configuration 'prj.conf'
Configuration saved to '~/work_src/connectedhomeip/examples/lighting-app/nrfconnect/build/zephyr/.config'
Kconfig header saved to '~/work_src/connectedhomeip/examples/lighting-app/nrfconnect/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.2.1
-- The CXX compiler identification is GNU 9.2.1
-- The ASM compiler identification is GNU
-- Found assembler: /opt/gcc-arm-none-eabi-9-2019-q4-major/bin/arm-none-eabi-gcc
-- Check if the system is big endian
-- Searching 16 bit integer
-- Looking for sys/types.h
-- Looking for sys/types.h - found
-- Looking for stdint.h
-- Looking for stdint.h - found
-- Looking for stddef.h
-- Looking for stddef.h - found
-- Check size of unsigned short
-- Check size of unsigned short - done
-- Using unsigned short
-- Check if the system is big endian - little endian
-- CMake build type: Debug
-- Version: gfd27fc3a7
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "~/work_src/connectedhomeip/.environment/pigweed-venv/lib/python3.8/site-packages/west/manifest.py", line 1417, in get_projects
    raise ValueError(unknown, uncloned)
ValueError: (['mbedtls-nrf'], [])
CMake Error at ~/work_src/ncs/nrfxlib/common.cmake:58 (message):
  Failed to find mbedtls, cannot build security libraries
Call Stack (most recent call first):
  ~/work_src/ncs/nrfxlib/nrf_security/CMakeLists.txt:29 (get_mbedtls_dir)


-- Configuring incomplete, errors occurred!
See also "~/work_src/connectedhomeip/examples/lighting-app/nrfconnect/build/CMakeFiles/CMakeOutput.log".
See also "~/work_src/connectedhomeip/examples/lighting-app/nrfconnect/build/CMakeFiles/CMakeError.log".
FATAL ERROR: command exited with status 1: ~/work_src/connectedhomeip/.environment/cipd/pigweed/bin/cmake -DWEST_PYTHON=~/work_src/connectedhomeip/.environment/pigweed-venv/bin/python3 -B~/work_src/connectedhomeip/examples/lighting-app/nrfconnect/build -S~/work_src/connectedhomeip/examples/lighting-app/nrfconnect -GNinja -DBOARD=nrf52840dk_nrf52840

About this issue

  • Original URL
  • State: closed
  • Created 3 years ago
  • Comments: 18 (7 by maintainers)

Most upvoted comments

yeah, the example compiled successfully, thank you again

@Damian-Nordic thanks a lot for your helpful support, maybe the configuration in lighting-app/nrfconnect/.west/config is not correct, i delete the .west directory then it works.

jsh@ubuntu:~/work_src/connectedhomeip/examples/lighting-app/nrfconnect$ cat .westbak/config 
[manifest]
path = zephyr
file = west.yml

[zephyr]
base = zephyr