Finally, working esptool command.
This commit is contained in:
parent
74806fe198
commit
123d70f7f7
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user