This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

BME680 sample on nRF5340

Hi, 

I am trying to interface a BME680 sensor with my nRF5340 DK. I am trying to get the following sample to run (I left everything default): https://developer.nordicsemi.com/nRF_Connect_SDK/doc/latest/zephyr/samples/sensor/bme680/README.html

When building I get the following error:

'DT_N_INST_0_bosch_bme680_P_label' undeclared (first use in this function)

Is there anything specific I need to configure? I'm not sure what to do, this is quite new to me.

Kind regards,

Stefan

Parents
  • Yes, you need to configure the device tree overlay for your board. Go to the sample folder -> boards and check out the pre-configured overlay files. 

    Assuming that you are using the nrf5340dk and building on the cpuapp-core, create an overlay file nrf5340dk_nrf5340_cpuapp.overlay inside the boards folder. You can copy the content from the nrf52840dk overlay file, but change &i2c0 to &i2c1 because that is the one which the cpuapp core is using.

    After that the example should build.

Reply
  • Yes, you need to configure the device tree overlay for your board. Go to the sample folder -> boards and check out the pre-configured overlay files. 

    Assuming that you are using the nrf5340dk and building on the cpuapp-core, create an overlay file nrf5340dk_nrf5340_cpuapp.overlay inside the boards folder. You can copy the content from the nrf52840dk overlay file, but change &i2c0 to &i2c1 because that is the one which the cpuapp core is using.

    After that the example should build.

Children
Related