Build my first example code, with vs studio code, get " Unmet or cyclic dependencies in modules:C:/v1.7.1/modules/lib/matter depends on: ['openthread']" error

Hello, guys.

I'm first use nRF Connect with vs studio code to build test code.

Step by step:

nRF Connect for Desktop v3.8.0 --->Toolchain Manager ---> nRF Connect SDK v1.7.1, Install build environment.

I got the following error , when to build the code. How can I solve this problem?

THX everyone。

> Executing task: nRF Connect: Generate config nrf52dk_nrf52832 for d:\hf-test-code\hfworld <

Building hfworld
west build --build-dir d:\hf-test-code\hfworld\build d:\hf-test-code\hfworld --pristine --board nrf52dk_nrf52832 -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_OPENOCD_SUPPORT=y

-- west build: generating a build system
Including boilerplate (Zephyr base): C:/v1.7.1/zephyr/cmake/app/boilerplate.cmake
-- Application: D:/hf-test-code/hfworld
-- Zephyr version: 2.6.99 (C:/v1.7.1/zephyr), build: v2.6.99-ncs1-1
-- Found Python3: C:/v1.7.1/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
-- Found west (found suitable version "0.11.1", minimum required is "0.7.1")
CMake Error at C:\v1.7.1\zephyr\cmake\zephyr_module.cmake:61 (message):
  Unmet or cyclic dependencies in modules:

  C:/v1.7.1/modules/lib/matter depends on: ['openthread']

  

