zephyr: x_nucleo_iks02a1 sample won't compile error 'DT_N_INST_0_st_mpxxdtyy_FULL_NAME' undeclared
Describe the bug I don’t know if this is a bug with zephyr, with platformio, or just something I’m missing but I don’t know where else to ask for help. When I try to compile the x_nucleo_iks02a1 microphone sample, it fails with this error
/Users/richbaird/.platformio/packages/framework-zephyr/include/devicetree.h:301:40: error: 'DT_N_INST_0_st_mpxxdtyy_FULL_NAME' undeclared here (not in a function); did you mean 'DT_N_S_otgfs_phy_FULL_NAME'?
#define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
^~~~~~~~~
/Users/richbaird/.platformio/packages/framework-zephyr/include/device.h:771:11: note: in definition of macro 'Z_DEVICE_DEFINE'
.name = drv_name, \
^~~~~~~~
/Users/richbaird/.platformio/packages/framework-zephyr/include/sys/util_internal.h:64:53: note: in expansion of macro '__DEBRACKET'
#define __GET_ARG2_DEBRACKET(ignore_this, val, ...) __DEBRACKET val
^~~~~~~~~~~
/Users/richbaird/.platformio/packages/framework-zephyr/include/sys/util_internal.h:59:2: note: in expansion of macro '__GET_ARG2_DEBRACKET'
__GET_ARG2_DEBRACKET(one_or_two_args _if_code, _else_code)
^~~~~~~~~~~~~~~~~~~~
/Users/richbaird/.platformio/packages/framework-zephyr/include/sys/util_internal.h:54:2: note: in expansion of macro '__COND_CODE'
__COND_CODE(_XXXX##_flag, _if_1_code, _else_code)
^~~~~~~~~~~
/Users/richbaird/.platformio/packages/framework-zephyr/include/sys/util_macro.h:117:2: note: in expansion of macro 'Z_COND_CODE_1'
Z_COND_CODE_1(_flag, _if_1_code, _else_code)
^~~~~~~~~~~~~
/Users/richbaird/.platformio/packages/framework-zephyr/include/devicetree.h:637:2: note: in expansion of macro 'COND_CODE_1'
COND_CODE_1(DT_NODE_HAS_PROP(node_id, prop), \
^~~~~~~~~~~
/Users/richbaird/.platformio/packages/framework-zephyr/include/device.h:180:2: note: in expansion of macro 'DT_PROP_OR'
DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id))
^~~~~~~~~~
/Users/richbaird/.platformio/packages/framework-zephyr/include/devicetree.h:464:36: note: in expansion of macro 'DT_CAT'
#define DT_NODE_FULL_NAME(node_id) DT_CAT(node_id, _FULL_NAME)
^~~~~~
/Users/richbaird/.platformio/packages/framework-zephyr/include/device.h:180:29: note: in expansion of macro 'DT_NODE_FULL_NAME'
DT_PROP_OR(node_id, label, DT_NODE_FULL_NAME(node_id))
^~~~~~~~~~~~~~~~~
/Users/richbaird/.platformio/packages/framework-zephyr/include/device.h:223:4: note: in expansion of macro 'DEVICE_DT_NAME'
DEVICE_DT_NAME(node_id), init_fn, \
^~~~~~~~~~~~~~
/Users/richbaird/.platformio/packages/framework-zephyr/include/device.h:239:2: note: in expansion of macro 'DEVICE_DT_DEFINE'
DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__)
^~~~~~~~~~~~~~~~
/Users/richbaird/.platformio/packages/framework-zephyr/include/sys/util_internal.h:84:26: note: in expansion of macro 'UTIL_PRIMITIVE_CAT'
#define UTIL_CAT(a, ...) UTIL_PRIMITIVE_CAT(a, __VA_ARGS__)
^~~~~~~~~~~~~~~~~~
/Users/richbaird/.platformio/packages/framework-zephyr/include/devicetree.h:301:31: note: in expansion of macro 'UTIL_CAT'
#define DT_INST(inst, compat) UTIL_CAT(DT_N_INST, DT_DASH(inst, compat))
^~~~~~~~
/Users/richbaird/.platformio/packages/framework-zephyr/include/devicetree.h:1807:27: note: in expansion of macro 'DT_INST'
#define DT_DRV_INST(inst) DT_INST(inst, DT_DRV_COMPAT)
^~~~~~~
/Users/richbaird/.platformio/packages/framework-zephyr/include/device.h:239:19: note: in expansion of macro 'DT_DRV_INST'
DEVICE_DT_DEFINE(DT_DRV_INST(inst), __VA_ARGS__)
^~~~~~~~~~~
/Users/richbaird/.platformio/packages/framework-zephyr/drivers/audio/mpxxdtyy.c:168:1: note: in expansion of macro 'DEVICE_DT_INST_DEFINE'
DEVICE_DT_INST_DEFINE(0, mpxxdtyy_initialize, NULL, &mpxxdtyy_data, NULL,
^~~~~~~~~~~~~~~~~~~~~
*** [.pio/build/disco_l072cz_lrwan1/drivers__audio/zephyr/drivers/audio/mpxxdtyy.c.o] Error 1
================== [FAILED] Took 5.76 seconds ==================
It seems that it’s not finding the mpxxdtyy device in any of the included headers. The full backtrace begins at line 52 of the sample
const struct device *mic_dev = device_get_binding(DT_LABEL(DT_INST(0, st_mpxxdtyy)));
I’m just barely learning zephyr, and it’s my first RTOS at that, so I really don’t know where to go from here. I am using platform IO to simplify things a bit, but I have set it up to use cmake version 3.21.2. I also tried compiling the sample using west with this command west build -b b_l072z_lrwan1 -s samples/shields/x_nucleo_iks02a1/microphone --cmake-only but I get an error about arduino I2s.
My CMakeLists.txt file is exactly as in the sample, as is my prj.conf file. Any help is appreciated, and sorry again for posting this here, is there a community where I can post these questions? I didn’t see a forum on the zephyr project website, and I did join the discord but it is mostly about the project itself, not applications developed on the platform, and stackoverflow has only 72 followers of the zephyr tag.
Environment (please complete the following information):
- OS: MacOS
- Toolchain cmake and platformio
- Commit SHA or Version used 2.6.0.0
About this issue
- Original URL
- State: closed
- Created 3 years ago
- Comments: 19 (7 by maintainers)
That’s actually the same on F4, on which i2s is functional. So you can check on F4 state of affairs.