yanbe / bme280-esp-idf-i2c

Sample code for reading values from a BME280 temperature-humidity-pressure sensor, via ESP-IDF's I2C master driver, supports both normal mode and forced mode described in the datasheet. https://ae-bst.resource.bosch.com/media/_tech/media/datasheets/BST-BME280_DS001-11.pdf
Apache License 2.0
42 stars 17 forks source link

No rule to make target `driver/bme280.o #3

Open zackdvd opened 5 years ago

zackdvd commented 5 years ago

Hi, thanks for your code. I'm having trouble compiling this, is this an issue? If not maybe you can give me a hint please!

Toolchain path: /Users/dvd/src/esp/xtensa-esp32-elf/bin/xtensa-esp32-elf-gcc
Toolchain version: crosstool-ng-1.22.0-80-g6c4433a
Compiler version: 5.2.0
Python requirements from /Users/dvd/src/esp/esp-idf/requirements.txt are satisfied.
make[1]: *** No rule to make target `driver/bme280.o', needed by `libbme280.a'.  Stop.
make: *** [component-bme280-build] Error 2

Thank you!

markten commented 5 years ago

I believe part of the issue is that doing a standard git clone doesn't pull the BME280 driver from the Bosch repository into the /components/bme280/driver folder.

I was able to get further with that in place, but now I am running into a bunch of errors due to undefined and mismatched datatypes in the main.c file.

itofficeeu commented 4 years ago

Regards error "No rule to make target 'driver/bme280.o'" during compiling:

CXX build/asio/asio/asio/src/asio.o AR build/asio/libasio.a make[1]: No rule to make target 'driver/bme280.o', needed by 'libbme280.a'. Stop. ~/esp/esp-idf/make/project.mk:609: recipe for target 'component-bme280-build' failed make: [component-bme280-build] Error 2

Solution:

Copy the files

bme280.c

and

bme280.h

from

https://github.com/BoschSensortec/BME280_driver/tree/cf40d00b0b5139e287b670881c433c0041d98d9f

into

/home/xox/esp/esp-idf/projects/esp32-ota-https/components/bme280/driver

and compile again.