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

@@ -24,7 +24,7 @@ typedef enum evtdrv_err_en {
EVTDRV_ERR_PTR_NULL = 0x2u,
EVTDRV_ERR_MSG_BUSY = 0x3u,
EVTDRV_ERR_TASK_INVALID = 0x4u,
EVTDRV_ERR_MMHEAP_NOT_ENABLED = 0x5u,
EVTDRV_ERR_MMHEAP_INIT_FAILED = 0x5u,
EVTDRV_ERR_EVENT_INVALID = 0x10u,
EVTDRV_ERR_EVENT_OVERFLOW = 0x11u,

View File

@@ -26,7 +26,6 @@ typedef void (*k_evtdrv_poll_t)(void);
* @brief Initialize the event-driven system.
*
* @attention event-driven is a simplified schedule model to support the none-context-switch-based multi-task programming.("the big while 1")
* must enable TOS_CFG_MMHEAP_EN to use event-driven.
*
* @param[in] tasks array of the tasks.
* @param[in] task_table_size size of the tasks.

View File

@@ -21,6 +21,7 @@
__API__ evtdrv_err_t tos_evtdrv_sys_init(evtdrv_task_entry_t tasks[], evtdrv_ttb_sz_t task_table_size, k_evtdrv_poll_t poll)
{
k_err_t kerr;
evtdrv_err_t err;
evtdrv_task_table = &tasks[0];
@@ -30,12 +31,13 @@ __API__ evtdrv_err_t tos_evtdrv_sys_init(evtdrv_task_entry_t tasks[], evtdrv_ttb
#if TOS_CFG_MMHEAP_EN > 0
#if TOS_CFG_MMHEAP_DEFAULT_POOL_EN > 0u
mmheap_init_with_pool(k_mmheap_default_pool, TOS_CFG_MMHEAP_DEFAULT_POOL_SIZE);
kerr = mmheap_init_with_pool(k_mmheap_default_pool, TOS_CFG_MMHEAP_DEFAULT_POOL_SIZE);
#else
mmheap_init();
kerr = mmheap_init();
#endif
#else
return EVTDRV_ERR_MMHEAP_NOT_ENABLED;
if (kerr != K_ERR_NONE) {
return EVTDRV_ERR_MMHEAP_INIT_FAILED;
}
#endif
err = evtdrv_event_init();