No more need for esptool

This commit is contained in:
Cedric Girard 2020-05-07 18:10:01 +02:00
parent 1b0863224c
commit 7b02bdc17f
Signed by: X-dark
GPG Key ID: E7D0E125DB9519E4
2 changed files with 2 additions and 4 deletions

View File

@ -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)

View File

@ -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