2019-05-07 17:12:48 +02:00
|
|
|
FQBN := esp32:esp32:esp32
|
2019-05-07 19:56:11 +02:00
|
|
|
NAME := esp32-env-monitor
|
|
|
|
SOURCE := $(addsuffix .ino, $(NAME)) wifi_login.h
|
|
|
|
TARGET := $(addsuffix .$(subst :,.,$(FQBN)).bin, $(NAME))
|
2019-05-09 16:08:01 +02:00
|
|
|
ELF := $(addsuffix .$(subst :,.,$(FQBN)).elf, $(NAME))
|
2019-05-07 17:12:48 +02:00
|
|
|
PORT := /dev/ttyUSB0
|
|
|
|
ADDRESS := 0x10000
|
|
|
|
|
|
|
|
.PHONY: compile clean upload
|
|
|
|
|
|
|
|
compile: $(TARGET)
|
|
|
|
|
|
|
|
clean:
|
2019-05-09 16:08:01 +02:00
|
|
|
rm -f $(TARGET) $(ELF)
|
2019-05-07 17:12:48 +02:00
|
|
|
|
|
|
|
upload: $(TARGET)
|
2020-05-07 18:10:01 +02:00
|
|
|
ARDUINO_SKETCHBOOK_DIR=$(CURDIR) arduino-cli upload -b $(FQBN) -p $(PORT)
|
2019-05-07 17:12:48 +02:00
|
|
|
|
|
|
|
$(TARGET): $(SOURCE)
|
2019-05-07 19:56:11 +02:00
|
|
|
ARDUINO_SKETCHBOOK_DIR=$(CURDIR) arduino-cli compile -b $(FQBN)
|