From 123d70f7f75f827ba1341edd6ed5f9f17a55ee14 Mon Sep 17 00:00:00 2001 From: Chris Giacofei Date: Fri, 27 Jan 2023 07:19:04 -0500 Subject: [PATCH] Finally, working esptool command. --- MakefileGlobal.mk | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/MakefileGlobal.mk b/MakefileGlobal.mk index 64ab427..4e73995 100644 --- a/MakefileGlobal.mk +++ b/MakefileGlobal.mk @@ -17,6 +17,8 @@ TARGET_DIR := $(BASE_DIR)/$(subst :,.,build/$(FQBN)) BIN_DIR := $(BASE_DIR)/bin SRC := $(wildcard $(SKETCH_DIR)/*.ino) HDRS := $(wildcard $(SKETCH_DIR)/*.h) +LIBH := $(wildcard $(BASE_DIR)/lib/**/*.h) +LIBS := $(LIBH) $(wildcard $(BASE_DIR)/lib/**/*.cpp) BIN := $(notdir $(SRC)).bin $(info FQBN is [${FQBN}]) @@ -36,7 +38,7 @@ all: $(BIN_DIR)/$(BIN) upload compile: $(BIN_DIR)/$(BIN) upload: $(BIN_DIR)/$(BIN) - $(ESPTOOL) -v -cd nodemcu -b 115200 -p $(MONITOR_PORT) -ca 0x00000 -cf $(TARGET_DIR)/$(SKETCH).bin + $(ESPTOOL) --port $(MONITOR_PORT) --chip esp8266 --baud 460800 write_flash -fm dio -fs 16MB 0x0 $(TARGET_DIR)/$(SKETCH).bin ota: $(BIN_DIR)/$(BIN) $(ESPOTA) -d -r -i $(ESP_IP) -I $(OTA_SERVER) -p 8266 -P 8266 -a $(OTA_PASSWD) -f $(TARGET_DIR)/$(SKETCH).bin @@ -59,7 +61,7 @@ new-library: .PHONY: all compile test library upload ota clean monitor -$(TARGET_DIR)/$(BIN): $(SRC) $(HDRS) +$(TARGET_DIR)/$(BIN): $(SRC) $(HDRS) $(LIBS) @ echo $(FQBN) @ mkdir -p $(TARGET_DIR)