diff --git a/Makefile b/Makefile index 63e7a66..00b71c3 100644 --- a/Makefile +++ b/Makefile @@ -3,7 +3,6 @@ NAME := esp32-env-monitor SOURCE := $(addsuffix .ino, $(NAME)) wifi_login.h TARGET := $(addsuffix .$(subst :,.,$(FQBN)).bin, $(NAME)) ELF := $(addsuffix .$(subst :,.,$(FQBN)).elf, $(NAME)) -ESPTOOL := ~/.arduino15/packages/esp32/tools/esptool_py/2.6.1/esptool.py PORT := /dev/ttyUSB0 ADDRESS := 0x10000 @@ -15,7 +14,7 @@ clean: rm -f $(TARGET) $(ELF) upload: $(TARGET) - $(ESPTOOL) --port $(PORT) write_flash $(ADDRESS) $(TARGET) + ARDUINO_SKETCHBOOK_DIR=$(CURDIR) arduino-cli upload -b $(FQBN) -p $(PORT) $(TARGET): $(SOURCE) ARDUINO_SKETCHBOOK_DIR=$(CURDIR) arduino-cli compile -b $(FQBN) diff --git a/README.md b/README.md index 0dc21b4..d516254 100644 --- a/README.md +++ b/README.md @@ -18,5 +18,4 @@ Air quality and other environment data monitoring for an ESP32 board A Makefile is provided to compile and upload to the board. This Makefile uses: -* [arduino-cli](https://github.com/arduino/arduino-cli) for compilation -* `esptool.py` shipped with the arduino core for uploading (while this [issue](https://github.com/arduino/arduino-cli/issues/163) is not resolved) +* [arduino-cli](https://github.com/arduino/arduino-cli) for compilation and uploading