feat(ota): Add command to generate OTA bin and add ota example for 1MB flash

"$(PROJECT_NAME).app1.bin", "$(PROJECT_NAME).app2.bin" and "$(PROJECT_NAME).ota.bin" at "build" directory.

Only upload "$(PROJECT_NAME).ota.bin" to the server.

Select the target flash and input "make ota flash" or "make ota flash monitor".

Update the OTA README.md for 1 MB flash.
This commit is contained in:
Dong Heng
2018-10-18 19:37:20 +08:00
parent 3de759602a
commit 5e1b8a0b10
16 changed files with 717 additions and 6 deletions

View File

@ -41,8 +41,12 @@ COMPONENT_ADD_LINKER_DEPS := $(ALL_LIB_FILES) $(addprefix ld/,$(LINKER_SCRIPTS))
# saves us from having to add the target to a Makefile.projbuild
$(COMPONENT_LIBRARY): esp8266_out.ld esp8266_common_out.ld
APP_OFFSET ?= $(CONFIG_APP_OFFSET)
APP_SIZE ?= 0x100000
OUTLD_CFLAGS := -DAPP_OFFSET=$(APP_OFFSET) -DAPP_SIZE=$(APP_SIZE)
esp8266_out.ld: $(COMPONENT_PATH)/ld/esp8266.ld ../include/sdkconfig.h
$(CC) -I ../include -C -P -x c -E $< -o $@
$(CC) $(OUTLD_CFLAGS) -I ../include -C -P -x c -E $< -o $@
esp8266_common_out.ld: $(COMPONENT_PATH)/ld/esp8266.common.ld ../include/sdkconfig.h
$(CC) -I ../include -C -P -x c -E $< -o $@