Finally, working esptool command.

This commit is contained in:
Chris Giacofei 2023-01-27 07:19:04 -05:00
parent 74806fe198
commit 123d70f7f7

View File

@ -17,6 +17,8 @@ TARGET_DIR := $(BASE_DIR)/$(subst :,.,build/$(FQBN))
BIN_DIR := $(BASE_DIR)/bin BIN_DIR := $(BASE_DIR)/bin
SRC := $(wildcard $(SKETCH_DIR)/*.ino) SRC := $(wildcard $(SKETCH_DIR)/*.ino)
HDRS := $(wildcard $(SKETCH_DIR)/*.h) HDRS := $(wildcard $(SKETCH_DIR)/*.h)
LIBH := $(wildcard $(BASE_DIR)/lib/**/*.h)
LIBS := $(LIBH) $(wildcard $(BASE_DIR)/lib/**/*.cpp)
BIN := $(notdir $(SRC)).bin BIN := $(notdir $(SRC)).bin
$(info FQBN is [${FQBN}]) $(info FQBN is [${FQBN}])
@ -36,7 +38,7 @@ all: $(BIN_DIR)/$(BIN) upload
compile: $(BIN_DIR)/$(BIN) compile: $(BIN_DIR)/$(BIN)
upload: $(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) 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 $(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 .PHONY: all compile test library upload ota clean monitor
$(TARGET_DIR)/$(BIN): $(SRC) $(HDRS) $(TARGET_DIR)/$(BIN): $(SRC) $(HDRS) $(LIBS)
@ echo $(FQBN) @ echo $(FQBN)
@ mkdir -p $(TARGET_DIR) @ mkdir -p $(TARGET_DIR)