Get bug with DMIC example for nRF52840 seed XIAO studio (DEVICE_DT_GET)

I try the dmic example with I'm trying the dmic example with nRF52840 seed XIAO studio but it keeps showing errors in DEVICE DT_GET. Please help mebut it keeps showing errors in DEVICE DT_GET. Please help me !

I use vscode, nrf connect skd 2.5.1.

Here is some images of error.

Parents
  • Hello,

    I use vscode, nrf connect skd 2.5.1.

    While checking the screenshot, it says NCS 2.5.99. Could you confirm this? If there is any conflict between these two, I recommend correcting it first.

    I'm trying the dmic example with nRF52840 seed XIAO studio

    So have you changed anything inside the sample?

    While checking the logs, the error says an undefined error. Can you share the whole log here?

    I try the dmic example with I'm trying the dmic example with nRF52840

    Are you building it for 52840 or 5340dk because the overlay you mentioned is for 5340dk?

    Kind Regards,

    Abhijith

  • Hi Meno, 
    Thank u for your time,
    i use nRF52840 seed XIAO and built for board xiao ble 
    i was trying to some oler version this is the log for ncs 2.3.0
    i haven't change anything inside the sample
    I'm new developer so sorry :((

    Building pdm
    west build --build-dir d:/nRF52840/MyProject/pdm/build d:/nRF52840/MyProject/pdm

    [12/108] Building C object CMakeFiles/app.dir/src/main.c.obj
    FAILED: CMakeFiles/app.dir/src/main.c.obj
    D:\nRF52840\toolchains\v2.3.0\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DNRF52840_XXAA -DUSE_PARTITION_MANAGER=0 -D__PROGRAM_START -D__ZEPHYR__=1 -ID:/nRF52840/v2.3.0/zephyr/include -Izephyr/include/generated -ID:/nRF52840/v2.3.0/zephyr/soc/arm/nordic_nrf/nrf52 -ID:/nRF52840/v2.3.0/zephyr/soc/arm/nordic_nrf/common/. -ID:/nRF52840/v2.3.0/zephyr/subsys/usb/device -ID:/nRF52840/v2.3.0/nrf/include -ID:/nRF52840/v2.3.0/nrf/tests/include -ID:/nRF52840/v2.3.0/modules/hal/cmsis/CMSIS/Core/Include -ID:/nRF52840/v2.3.0/modules/hal/nordic/nrfx -ID:/nRF52840/v2.3.0/modules/hal/nordic/nrfx/drivers/include -ID:/nRF52840/v2.3.0/modules/hal/nordic/nrfx/mdk -ID:/nRF52840/v2.3.0/zephyr/modules/hal_nordic/nrfx/. -isystem D:/nRF52840/v2.3.0/zephyr/lib/libc/minimal/include -isystem d:/nrf52840/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include -isystem d:/nrf52840/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include-fixed -isystem D:/nRF52840/v2.3.0/nrfxlib/crypto/nrf_cc310_platform/include -fno-strict-aliasing -Os -imacros D:/nRF52840/MyProject/pdm/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=D:/nRF52840/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros D:/nRF52840/v2.3.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=D:/nRF52840/MyProject/pdm=CMAKE_SOURCE_DIR -fmacro-prefix-map=D:/nRF52840/v2.3.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=D:/nRF52840/v2.3.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles\app.dir\src\main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c ../src/main.c
    In file included from D:/nRF52840/v2.3.0/zephyr/include/zephyr/toolchain/gcc.h:89,
    from D:/nRF52840/v2.3.0/zephyr/include/zephyr/toolchain.h:50,
    from D:/nRF52840/v2.3.0/zephyr/include/zephyr/kernel_includes.h:19,
    from D:/nRF52840/v2.3.0/zephyr/include/zephyr/kernel.h:17,
    from ../src/main.c:7:
    ../src/main.c: In function 'main':
    D:/nRF52840/v2.3.0/zephyr/include/zephyr/device.h:83:41: error: '__device_dts_ord_DT_N_NODELABEL_dmic_dev_ORD' undeclared (first use in this function)
    83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~~~
    D:/nRF52840/v2.3.0/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
    132 | #define _DO_CONCAT(x, y) x ## y
    | ^
    D:/nRF52840/v2.3.0/zephyr/include/zephyr/device.h:83:33: note: in expansion of macro '_CONCAT'
    83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~
    D:/nRF52840/v2.3.0/zephyr/include/zephyr/device.h:209:37: note: in expansion of macro 'DEVICE_NAME_GET'
    209 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
    | ^~~~~~~~~~~~~~~
    D:/nRF52840/v2.3.0/zephyr/include/zephyr/device.h:226:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
    226 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
    | ^~~~~~~~~~~~~~~~~~
    ../src/main.c:80:47: note: in expansion of macro 'DEVICE_DT_GET'
    80 | const struct device *const dmic_dev = DEVICE_DT_GET(DT_NODELABEL(dmic_dev));
    | ^~~~~~~~~~~~~
    D:/nRF52840/v2.3.0/zephyr/include/zephyr/device.h:83:41: note: each undeclared identifier is reported only once for each function it appears in
    83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~~~
    D:/nRF52840/v2.3.0/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
    132 | #define _DO_CONCAT(x, y) x ## y
    | ^
    D:/nRF52840/v2.3.0/zephyr/include/zephyr/device.h:83:33: note: in expansion of macro '_CONCAT'
    83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~
    D:/nRF52840/v2.3.0/zephyr/include/zephyr/device.h:209:37: note: in expansion of macro 'DEVICE_NAME_GET'
    209 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
    | ^~~~~~~~~~~~~~~
    D:/nRF52840/v2.3.0/zephyr/include/zephyr/device.h:226:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
    226 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
    | ^~~~~~~~~~~~~~~~~~
    ../src/main.c:80:47: note: in expansion of macro 'DEVICE_DT_GET'
    80 | const struct device *const dmic_dev = DEVICE_DT_GET(DT_NODELABEL(dmic_dev));
    | ^~~~~~~~~~~~~
    [21/108] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/usb/device/usb_device.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'D:\nRF52840\toolchains\v2.3.0\opt\bin\cmake.EXE' --build 'd:\nRF52840\MyProject\pdm\build'

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

