0

I have an STM32 lorawan discovery board with an attached x_nucleo_iks02a1 shield. I'm trying to run the microphone sample, and I get an error at line 52

const struct device *mic_dev = device_get_binding(DT_LABEL(DT_INST(0, st_mpxxdtyy)));
// identifier "DT_N_INST_0_st_mpxxdtyy_P_label" is undefined

I looked at the zephyr.dts file and noticed that there is no compat listed with the string st_mpxxdtyy so I suppose that is the reason for the failure. The board I am using is not a nucleo but does have the same arduino compatible headers. Do I need to port this shield to this board?

richbai90
  • 4,994
  • 4
  • 50
  • 85

1 Answers1

0

Copy the overlay file x_nucleo_iks02a1_mic.overlay from /zephyrproject/zephyr/boards/shields/x_nucleo_iks02a1 to the root of your projectfolder.

Now you should be able to retrieve the device structure with:

const struct device *mic_dev = device_get_binding("MP34DT05");
El tornillo
  • 437
  • 3
  • 16