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

@@ -33,9 +33,7 @@ __API__ k_err_t tos_mail_q_create(k_mail_q_t *mail_q, void *pool, size_t mail_cn
pend_object_init(&mail_q->pend_obj);
TOS_OBJ_INIT(mail_q, KNL_OBJ_TYPE_MAIL_QUEUE);
#if TOS_CFG_MMHEAP_EN > 0u
knl_object_alloc_set_static(&mail_q->knl_obj);
#endif
return K_ERR_NONE;
}
@@ -48,11 +46,9 @@ __API__ k_err_t tos_mail_q_destroy(k_mail_q_t *mail_q)
TOS_PTR_SANITY_CHECK(mail_q);
TOS_OBJ_VERIFY(mail_q, KNL_OBJ_TYPE_MAIL_QUEUE);
#if TOS_CFG_MMHEAP_EN > 0u
if (!knl_object_alloc_is_static(&mail_q->knl_obj)) {
return K_ERR_OBJ_INVALID_ALLOC_TYPE;
}
#endif
TOS_CPU_INT_DISABLE();
@@ -67,9 +63,7 @@ __API__ k_err_t tos_mail_q_destroy(k_mail_q_t *mail_q)
pend_object_deinit(&mail_q->pend_obj);
TOS_OBJ_DEINIT(mail_q);
#if TOS_CFG_MMHEAP_EN > 0u
knl_object_alloc_reset(&mail_q->knl_obj);
#endif
TOS_CPU_INT_ENABLE();
knl_sched();
@@ -77,8 +71,6 @@ __API__ k_err_t tos_mail_q_destroy(k_mail_q_t *mail_q)
return K_ERR_NONE;
}
#if TOS_CFG_MMHEAP_EN > 0u
__API__ k_err_t tos_mail_q_create_dyn(k_mail_q_t *mail_q, size_t mail_cnt, size_t mail_size)
{
k_err_t err;
@@ -131,8 +123,6 @@ __API__ k_err_t tos_mail_q_destroy_dyn(k_mail_q_t *mail_q)
return K_ERR_NONE;
}
#endif
__API__ k_err_t tos_mail_q_flush(k_mail_q_t *mail_q)
{
TOS_PTR_SANITY_CHECK(mail_q);