Closed md-jamal closed 4 years ago
CC @BoschSensortec
Not familiar with this device, but try making it
bme680@77 {
compatible = "bosch,bme680";
reg = <0x77>;
label = "BME680";
};
Doing a git grep
for some of the other compatible strings you'll find in the bindings in dts/bindings/sensor/
might be helpful too, e.g. bosch,bmg160
.
Added the following to sam_e70_xplained.overlay
bme680@77 {
compatible = "bosch,bme680";
reg = <0x77>;
label = "BME680";
};
I get the following error:
Error: sam_e70_xplained.dts.pre.tmp:403.1-10 syntax error
FATAL ERROR: Unable to parse input tree
CMake Error at /home/abc/zephyrproject/zephyr/cmake/dts.cmake:183 (message):
command failed with return code: 1
Call Stack (most recent call first):
/home/abc/zephyrproject/zephyr/cmake/app/boilerplate.cmake:460 (include)
CMakeLists.txt:8 (include)
The node has to be a child of an I2C controller. E.g.:
&i2c0 {
bme60@77 {
label = "bme680";
compatible = "bosch,bme680";
reg = <0x77>;
};
};
It worked...
I believe the issue is that you need to add a bme680 instance in your device tree file.
Try something like this:
&i2c1 {
compatible = ...
bme680@76 {
compatible = "bosch,bme680";
label = "BME680";
reg = <0x76>;
};
};
seems to be answered, closing.
Describe the bug A clear and concise description of what the bug is. What have you tried to diagnose or workaround this issue?
To Reproduce Steps to reproduce the behavior: $ west build -b sam_e70_xplained samples/sensor/bme680
Expected behavior Build failed. From one of the issues, it says to update device tree . Can you please provide an sample device tree for bme680
Adding this, didn't work
bme680@77 { compatible = "bosch,bme680"; reg = <0x77>; };
Screenshots or console output /home/abc/zephyrproject/zephyr/samples/sensor/bme680/src/main.c:14:42: error: 'DT_INST_0_BOSCH_BME680_LABEL' undeclared (first use in this function); did you mean 'DT_INST_0_SOC_NV_FLASH_LABEL'? struct device *dev = device_get_binding(DT_INST_0_BOSCH_BME680_LABEL); ^
~~~~~~~ DT_INST_0_SOC_NV_FLASH_LABELEnvironment (please complete the following information):
Additional context Add any other context about the problem here.