Adding a second sensor. Devicetree issue. MPU6050 & HMC58831L

Hey comunity,

I have been developing with the nrf9160dk, and got mpu6050 accelerometer and gyro to work through i2c2. I would like to add another sensor, the hmc58831 magnetometer. As soon as i update the device tree overlay to include the sensor at i2c0, the program won't build. Here is my devicetree. 

 

&i2c2 {
	mpu6050@68 {
		compatible = "invensense,mpu6050";
		reg = <0x68>;
		status = "okay";
		label = "MPU6050";
		int-gpios = <&gpio0 11 GPIO_ACTIVE_HIGH>;
	};

	clock-frequency = <I2C_BITRATE_STANDARD>;
};


&i2c0 {
    compatible = "nordic,nrf-twim";
	status = "okay";
    clock-frequency = <I2C_BITRATE_STANDARD>;  
    pinctrl-0 = <&i2c0_default>;
	pinctrl-names = "default";
	
	hmc58831@1e {
		compatible = "honeywell,hmc5883l";
		reg = <0x1E>;
		label = "hmc58831";
	};

};

&uart0 {
    status = "disabled";
};

I get a lot of errors like these in the terminal when building...

C:/ncs/v2.6.0/zephyr/subsys/logging/backends/log_backend_uart.c:38:9: note: in expansion of macro 'COND_CODE_1'
   38 |         COND_CODE_1(DT_HAS_CHOSEN(zephyr_log_uart), (ctx->uart_dev),                               \
      |         ^~~~~~~~~~~
C:/ncs/v2.6.0/zephyr/include/zephyr/toolchain/common.h:138:23: note: in expansion of macro '_DO_CONCAT'
  138 | #define _CONCAT(x, y) _DO_CONCAT(x, y)
      |                       ^~~~~~~~~~
C:/ncs/v2.6.0/zephyr/include/zephyr/device.h:89:33: note: in expansion of macro '_CONCAT'
   89 | #define DEVICE_NAME_GET(dev_id) _CONCAT(__device_, dev_id)
      |                                 ^~~~~~~
C:/ncs/v2.6.0/zephyr/include/zephyr/device.h:216:37: note: in expansion of macro 'DEVICE_NAME_GET'
  216 | #define DEVICE_DT_NAME_GET(node_id) DEVICE_NAME_GET(Z_DEVICE_DT_DEV_ID(node_id))
      |                                     ^~~~~~~~~~~~~~~
C:/ncs/v2.6.0/zephyr/include/zephyr/device.h:233:34: note: in expansion of macro 'DEVICE_DT_NAME_GET'
  233 | #define DEVICE_DT_GET(node_id) (&DEVICE_DT_NAME_GET(node_id))
      |                                  ^~~~~~~~~~~~~~~~~~

I hope you can help somehow:)

Best regards!

Related