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

@@ -1,3 +1,4 @@
#include "tos_k.h"
#include "stm32l4xx.h"
#define SECTOR_SIZE 2048 // sector size for stm32l431RCTX

View File

@@ -1,4 +1,4 @@
#include "tos_ota_download.h"
#include "ota_flash.h"
#include "onchip_flash.h"
#define ONCHIP_FLASH_ADDR_START 0x08000000 // start address for onchip flash for stm32l431RCTX
@@ -8,7 +8,7 @@
#define SECTOR_SIZE_LOG2 11 // 2 ^ 11 = 2048
#define FOR_OTA_FLASH_SIZE (2 * SECTOR_SIZE) // storage for OTA
#define FOR_OTA_FLASH_START 0x803d000
#define FOR_OTA_FLASH_START 0x801e000
ota_flash_drv_t stm32l4_norflash_onchip_drv_ota = {
.write = stm32l4_norflash_onchip_write,
@@ -19,7 +19,5 @@ ota_flash_drv_t stm32l4_norflash_onchip_drv_ota = {
ota_flash_prop_t stm32l4_norflash_onchip_prop_ota = {
.sector_size_log2 = SECTOR_SIZE_LOG2,
.pgm_type = OTA_FLASH_PROGRAM_TYPE_DOUBLEWORD,
.flash_start = FOR_OTA_FLASH_START,
.flash_size = FOR_OTA_FLASH_SIZE,
};