Nordic nrf_dm sample does not build

I checked out the nrf  github repo and tried to build the nrf_dm sample for  the nRF 52840 dev kit which is what I have
In VSCode I chose "Add an existing application" and selected the nrf_dm sample directory
Then selected the nrf52840dk_nrd52840 from the "Add build configuration" screen but the build fails with the following - see below
 I did not modify anything.VSCode toolchain is Zephyr 1.9.1 SDK
 Here is the build output
Any ideas why it's failing?
Thanks
Andy
----------------------------------------------------------------------------
* Executing task: nRF Connect: Generate config nrf52840dk_nrf52840 for c:\Users\Andy\OneDrive\Desktop\andy\devel\\samples\nrf_dm

Building nrf_dm
west build --build-dir c:\Users\Andy\OneDrive\Desktop\andy\devel\\samples\nrf_dm\build c:\Users\Andy\OneDrive\Desktop\andy\devel\samples\nrf_dm --pristine --board nrf52840dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DBOARD_ROOT:STRING="c:/Users/Andy/OneDrive/Desktop/andy/devel/samples/nrf_dm"

-- west build: generating a build system
Including boilerplate (Zephyr base): C:/v1.9.1/zephyr/cmake/app/boilerplate.cmake
-- Application: C:/Users/Andy/OneDrive/Desktop/andy/devel/samples/nrf_dm
-- Zephyr version: 2.7.99 (C:/v1.9.1/zephyr), build: v2.7.99-ncs1-1
-- Found Python3: C:/v1.9.1/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
-- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
-- Board: nrf52840dk_nrf52840
-- Cache files will be written to: C:/v1.9.1/zephyr/.cache
-- Found dtc: C:/v1.9.1/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
-- Found toolchain: gnuarmemb (c:/v1.9.1/toolchain/opt)
-- Found BOARD.dts: C:/v1.9.1/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
-- Generated zephyr.dts: C:/Users/Andy/OneDrive/Desktop/andy/devel/samples/nrf_dm/build/zephyr/zephyr.dts
-- Generated devicetree_unfixed.h: C:/Users/Andy/OneDrive/Desktop/andy/devel//samples/nrf_dm/build/zephyr/include/generated/devicetree_unfixed.h
-- Generated device_extern.h: C:/Users/Andy/OneDrive/Desktop/andy/devel/samples/nrf_dm/build/zephyr/include/generated/device_extern.h
-- Including generated dts.cmake file: C:/Users/Andy/OneDrive/Desktop/andy/devel/samples/nrf_dm/build/zephyr/dts.cmake

warning: DM_GPIO_DEBUG (defined at C:/v1.9.1/nrf\subsys\dm/Kconfig:81) was assigned the value 'y'
but got the value 'n'. Check these unsatisfied dependencies: NRF_DM (=n). See
docs.zephyrproject.org/.../CONFIG_DM_GPIO_DEBUG.html and/or look up
DM_GPIO_DEBUG 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: Experimental symbol BT_DDFS is enabled.


Parsing C:/v1.9.1/zephyr/Kconfig
Loaded configuration 'C:/v1.9.1/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
Merged configuration 'C:/Users/Andy/OneDrive/Desktop/andy/devel/samples/nrf_dm/prj.conf'
Merged configuration 'C:/Users/Andy/OneDrive/Desktop/andy/devel/samples/nrf_dm/build/zephyr/misc/generated/extra_kconfig_options.conf'
C:/Users/Andy/OneDrive/Desktop/andy/devel//samples/nrf_dm/prj.conf:26: warning: attempt to assign the value 'y' to the undefined symbol DM_MODULE

C:/Users/Andy/OneDrive/Desktop/andy/devel//samples/nrf_dm/prj.conf:32: warning: attempt to assign the value 'n' to the undefined symbol DM_MODULE_LOG_LEVEL_DBG

error: Aborting due to Kconfig warnings

CMake Error at C:/v1.9.1/zephyr/cmake/kconfig.cmake:272 (message):
command failed with return code: 1
Call Stack (most recent call first):
C:/v1.9.1/zephyr/cmake/app/boilerplate.cmake:544 (include)
C:/v1.9.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
C:/v1.9.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
CMakeLists.txt:8 (find_package)


-- Configuring incomplete, errors occurred!
FATAL ERROR: command exited with status 1: 'c:\v1.9.1\toolchain\opt\bin\cmake.EXE' '-DWEST_PYTHON=c:\v1.9.1\toolchain\opt\bin\python.exe' '-Bc:\Users\Andy\OneDrive\Desktop\andy\devel\samples\nrf_dm\build' '-Sc:\Users\Andy\OneDrive\Desktop\andy\devel\samples\nrf_dm' -GNinja -DBOARD=nrf52840dk_nrf52840 -DNCS_TOOLCHAIN_VERSION:STRING=NONE -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DBOARD_ROOT:STRING=c:/Users/Andy/OneDrive/Desktop/andy/devel/samples/nrf_dm

