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

@@ -71,8 +71,6 @@ __API__ k_err_t tos_bin_heap_create(k_bin_heap_t *bin_heap, void *pool, size_t i
*/
__API__ k_err_t tos_bin_heap_destroy(k_bin_heap_t *bin_heap);
#if TOS_CFG_MMHEAP_EN > 0u
/**
* @brief Create a binary heap with a dynamic allocated pool.
* create a binary heap with a dynamic allocated pool.
@@ -102,8 +100,6 @@ __API__ k_err_t tos_bin_heap_create_dyn(k_bin_heap_t *bin_heap, size_t item_cnt,
*/
__API__ k_err_t tos_bin_heap_destroy_dyn(k_bin_heap_t *bin_heap);
#endif
/**
* @brief Push an item.
* push an item into the binary heap.

View File

@@ -57,8 +57,6 @@ __API__ k_err_t tos_chr_fifo_create(k_chr_fifo_t *chr_fifo, void *buffer, size_t
*/
__API__ k_err_t tos_chr_fifo_destroy(k_chr_fifo_t *chr_fifo);
#if TOS_CFG_MMHEAP_EN > 0u
/**
* @brief Create a character fifo with a dynamic allocated buffer.
* Create a character fifo with a dynamic allocated buffer.
@@ -89,8 +87,6 @@ __API__ k_err_t tos_chr_fifo_create_dyn(k_chr_fifo_t *chr_fifo, size_t fifo_size
*/
__API__ k_err_t tos_chr_fifo_destroy_dyn(k_chr_fifo_t *chr_fifo);
#endif
/**
* @brief Push data into character fifo.
* Push one single data into the character fifo.

View File

@@ -20,10 +20,6 @@
#if TOS_CFG_EVENT_DRIVEN_EN > 0u
#if TOS_CFG_MMHEAP_EN == 0u
#error "INVALID config, must enable tos_mmheap to use event-driven"
#endif
#if TOS_CFG_TICKLESS_EN == 1u
#error "INVALID config, tickless not supported in event-driven yet"
#endif

View File

@@ -90,7 +90,7 @@
/////////////////////////////////////////
// enable mmheap
#ifndef TOS_CFG_MMHEAP_EN
#define TOS_CFG_MMHEAP_EN 1u
#define TOS_CFG_MMHEAP_EN 0u
#endif
#ifndef TOS_CFG_MMHEAP_DEFAULT_POOL_EN

View File

@@ -58,8 +58,6 @@ __API__ k_err_t tos_mail_q_create(k_mail_q_t *mail_q, void *pool, size_t mail_cn
*/
__API__ k_err_t tos_mail_q_destroy(k_mail_q_t *mail_q);
#if TOS_CFG_MMHEAP_EN > 0u
/**
* @brief Create a mail queue with dynamic allocated pool.
* create a mail queue with dynamic allocated pool.
@@ -88,8 +86,6 @@ __API__ k_err_t tos_mail_q_create_dyn(k_mail_q_t *mail_q, size_t mail_cnt, size_
*/
__API__ k_err_t tos_mail_q_destroy_dyn(k_mail_q_t *mail_q);
#endif
/**
* @brief Flush the mail queue.
* flush the mail queue.

View File

@@ -57,8 +57,6 @@ __API__ k_err_t tos_msg_q_create(k_msg_q_t *msg_q, void *pool, size_t msg_cnt);
*/
__API__ k_err_t tos_msg_q_destroy(k_msg_q_t *msg_q);
#if TOS_CFG_MMHEAP_EN > 0u
/**
* @brief Create a message queue with dynamic allocated pool.
* create a message queue with dynamic allocated pool.
@@ -86,8 +84,6 @@ __API__ k_err_t tos_msg_q_create_dyn(k_msg_q_t *msg_q, size_t msg_cnt);
*/
__API__ k_err_t tos_msg_q_destroy_dyn(k_msg_q_t *msg_q);
#endif
/**
* @brief Flush the message queue.
* flush the message queue.

View File

@@ -99,8 +99,6 @@ __API__ k_err_t tos_prio_q_create(k_prio_q_t *prio_q, void *mgr_array, void *poo
*/
__API__ k_err_t tos_prio_q_destroy(k_prio_q_t *prio_q);
#if TOS_CFG_MMHEAP_EN > 0u
/**
* @brief Create a priority queue with dynamic allocated mgr array and data pool.
* create a priority queue with dynamic allocated mgr array and data pool.
@@ -131,8 +129,6 @@ __API__ k_err_t tos_prio_q_create_dyn(k_prio_q_t *prio_q, size_t item_cnt, size_
*/
__API__ k_err_t tos_prio_q_destroy_dyn(k_prio_q_t *prio_q);
#endif
/**
* @brief Enqueue an priority queue.
* enqueue an item into the priority queue.

View File

@@ -65,8 +65,6 @@ __API__ k_err_t tos_ring_q_create(k_ring_q_t *ring_q, void *pool, size_t item_cn
*/
__API__ k_err_t tos_ring_q_destroy(k_ring_q_t *ring_q);
#if TOS_CFG_MMHEAP_EN > 0u
/**
* @brief Create a ring queue with dynamic allocated pool.
* create a ring queue with dynamic allocated pool.
@@ -97,9 +95,6 @@ __API__ k_err_t tos_ring_q_create_dyn(k_ring_q_t *ring_q, size_t item_cnt, size_
*/
__API__ k_err_t tos_ring_q_destroy_dyn(k_ring_q_t *ring_q);
#endif
/**
* @brief Enqueue an item.
* enqueue an item into the ring queue.

View File

@@ -196,8 +196,6 @@ __KNL__ __STATIC_INLINE__ void knl_object_deinit(knl_obj_t *knl_obj)
#endif
#if TOS_CFG_MMHEAP_EN > 0u
__KNL__ __STATIC_INLINE__ void knl_object_alloc_reset(knl_obj_t *knl_obj)
{
knl_obj->alloc_type = KNL_OBJ_ALLOC_TYPE_NONE;
@@ -223,8 +221,6 @@ __KNL__ __STATIC_INLINE__ int knl_object_alloc_is_static(knl_obj_t *knl_obj)
return knl_obj->alloc_type == KNL_OBJ_ALLOC_TYPE_STATIC;
}
#endif
__CDECLS_END
#endif /* _TOS_SYS_H_ */