I am currently working on a project involving the nRF5340 Audio Development Kit, and I am facing issues while trying to build the DMIC sample provided in the Zephyr RTOS https://github.com/nrfconnect/sdk-zephyr/tree/main/samples/drivers/audio/dmic.
I am encountering numerous errors when attempting to build the main.c file of the DMIC sample. These errors seem to be originating from the DMIC sample Devicetree file, and despite my best efforts, I have been unable to resolve them.
On the terminal I getting the following error-
In function 'main':
C:/ncs/v2.5.99-dev1/zephyr/include/zephyr/device.h:85:41: error: '__device_dts_ord_DT_N_NODELABEL_dmic_dev_ORD' undeclared (first use in this function)
85 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~~~
C:/ncs/v2.5.99-dev1/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
132 | #define _DO_CONCAT(x, y) x ## y
| ^
C:/ncs/v2.5.99-dev1/zephyr/include/zephyr/device.h:85:33: note: in expansion of macro '_CONCAT'
85 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~
C:/ncs/v2.5.99-dev1/zephyr/include/zephyr/device.h:211:37: note: in expansion of macro 'DEVICE_NAME_GET'
211 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
| ^~~~~~~~~~~~~~~
C:/ncs/v2.5.99-dev1/zephyr/include/zephyr/device.h:228:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
228 | #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));
| ^~~~~~~~~~~~~
C:/ncs/v2.5.99-dev1/zephyr/include/zephyr/device.h:85:41: note: each undeclared identifier is reported only once for each function it appears in
85 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~~~
C:/ncs/v2.5.99-dev1/zephyr/include/zephyr/toolchain/common.h:132:26: note: in definition of macro '_DO_CONCAT'
132 | #define _DO_CONCAT(x, y) x ## y
| ^
C:/ncs/v2.5.99-dev1/zephyr/include/zephyr/device.h:85:33: note: in expansion of macro '_CONCAT'
85 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
| ^~~~~~~
C:/ncs/v2.5.99-dev1/zephyr/include/zephyr/device.h:211:37: note: in expansion of macro 'DEVICE_NAME_GET'
211 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
| ^~~~~~~~~~~~~~~
C:/ncs/v2.5.99-dev1/zephyr/include/zephyr/device.h:228:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
228 | #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));
| ^~~~~~~~~~~~~
[7/42] Building C object modules/hal_nordic/nrfx/CMakeFiles/modules__hal_nordic__nrfx.dir/C_/ncs/v2.5.99-dev1/modules/hal/nordic/nrfx/drivers/src/nrfx_gpiote.c.obj
ninja: build stopped: subcommand failed.
Host operating system- Windows
nRF connect sdk toolchain- v2.5.1
nrf sdk- v2.5.99-dev1
I am using the nRF Connect for VS Code extension.