* The terminal process terminated with exit code: 1.
* Terminal will be reused by tasks, press any key to close it.
-------------------------------------------------------------
Parents Reply Children
  • That did not help

    Log below

    My Toolchain Manager path is C:\

    Executing task: nRF Connect: Generate config nrf52840dk_nrf52840 for c:\nrf-samples\nrf_dm

    Building nrf_dm
    west build --build-dir c:\nrf-samples\nrf_dm\build c:\nrf-samples\nrf_dm --pristine --board nrf52840dk_nrf52840 -- -DNCS_TOOLCHAIN_VERSION:STRING="NONE" -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DBOARD_ROOT:STRING="c:/nrf-samples/nrf_dm"

    -- west build: generating a build system
    Including boilerplate (Zephyr base): C:/v1.9.1/zephyr/cmake/app/boilerplate.cmake
    -- Application: C:/nrf-samples/nrf_dm
    -- Zephyr version: 2.7.99 (C:/v1.9.1/zephyr), build: v2.7.99-ncs1-1
    -- Found Python3: C:/v1.9.1/toolchain/opt/bin/python.exe (found suitable exact version "3.8.2") found components: Interpreter
    -- Found west (found suitable version "0.12.0", minimum required is "0.7.1")
    -- Board: nrf52840dk_nrf52840
    -- Cache files will be written to: C:/v1.9.1/zephyr/.cache
    -- Found dtc: C:/v1.9.1/toolchain/opt/bin/dtc.exe (found suitable version "1.4.7", minimum required is "1.4.6")
    -- Found toolchain: gnuarmemb (c:/v1.9.1/toolchain/opt)
    -- Found BOARD.dts: C:/v1.9.1/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840.dts
    -- Generated zephyr.dts: C:/nrf-samples/nrf_dm/build/zephyr/zephyr.dts
    -- Generated devicetree_unfixed.h: C:/nrf-samples/nrf_dm/build/zephyr/include/generated/devicetree_unfixed.h
    -- Generated device_extern.h: C:/nrf-samples/nrf_dm/build/zephyr/include/generated/device_extern.h
    -- Including generated dts.cmake file: C:/nrf-samples/nrf_dm/build/zephyr/dts.cmake

    warning: DM_GPIO_DEBUG (defined at C:/v1.9.1/nrf\subsys\dm/Kconfig:81) was assigned the value 'y'
    but got the value 'n'. Check these unsatisfied dependencies: NRF_DM (=n). See
    docs.zephyrproject.org/.../CONFIG_DM_GPIO_DEBUG.html and/or look up
    DM_GPIO_DEBUG 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: Experimental symbol BT_DDFS is enabled.


    Parsing C:/v1.9.1/zephyr/Kconfig
    Loaded configuration 'C:/v1.9.1/zephyr/boards/arm/nrf52840dk_nrf52840/nrf52840dk_nrf52840_defconfig'
    Merged configuration 'C:/nrf-samples/nrf_dm/prj.conf'
    Merged configuration 'C:/nrf-samples/nrf_dm/build/zephyr/misc/generated/extra_kconfig_options.conf'
    C:/nrf-samples/nrf_dm/prj.conf:26: warning: attempt to assign the value 'y' to the undefined symbol DM_MODULE

    C:/nrf-samples/nrf_dm/prj.conf:32: warning: attempt to assign the value 'n' to the undefined symbol DM_MODULE_LOG_LEVEL_DBG

    error: Aborting due to Kconfig warnings

    CMake Error at C:/v1.9.1/zephyr/cmake/kconfig.cmake:272 (message):
    command failed with return code: 1
    Call Stack (most recent call first):
    C:/v1.9.1/zephyr/cmake/app/boilerplate.cmake:544 (include)
    C:/v1.9.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:24 (include)
    C:/v1.9.1/zephyr/share/zephyr-package/cmake/ZephyrConfig.cmake:35 (include_boilerplate)
    CMakeLists.txt:8 (find_package)


    -- Configuring incomplete, errors occurred!
    FATAL ERROR: command exited with status 1: 'c:\v1.9.1\toolchain\opt\bin\cmake.EXE' '-DWEST_PYTHON=c:\v1.9.1\toolchain\opt\bin\python.exe' '-Bc:\nrf-samples\nrf_dm\build' '-Sc:\nrf-samples\nrf_dm' -GNinja -DBOARD=nrf52840dk_nrf52840 -DNCS_TOOLCHAIN_VERSION:STRING=NONE -DCONFIG_DEBUG_OPTIMIZATIONS=y -DCONFIG_DEBUG_THREAD_INFO=y -DBOARD_ROOT:STRING=c:/nrf-samples/nrf_dm

    * The terminal process terminated with exit code: 1.
    * Terminal will be reused by tasks, press any key to close it.

  • OK, got it to build

    Had to make the following changes with 1.9.1 Zephyr SDK

    1.Replace CONFIG_DM_MODULE and CONFIG_DM_MODULE_LOG_LEVEL_DBG 

    with

    CONFIG_NRF_DM=y and CONFIG_NRF_DM_LOG_LEVEL_DBG=y

    2, Remove "zephyr" subpath from all includes i.e
    #include <zephyr/kernel.h> becomes
    #include <kernel.h>
    3, There are still errors in pwm_led.c but I didn't care about LED's and just commented everything out Slight smile
Related