add ota algorithm for device

1. effective "Differential Upgrade" patch algorithm with high compression rate
2. effective recovery algorithm support recovery firmware in blocks which has low memory consumption and wear-leveling strategies, especially suitable for embeded devices with low RAM.
3. add sample ota bootloader project, see:
board\TencentOS_tiny_EVB_MX_Plus\KEIL\ota\ota_bootloader_recovery
4. add sample application project for download firmware through http, see:
board\TencentOS_tiny_EVB_MX_Plus\KEIL\ota\ota_application_download_through_http
5. add sample application project for download firmware through qcloud explorer console, see:
board\TencentOS_tiny_EVB_MX_Plus\KEIL\ota\ota_application_download_through_qcloud_iot_explorer
6. an OTA markdown document is pending
This commit is contained in:
daishengdong
2020-06-02 15:03:42 +08:00
parent 84faf16765
commit 5b51d50ade
177 changed files with 42367 additions and 1233 deletions

View File

@@ -0,0 +1,55 @@
TARGET ?= diff
CC := gcc
LD := ld
OUT_ROOT := out
OBJ_DIR := obj
LIB_DIR := lib
TARGET_DIR := target
OUT_DIR := $(OUT_ROOT)/$(OBJ_DIR) $(OUT_ROOT)/$(LIB_DIR) $(OUT_ROOT)/$(TARGET_DIR)
NOECHO := @
INCDIRS := \
../../common/image \
../../common/lzma/3rdparty \
../../common/lzma/wrapper \
../../common/crc \
../../common/diff
SRCDIRS := \
../../common/image \
../../common/lzma/3rdparty \
../../common/lzma/wrapper \
../../common/crc \
../../common/diff \
src
INCLUDE := $(patsubst %, -I %, $(INCDIRS))
CFILES := $(foreach dir, $(SRCDIRS), $(wildcard $(dir)/*.c))
CFILENDIR := $(notdir $(CFILES))
COBJS := $(patsubst %, $(OUT_ROOT)/$(OBJ_DIR)/%, $(CFILENDIR:.c=.o))
OBJS := $(COBJS)
VPATH := $(SRCDIRS)
.PHONY: clean $(OUT_DIR)
$(TARGET): $(OUT_DIR) $(OBJS)
@echo "LD $(TARGET)"
$(NOECHO)$(CC) -o $(OUT_ROOT)/$(TARGET_DIR)/$(TARGET) $(OBJS)
$(OUT_DIR) :
@mkdir -p $@
$(COBJS) : $(OUT_ROOT)/$(OBJ_DIR)/%.o : %.c
@echo "CC $(notdir $<)"
$(NOECHO)$(CC) -Wall -c -O2 $(INCLUDE) -o $@ $<
clean:
@rm -rf $(OUT_ROOT)