Reply
  • Hi Meno, 
    Thank u for your time,
    i use nRF52840 seed XIAO and built for board xiao ble 
    i was trying to some oler version this is the log for ncs 2.3.0
    i haven't change anything inside the sample
    I'm new developer so sorry :((

    Building pdm
    west build --build-dir d:/nRF52840/MyProject/pdm/build d:/nRF52840/MyProject/pdm

    [12/108] Building C object CMakeFiles/app.dir/src/main.c.obj
    FAILED: CMakeFiles/app.dir/src/main.c.obj
    D:\nRF52840\toolchains\v2.3.0\opt\zephyr-sdk\arm-zephyr-eabi\bin\arm-zephyr-eabi-gcc.exe -DKERNEL -DNRF52840_XXAA -DUSE_PARTITION_MANAGER=0 -D__PROGRAM_START -D__ZEPHYR__=1 -ID:/nRF52840/v2.3.0/zephyr/include -Izephyr/include/generated -ID:/nRF52840/v2.3.0/zephyr/soc/arm/nordic_nrf/nrf52 -ID:/nRF52840/v2.3.0/zephyr/soc/arm/nordic_nrf/common/. -ID:/nRF52840/v2.3.0/zephyr/subsys/usb/device -ID:/nRF52840/v2.3.0/nrf/include -ID:/nRF52840/v2.3.0/nrf/tests/include -ID:/nRF52840/v2.3.0/modules/hal/cmsis/CMSIS/Core/Include -ID:/nRF52840/v2.3.0/modules/hal/nordic/nrfx -ID:/nRF52840/v2.3.0/modules/hal/nordic/nrfx/drivers/include -ID:/nRF52840/v2.3.0/modules/hal/nordic/nrfx/mdk -ID:/nRF52840/v2.3.0/zephyr/modules/hal_nordic/nrfx/. -isystem D:/nRF52840/v2.3.0/zephyr/lib/libc/minimal/include -isystem d:/nrf52840/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include -isystem d:/nrf52840/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/bin/../lib/gcc/arm-zephyr-eabi/12.1.0/include-fixed -isystem D:/nRF52840/v2.3.0/nrfxlib/crypto/nrf_cc310_platform/include -fno-strict-aliasing -Os -imacros D:/nRF52840/MyProject/pdm/build/zephyr/include/generated/autoconf.h -ffreestanding -fno-common -g -gdwarf-4 -fdiagnostics-color=always -mcpu=cortex-m4 -mthumb -mabi=aapcs -mfp16-format=ieee --sysroot=D:/nRF52840/toolchains/v2.3.0/opt/zephyr-sdk/arm-zephyr-eabi/arm-zephyr-eabi -imacros D:/nRF52840/v2.3.0/zephyr/include/zephyr/toolchain/zephyr_stdint.h -Wall -Wformat -Wformat-security -Wno-format-zero-length -Wno-main -Wno-pointer-sign -Wpointer-arith -Wexpansion-to-defined -Wno-unused-but-set-variable -Werror=implicit-int -fno-pic -fno-pie -fno-asynchronous-unwind-tables -fno-reorder-functions --param=min-pagesize=0 -fno-defer-pop -fmacro-prefix-map=D:/nRF52840/MyProject/pdm=CMAKE_SOURCE_DIR -fmacro-prefix-map=D:/nRF52840/v2.3.0/zephyr=ZEPHYR_BASE -fmacro-prefix-map=D:/nRF52840/v2.3.0=WEST_TOPDIR -ffunction-sections -fdata-sections -std=c99 -nostdinc -MD -MT CMakeFiles/app.dir/src/main.c.obj -MF CMakeFiles\app.dir\src\main.c.obj.d -o CMakeFiles/app.dir/src/main.c.obj -c ../src/main.c
    In file included from D:/nRF52840/v2.3.0/zephyr/include/zephyr/toolchain/gcc.h:89,
    from D:/nRF52840/v2.3.0/zephyr/include/zephyr/toolchain.h:50,
    from D:/nRF52840/v2.3.0/zephyr/include/zephyr/kernel_includes.h:19,
    from D:/nRF52840/v2.3.0/zephyr/include/zephyr/kernel.h:17,
    from ../src/main.c:7:
    ../src/main.c: In function 'main':
    D:/nRF52840/v2.3.0/zephyr/include/zephyr/device.h:83:41: error: '__device_dts_ord_DT_N_NODELABEL_dmic_dev_ORD' undeclared (first use in this function)
    83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~~~
    D:/nRF52840/v2.3.0/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
    132 | #define _DO_CONCAT(x, y) x ## y
    | ^
    D:/nRF52840/v2.3.0/zephyr/include/zephyr/device.h:83:33: note: in expansion of macro '_CONCAT'
    83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~
    D:/nRF52840/v2.3.0/zephyr/include/zephyr/device.h:209:37: note: in expansion of macro 'DEVICE_NAME_GET'
    209 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
    | ^~~~~~~~~~~~~~~
    D:/nRF52840/v2.3.0/zephyr/include/zephyr/device.h:226:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
    226 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
    | ^~~~~~~~~~~~~~~~~~
    ../src/main.c:80:47: note: in expansion of macro 'DEVICE_DT_GET'
    80 | const struct device *const dmic_dev = DEVICE_DT_GET(DT_NODELABEL(dmic_dev));
    | ^~~~~~~~~~~~~
    D:/nRF52840/v2.3.0/zephyr/include/zephyr/device.h:83:41: note: each undeclared identifier is reported only once for each function it appears in
    83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~~~
    D:/nRF52840/v2.3.0/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
    132 | #define _DO_CONCAT(x, y) x ## y
    | ^
    D:/nRF52840/v2.3.0/zephyr/include/zephyr/device.h:83:33: note: in expansion of macro '_CONCAT'
    83 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
    | ^~~~~~~
    D:/nRF52840/v2.3.0/zephyr/include/zephyr/device.h:209:37: note: in expansion of macro 'DEVICE_NAME_GET'
    209 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
    | ^~~~~~~~~~~~~~~
    D:/nRF52840/v2.3.0/zephyr/include/zephyr/device.h:226:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
    226 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
    | ^~~~~~~~~~~~~~~~~~
    ../src/main.c:80:47: note: in expansion of macro 'DEVICE_DT_GET'
    80 | const struct device *const dmic_dev = DEVICE_DT_GET(DT_NODELABEL(dmic_dev));
    | ^~~~~~~~~~~~~
    [21/108] Building C object zephyr/CMakeFiles/zephyr.dir/subsys/usb/device/usb_device.c.obj
    ninja: build stopped: subcommand failed.
    FATAL ERROR: command exited with status 1: 'D:\nRF52840\toolchains\v2.3.0\opt\bin\cmake.EXE' --build 'd:\nRF52840\MyProject\pdm\build'

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

Children
No Data
Related