Call Stack (most recent call first):
  C:\v1.7.1\zephyr\cmake\app\boilerplate.cmake:182 (include)
  C:\v1.7.1\zephyr\share\zephyr-package\cmake\ZephyrConfig.cmake:24 (include)
  C:\v1.7.1\zephyr\share\zephyr-package\cmake\ZephyrConfig.cmake:35 (include_boilerplate)
  d:\hf-test-code\hfworld\build\CMakeLists.txt:5 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: 'c:\v1.7.1\toolchain\opt\bin\cmake.EXE' '-DWEST_PYTHON=c:\v1.7.1\toolchain\opt\bin\python.exe' '-Bd:\hf-test-code\hfworld\build' '-Sd:\hf-test-code\hfworld' -GNinja -DBOARD=nrf52dk_nrf52832 -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING=NONE -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_OPENOCD_SUPPORT=y

  • Hey Dark Knight!

    Could you tell me more about this sample code you are using? Does it work on any other NCS versions, and can you build any of the other code samples available on NCS?

    Best regards,

    Elfving

  • Thx Elfving. I only use this sample code. zephyr/samples/hello_world

    Other NCS versions,i don't test.

    Today, i updated the sdk to build . 

    Then, only one error。C:\v1.7.1\modules\hal\nordic\nrfx\mdk\nrf52.h:143:10: fatal error: core_cm4.h: No such file or directory

    So I think my SDK may be incomplete. I add an agent according to this  link, but it can't succeed under windows.

    I also tried to use the system agent under windows to update the SDK. After that, the compilation problem remained the same

    > Executing task: nRF Connect: Generate config nrf52dk_nrf52832 for d:\hf-test-code\hfworld <
    
    Building hfworld
    west build --build-dir d:\hf-test-code\hfworld\build d:\hf-test-code\hfworld --pristine --board nrf52dk_nrf52832 -- -DCMAKE_EXPORT_COMPILE_COMMANDS:BOOL=On -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_OPENOCD_SUPPORT=y
    
    -- west build: generating a build system
    Including boilerplate (Zephyr base): C:/v1.7.1/zephyr/cmake/app/boilerplate.cmake
    -- Application: D:/hf-test-code/hfworld
    -- Zephyr version: 2.6.99 (C:/v1.7.1/zephyr), build: v2.6.99-ncs1-1
    -- Found Python3: C:/v1.7.1/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter 
    -- Found west (found suitable version "0.11.1", minimum required is "0.7.1")
    -- Board: nrf52dk_nrf52832
    -- Cache files will be written to: C:/v1.7.1/zephyr/.cache
    -- Found dtc: C:/v1.7.1/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (c:/v1.7.1/toolchain/opt)
    -- Found BOARD.dts: C:/v1.7.1/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832.dts
    -- Generated zephyr.dts: D:/hf-test-code/hfworld/build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: D:/hf-test-code/hfworld/build/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: D:/hf-test-code/hfworld/build/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: D:/hf-test-code/hfworld/build/zephyr/dts.cmake
    Parsing C:/v1.7.1/zephyr/Kconfig
    Loaded configuration 'C:/v1.7.1/zephyr/boards/arm/nrf52dk_nrf52832/nrf52dk_nrf52832_defconfig'
    Merged configuration 'D:/hf-test-code/hfworld/prj.conf'
    Merged configuration 'D:/hf-test-code/hfworld/build/zephyr/misc/generated/extra_kconfig_options.conf'
    Configuration saved to 'D:/hf-test-code/hfworld/build/zephyr/.config'
    Kconfig header saved to 'D:/hf-test-code/hfworld/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: C:/v1.7.1/toolchain/opt/bin/arm-none-eabi-gcc.exe
    CMake Warning at C:\v1.7.1\zephyr\subsys\debug\CMakeLists.txt:4 (message):
      CONFIG_OPENOCD_SUPPORT is deprecated
    
        Please use DEBUG_THREAD_INFO instead.
    
    
    -- Configuring done
    -- Generating done
    -- Build files have been written to: D:/hf-test-code/hfworld/build
    -- west build: building application
    [1/144] Generating misc/generated/syscalls.json, misc/generated/struct_tags.json
    [2/144] Generating include/generated/syscall_dispatch.c, include/generated/syscall_list.h
    [3/144] Generating include/generated/driver-validation.h
    [4/144] Generating include/generated/kobj-types-enum.h, include/generated/otype-to-str.h, include/generated/otype-to-size.h
    [5/144] Building C object zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj
    FAILED: zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj 
    ccache C:\v1.7.1\toolchain\opt\bin\arm-none-eabi-gcc.exe -DBUILD_VERSION=v2.6.99-ncs1-1 -DKERNEL -DNRF52832_XXAA -DUSE_PARTITION_MANAGER=0 -D_FORTIFY_SOURCE=2 -D__ZEPHYR__=1 -IC:/v1.7.1/zephyr/kernel/include -IC:/v1.7.1/zephyr/arch/arm/include -IC:/v1.7.1/zephyr/include -Izephyr/include/generated -IC:/v1.7.1/zephyr/soc/arm/nordic_nrf/nrf52 -IC:/v1.7.1/nrf/include -IC:/v1.7.1/modules/hal/nordic/nrfx -IC:/v1.7.1/modules/hal/nordic/nrfx/drivers/include -IC:/v1.7.1/modules/hal/nordic/nrfx/mdk -IC:/v1.7.1/zephyr/modules/hal_nordic/nrfx/. -isystem C:/v1.7.1/zephyr/lib/libc/minimal/include -isystem c:/v1.7.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/include -isystem c:/v1.7.1/toolchain/opt/bin/../lib/gcc/arm-none-eabi/9.2.1/include-fixed -Og -imacros D:/hf-test-code/hfworld/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -imacros C:/v1.7.1/zephyr/include/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-address-of-packed-member -Wno-unused-but-set-variable -Werror=implicit-int -fno-asynchronous-unwind-tables -fno-pie -fno-pic -fno-strict-overflow -fno-reorder-functions -fno-defer-pop -fmacro-prefix-map=D:/hf-test-code/hfworld=CMAKE_SOURCE_DIR -fmacro-prefix-map=C:/v1.7.1/zephyr=ZEPHYR_BASE -fmacro-prefix-map=C:/v1.7.1=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj -MF zephyr\CMakeFiles\offsets.dir\arch\arm\core\offsets\offsets.c.obj.d -o zephyr/CMakeFiles/offsets.dir/arch/arm/core/offsets/offsets.c.obj -c C:/v1.7.1/zephyr/arch/arm/core/offsets/offsets.c
    In file included from C:\v1.7.1\modules\hal\nordic\nrfx\mdk\nrf.h:153,
                     from C:\v1.7.1\modules\hal\nordic\nrfx\drivers\nrfx_common.h:41,
                     from C:\v1.7.1\modules\hal\nordic\nrfx\nrfx.h:38,
                     from c:\v1.7.1\zephyr\soc\arm\nordic_nrf\soc_nrf_common.h:14,
                     from C:\v1.7.1\zephyr\soc\arm\nordic_nrf\nrf52\soc.h:14,
                     from C:\v1.7.1\zephyr\include\arch\arm\aarch32\cortex_m\cmsis.h:17,
                     from C:\v1.7.1\zephyr\include\arch\arm\aarch32\mpu\arm_mpu_v7m.h:10,
                     from C:\v1.7.1\zephyr\include\arch\arm\aarch32\mpu\arm_mpu.h:13,
                     from C:\v1.7.1\zephyr\include\arch\arm\aarch32\arch.h:187,
                     from C:\v1.7.1\zephyr\include\arch\cpu.h:19,
                     from C:\v1.7.1\zephyr\include\kernel_includes.h:33,
                     from C:\v1.7.1\zephyr\include\kernel.h:17,
                     from C:\v1.7.1\zephyr\arch\arm\core\offsets\offsets_aarch32.c:28,
                     from C:\v1.7.1\zephyr\arch\arm\core\offsets\offsets.c:9:
    C:\v1.7.1\modules\hal\nordic\nrfx\mdk\nrf52.h:143:10: fatal error: core_cm4.h: No such file or directory
      143 | #include "core_cm4.h"                           /*!< ARM Cortex-M4 processor and core peripherals                              */
          |          ^~~~~~~~~~~~
    compilation terminated.
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'c:\v1.7.1\toolchain\opt\bin\cmake.EXE' --build 'd:\hf-test-code\hfworld\build'
    The terminal process terminated with exit code: 1.
    
    Terminal will be reused by tasks, press any key to close it.

  • nRF Connect for Desktop v3.8.0 --->Toolchain Manager ---> nRF Connect SDK v1.7.1, Install build environment.

    And I assume you also did an automatic installation?

    Could you head into SES, go to Tools --> Package Manager, and from there see if you have "CMSIS-CORE Support Package" and "Nordic Semiconductor nRF CPU Support Package"
    installed?

    And could you try building it in SES and the command line to see if it works there?

    You can build the project using command line with west:

    west build -b nrf52dk_nrf52832

    Best regards,
    Elfving
  • Yes, automatic installation.

    Sorry, i  like use vs studio code ,so i don't try SES.

    If i useing command line with west,i got a previous mistake.

    Is there any other way for me to check whether I own these two packages?

     "CMSIS-CORE Support Package" and "Nordic Semiconductor nRF CPU Support Package"

  • Hey again Dark Knight!

    Could you open the directory ncs/v1.7.1/zephyr/samples/hello_world/ in a terminal, and try to build the sample from there? 

    v1.7.1\zephyr\samples\hello_world> west build -b nrf52dk_nrf52832 

    Best regards,

    Elfving

Related