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

the issue of compiling CHIP nRF52840 Lighting Example Application

hello Support team,

When customer to compile Nordic CHIP demo code(connectedhomeip\examples\lighting-app\nrfconnect. compiling error  was attached.

tje

build@7766665acb29:/var/chip/examples/lighting-app/nrfconnect$ west build -b nrf52840dk_nrf52840
-- west build: generating a build system
Including boilerplate (Zephyr base): /var/ncs/zephyr/cmake/app/boilerplate.cmake
-- Application: /var/chip/examples/lighting-app/nrfconnect
-- Zephyr version: 2.4.0 (/var/ncs/zephyr)
-- Found Python3: /usr/bin/python3.8 (found suitable exact version "3.8.5") found components: Interpreter 
-- Found west (found suitable version "0.8.0", minimum required is "0.7.1")
-- Board: nrf52840dk_nrf52840
-- Cache files will be written to: /var/ncs/zephyr/.cache
-- Found dtc: /usr/bin/dtc (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (/opt/gcc-arm-none-eabi-9-2020-q2-update)
-- Found BOARD.dts: /var/ncs/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
-- Found devicetree overlay: /var/chip/examples/lighting-app/nrfconnect/dts.overlay
-- Generated zephyr.dts: /var/chip/examples/lighting-app/nrfconnect/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: /var/chip/examples/lighting-app/nrfconnect/build/zephyr/include/generated/devicetree_unfixed.h
 
warning: LOG_STRDUP_MAX_STRING (defined at subsys/logging/Kconfig:238) was assigned the value '256'
but got the value ''. Check these unsatisfied dependencies: (!LOG_MINIMAL) (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_LOG_STRDUP_MAX_STRING.html and/or look
up LOG_STRDUP_MAX_STRING in the menuconfig/guiconfig interface. The Application Development Primer,
Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
helpful too.
 
 
warning: LOG_STRDUP_BUF_COUNT (defined at subsys/logging/Kconfig:245) was assigned the value '20'
but got the value ''. Check these unsatisfied dependencies: (!LOG_MINIMAL) (=n). See
http://docs.zephyrproject.org/latest/reference/kconfig/CONFIG_LOG_STRDUP_BUF_COUNT.html and/or look
up LOG_STRDUP_BUF_COUNT in the menuconfig/guiconfig interface. The Application Development Primer,
Setting Configuration Values, and Kconfig - Tips and Best Practices sections of the manual might be
helpful too.
 
Parsing /var/chip/config/nrfconnect/Kconfig
Loaded configuration '/var/ncs/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
Merged configuration '/var/chip/examples/lighting-app/nrfconnect/prj.conf'
Merged configuration '/var/chip/config/nrfconnect/overlay-sample-defaults.conf'
Configuration saved to '/var/chip/examples/lighting-app/nrfconnect/build/zephyr/.config'
Kconfig header saved to '/var/chip/examples/lighting-app/nrfconnect/build/zephyr/include/generated/autoconf.h'
-- The C compiler identification is GNU 9.3.1
-- The CXX compiler identification is GNU 9.3.1
-- The ASM compiler identification is GNU
-- Found assembler: /opt/gcc-arm-none-eabi-9-2020-q2-update/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
-- Searching 16 bit integer - Using unsigned short
-- Check if the system is big endian - little endian
-- Version: g07f430dac
CMake Warning at /var/ncs/zephyr/CMakeLists.txt:1331 (message):
  __ASSERT() statements are globally ENABLED
 
 
-- Configuring done
-- Generating done
-- Build files have been written to: /var/chip/examples/lighting-app/nrfconnect/build
-- west build: building application
[1/546] Preparing syscall dependency handling
 
[6/546] Performing configure step for 'ChipConfig'
Done. Made 41 targets from 55 files in 745ms
[22/546] cd /var/chip/examples/lightin..."\n"MBEDTLS_CONFIG_FILE="nrf-config.h"
-e OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS=0
OPENTHREAD_CONFIG_ENABLE_BUILTIN_MBEDTLS_MANAGEMENT=0
OPENTHREAD_CONFIG_DHCP6_CLIENT_ENABLE=1
OPENTHREAD_CONFIG_DHCP6_SERVER_ENABLE=1
OPENTHREAD_CONFIG_DNS_CLIENT_ENABLE=1
OPENTHREAD_CONFIG_JOINER_ENABLE=1
OPENTHREAD_CONFIG_TMF_NETWORK_DIAG_MTD_ENABLE=1
OPENTHREAD_CONFIG_TMF_NETDATA_SERVICE_ENABLE=1
OPENTHREAD_CONFIG_IP6_SLAAC_ENABLE=1
OPENTHREAD_CONFIG_SNTP_CLIENT_ENABLE=1
PACKAGE_NAME=OPENTHREAD
PACKAGE_VERSION=g07f430dac
OPENTHREAD_CONFIG_THREAD_VERSION=OT_THREAD_VERSION_1_1
KERNEL
__ZEPHYR__=1
_FORTIFY_SOURCE=2
BUILD_VERSION=v2.4.0-ncs1-rc1-7-g41ce8e165a9a
__LINUX_ERRNO_EXTENSIONS__
USE_PARTITION_MANAGER=0
__PROGRAM_START
NRF_802154_IRQ_PRIORITY=1
NRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0
NRF_802154_USE_RAW_API=1
NRF_802154_PENDING_SHORT_ADDRESSES=16
NRF_802154_PENDING_EXTENDED_ADDRESSES=16
NRF_802154_RX_BUFFERS=8
NRF_802154_CCA_MODE_DEFAULT=NRF_RADIO_CCA_MODE_ED
NRF_802154_CCA_CORR_LIMIT_DEFAULT=2
NRF_802154_CCA_CORR_THRESHOLD_DEFAULT=45
NRF_802154_CCA_ED_THRESHOLD_DEFAULT=45
NRF_802154_CSMA_CA_ENABLED=1
NRF_802154_TX_STARTED_NOTIFY_ENABLED=1
NRF_802154_FRAME_TIMESTAMP_ENABLED=1
NRF_802154_DELAYED_TRX_ENABLED=1
NRF_802154_ACK_TIMEOUT_ENABLED=1
NRF52840_XXAA
MBEDTLS_CONFIG_FILE=nrf-config.h
[507/546] Performing build step for 'ChipLibBuild'
[9/111] c++ obj/third_party/connectedhomeip/src/app/libCHIPDataModel.decoder.cpp.o
FAILED: obj/third_party/connectedhomeip/src/app/libCHIPDataModel.decoder.cpp.o 
/opt/gcc-arm-none-eabi-9-2020-q2-update/bin/arm-none-eabi-g++ -MMD -MF obj/third_party/connectedhomeip/src/app/libCHIPDataModel.decoder.cpp.o.d -Wconversion -mthumb -O0 -g2 -fno-common -ffunction-sections -fdata-sections -fno-exceptions -Wall -Werror -Wno-deprecated-declarations -Wno-unknown-warning-option -Wno-missing-field-initializers -Wno-unused-but-set-variable -Wno-unused-variable -Wno-psabi -Wno-cast-function-type -Wno-maybe-uninitialized -fdiagnostics-color -fno-strict-aliasing -std=gnu++11 -fno-rtti -Wno-non-virtual-dtor -Wno-deprecated-copy -isystem/var/ncs/nrf/drivers/mpsl/clock_control -isystem/var/ncs/zephyr/include -isystem/var/chip/examples/lighting-app/nrfconnect/build/zephyr/include/generated -isystem/var/ncs/zephyr/soc/arm/nordic_nrf/nrf52 -isystem/var/ncs/zephyr/lib/libc/newlib/include -isystem/var/ncs/zephyr/lib/fnmatch/. -isystem/var/ncs/zephyr/subsys/net/lib/sockets/. -isystem/var/ncs/zephyr/subsys/net/lib/openthread/platform/. -isystem/var/ncs/zephyr/subsys/settings/include -isystem/var/ncs/zephyr/subsys/bluetooth -isystem/var/ncs/nrf/include -isystem/var/ncs/nrf/lib/multithreading_lock/. -isystem/var/ncs/nrf/subsys/bluetooth/controller/. -isystem/var/ncs/nrfxlib/mpsl/include -isystem/var/ncs/nrfxlib/crypto/nrf_cc310_mbedcrypto/include/mbedtls -isystem/var/ncs/nrfxlib/crypto/nrf_cc310_mbedcrypto/include -isystem/var/chip/examples/lighting-app/nrfconnect/build/modules/nrfxlib/nrf_security/include -isystem/var/chip/examples/lighting-app/nrfconnect/build/modules/nrfxlib/nrf_security/include/mbedtls_generated/ -isystem/var/ncs/mbedtls/include -isystem/var/ncs/mbedtls/include/mbedtls -isystem/var/ncs/nrfxlib/softdevice_controller/include -isystem/var/ncs/modules/hal/cmsis/CMSIS/Core/Include -isystem/var/ncs/modules/hal/nordic/drivers/nrf_radio_802154/. -isystem/var/ncs/modules/hal/nordic/nrfx -isystem/var/ncs/modules/hal/nordic/nrfx/drivers/include -isystem/var/ncs/modules/hal/nordic/nrfx/mdk -isystem/var/ncs/modules/hal/nordic/. -isystem/var/ncs/modules/lib/openthread/zephyr/../include -isystem/var/ncs/modules/lib/openthread/zephyr/../examples/platforms -isystem/var/ncs/modules/debug/segger/rtt -isystem/var/ncs/modules/crypto/tinycrypt/lib/include -isystem/var/ncs/zephyr/../nrfxlib/crypto/nrf_cc310_platform/include -isystem/var/ncs/modules/lib/openthread/zephyr/../include -isystem/var/ncs/modules/lib/openthread/zephyr/../examples/platforms -DKERNEL -D__ZEPHYR__=1 -D_FORTIFY_SOURCE=2 -DBUILD_VERSION=v2.4.0-ncs1-rc1-7-g41ce8e165a9a -D__LINUX_ERRNO_EXTENSIONS__ -DUSE_PARTITION_MANAGER=0 -D__PROGRAM_START -DNRF_802154_IRQ_PRIORITY=1 -DNRF_802154_INTERNAL_RADIO_IRQ_HANDLING=0 -DNRF_802154_USE_RAW_API=1 -DNRF_802154_PENDING_SHORT_ADDRESSES=16 -DNRF_802154_PENDING_EXTENDED_ADDRESSES=16 -DNRF_802154_RX_BUFFERS=8 -DNRF_802154_CCA_MODE_DEFAULT=NRF_RADIO_CCA_MODE_ED -DNRF_802154_CCA_CORR_LIMIT_DEFAULT=2 -DNRF_802154_CCA_CORR_THRESHOLD_DEFAULT=45 -DNRF_802154_CCA_ED_THRESHOLD_DEFAULT=45 -DNRF_802154_CSMA_CA_ENABLED=1 -DNRF_802154_TX_STARTED_NOTIFY_ENABLED=1 -DNRF_802154_FRAME_TIMESTAMP_ENABLED=1 -DNRF_802154_DELAYED_TRX_ENABLED=1 -DNRF_802154_ACK_TIMEOUT_ENABLED=1 -DNRF52840_XXAA -Os -fcheck-new -std=c++11 -Wno-register -fno-exceptions -fno-rtti -imacros /var/chip/examples/lighting-app/nrfconnect/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -mcpu=cortex-m4 -mthumb -mabi=aapcs -imacros /var/ncs/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wpointer-arith -Wno-address-of-packed-member -Wno-unused-but-set-variable -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=/var/chip/examples/lighting-app/nrfconnect=CMAKE_SOURCE_DIR -fmacro-prefix-map=/var/ncs/zephyr=ZEPHYR_BASE -fmacro-prefix-map=/var/ncs=WEST_TOPDIR -ffunction-sections -fdata-sections -specs=nano.specs -D_SYS__PTHREADTYPES_H_ -DMBEDTLS_CONFIG_FILE=\<nrf-config.h\> -DMBEDTLS_PK_WRITE_C -DMBEDTLS_X509_CREATE_C -DMBEDTLS_X509_CSR_WRITE_C -isystem/var/ncs/zephyr/include/posix -isystem/var/ncs/zephyr/../mbedtls/include -I/var/chip/examples/lighting-app/nrfconnect -I/var/chip/examples/lighting-app/nrfconnect/main/include -std=gnu++11 -DCHIP_HAVE_CONFIG_H=1 -I../../../../../config/nrfconnect/third_party/connectedhomeip/src/app/gen -I../../../../../config/nrfconnect/third_party/connectedhomeip/src/app/util -I../../../../../config/nrfconnect/third_party/connectedhomeip/src/app -Igen/third_party/connectedhomeip/src/app/include -I../../../../../config/nrfconnect/third_party/connectedhomeip/src/include -I../../../../../config/nrfconnect/third_party/connectedhomeip/src -Igen/include -I../../../../../config/nrfconnect/third_party/connectedhomeip/src/lib -I../../../../../config/nrfconnect/third_party/connectedhomeip/third_party/nlassert/repo/include -I../../../../../config/nrfconnect/third_party/connectedhomeip/third_party/nlio/repo/include -c ../../../../../config/nrfconnect/third_party/connectedhomeip/src/app/decoder.cpp -o obj/third_party/connectedhomeip/src/app/libCHIPDataModel.decoder.cpp.o
In file included from ../../../../../config/nrfconnect/third_party/connectedhomeip/src/app/decoder.cpp:26:
../../../../../config/nrfconnect/third_party/connectedhomeip/src/lib/core/CHIPEncoding.h:36:10: fatal error: nlbyteorder.hpp: No such file or directory
   36 | #include <nlbyteorder.hpp>
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
[10/111] c++ obj/third_party/connectedhomeip/src/app/libCHIPDataModel.encoder.cpp.o
ninja: build stopped: subcommand failed.
FAILED: chip/src/ChipLibBuild-stamp/ChipLibBuild-build chip/lib/libCHIP.a 
cd /var/chip/examples/lighting-app/nrfconnect/build/chip && ninja
ninja: build stopped: subcommand failed.
FATAL ERROR: command exited with status 1: /usr/local/bin/cmake --build /var/chip/examples/lighting-app/nrfconnect/build

the code is from 

https://github.com/project-chip/connectedhomeip/tree/master/examples/lighting-app/nrfconnect

Best Regards,

George XIONG

Parents
  • Hello George,

    Did you follow the instruction in the README.md? It seems that for some reason git submodule was not pulled (maybe internet was broken?).

    Since something went wrong in the repo fetching process I would recommend performing set up from scratch again.

    Alternatively, you can just try to pull submodules again:


    cd /var/chip
    git submodule update --init

Reply
  • Hello George,

    Did you follow the instruction in the README.md? It seems that for some reason git submodule was not pulled (maybe internet was broken?).

    Since something went wrong in the repo fetching process I would recommend performing set up from scratch again.

    Alternatively, you can just try to pull submodules again:


    cd /var/chip
    git submodule update --init

Children
Related