fix(ota): fix OTA binary which is to be flashed error

This commit is contained in:
dongheng
2019-08-19 17:37:25 +08:00
parent 8680849684
commit ec0b1526ab

View File

@ -119,13 +119,14 @@ app2-flash-all: app2
@$(ESPTOOLPY_WRITE_FLASH) $(patsubst $(APP_OFFSET),$(APP2_OFFSET),$(ESPTOOL_ALL_FLASH_ARGS))
$(OTA1_BIN): all_binaries
@cp $(RAW_BIN) $(RAW_BIN).old
@cp $(RAW_BIN) $(OTA1_BIN)
@echo [GEN] $(OTA1_BIN)
$(OTA2_BIN): $(OTA1_BIN)
ifdef __COMBILE_OTA_BIN
@rm -f ./build/esp8266/esp8266_out.ld
@export CFLAGS= && export CXXFLAGS= && make APP_OFFSET=$(APP2_OFFSET) APP_SIZE=$(APP2_SIZE)
@export CFLAGS= && export CXXFLAGS= && make $(APP_BIN) APP_OFFSET=$(APP2_OFFSET) APP_SIZE=$(APP2_SIZE)
endif
@cp $(RAW_BIN) $(OTA2_BIN)
@echo [GEN] $(OTA2_BIN)
@ -150,6 +151,8 @@ ifdef CONFIG_ESP8266_OTA_FROM_OLD
ota: $(OTA_V2_TO_V3_BIN)
else
ota: $(OTA_BIN)
@cp $(RAW_BIN).old $(RAW_BIN)
@rm $(RAW_BIN).old
endif
ota-clean: