diff --git a/board/TencentOS_tiny_EVB_MX_Plus/KEIL/qcloud_iot_explorer_sdk_data_template/TencentOS_tiny.uvoptx b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/qcloud_iot_explorer_sdk_data_template/TencentOS_tiny.uvoptx
index 79750054..e5d531b5 100644
--- a/board/TencentOS_tiny_EVB_MX_Plus/KEIL/qcloud_iot_explorer_sdk_data_template/TencentOS_tiny.uvoptx
+++ b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/qcloud_iot_explorer_sdk_data_template/TencentOS_tiny.uvoptx
@@ -493,8 +493,8 @@
0
0
0
- ..\..\..\..\examples\qcloud_iot_explorer_sdk_data_template\qcloud_iot_hub_sdk_explorer.c
- qcloud_iot_hub_sdk_explorer.c
+ ..\..\..\..\examples\qcloud_iot_explorer_sdk_data_template\entry.c
+ entry.c
0
0
diff --git a/board/TencentOS_tiny_EVB_MX_Plus/KEIL/qcloud_iot_explorer_sdk_data_template/TencentOS_tiny.uvprojx b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/qcloud_iot_explorer_sdk_data_template/TencentOS_tiny.uvprojx
index 1b558a5a..92171982 100644
--- a/board/TencentOS_tiny_EVB_MX_Plus/KEIL/qcloud_iot_explorer_sdk_data_template/TencentOS_tiny.uvprojx
+++ b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/qcloud_iot_explorer_sdk_data_template/TencentOS_tiny.uvprojx
@@ -16,7 +16,7 @@
STM32L431RCTx
STMicroelectronics
- Keil.STM32L4xx_DFP.2.2.0
+ Keil.STM32L4xx_DFP.2.0.0
http://www.keil.com/pack
IRAM(0x20000000-0x2000FFFF) IROM(0x8000000-0x803FFFF) CLOCK(8000000) FPU2 CPUTYPE("Cortex-M4")
@@ -468,9 +468,9 @@
..\..\..\..\examples\qcloud_iot_explorer_sdk_data_template\events_config.c
- qcloud_iot_hub_sdk_explorer.c
+ entry.c
1
- ..\..\..\..\examples\qcloud_iot_explorer_sdk_data_template\qcloud_iot_hub_sdk_explorer.c
+ ..\..\..\..\examples\qcloud_iot_explorer_sdk_data_template\entry.c
diff --git a/board/TencentOS_tiny_EVB_MX_Plus/KEIL/qcloud_iot_explorer_sdk_ota/TencentOS_tiny.uvoptx b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/qcloud_iot_explorer_sdk_ota/TencentOS_tiny.uvoptx
new file mode 100644
index 00000000..84c7a593
--- /dev/null
+++ b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/qcloud_iot_explorer_sdk_ota/TencentOS_tiny.uvoptx
@@ -0,0 +1,2867 @@
+
+
+
+ 1.0
+
+ ### uVision Project, (C) Keil Software
+
+
+ *.c
+ *.s*; *.src; *.a*
+ *.obj; *.o
+ *.lib
+ *.txt; *.h; *.inc
+ *.plm
+ *.cpp
+ 0
+
+
+
+ 0
+ 0
+
+
+
+ TencentOS_tiny
+ 0x4
+ ARM-ADS
+
+ 80000000
+
+ 1
+ 1
+ 0
+ 1
+ 0
+
+
+ 1
+ 65535
+ 0
+ 0
+ 0
+
+
+ 79
+ 66
+ 8
+ .\list\
+
+
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+
+
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+
+
+ 1
+ 0
+ 1
+
+ 18
+
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 0
+ 6
+
+
+
+
+
+
+
+
+
+
+ STLink\ST-LINKIII-KEIL_SWO.dll
+
+
+
+ 0
+ ARMRTXEVENTFLAGS
+ -L70 -Z18 -C0 -M0 -T1
+
+
+ 0
+ DLGTARM
+ (1010=-1,-1,-1,-1,0)(1007=-1,-1,-1,-1,0)(1008=-1,-1,-1,-1,0)(1009=-1,-1,-1,-1,0)(1012=-1,-1,-1,-1,0)
+
+
+ 0
+ ARMDBGFLAGS
+
+
+
+ 0
+ DLGUARM
+ (105=-1,-1,-1,-1,0)
+
+
+ 0
+ UL2CM3
+ UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32L4xx_256 -FS08000000 -FL040000 -FP0($$Device:STM32L431RCTx$CMSIS\Flash\STM32L4xx_256.FLM))
+
+
+ 0
+ ST-LINKIII-KEIL_SWO
+ -U303030303030303030303031 -O10446 -SF4000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC1000 -FN1 -FF0STM32L4xx_256.FLM -FS08000000 -FL040000 -FP0($$Device:STM32L431RCTx$CMSIS\Flash\STM32L4xx_256.FLM)
+
+
+
+
+ 0
+ 0
+ 39
+ 1
+ 134258188
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ ..\..\..\..\examples\qcloud_iot_explorer_sdk_ota\entry.c
+
+ \\TencentOS_tiny\../../../../examples/qcloud_iot_explorer_sdk_ota/entry.c\39
+
+
+
+
+ 0
+ 1
+ k_curr_task
+
+
+ 1
+ 1
+ k_next_task
+
+
+
+
+ 0
+ 2
+ pProperty->key
+
+
+ 1
+ 2
+ sg_DataTemplate[i].data_property.key
+
+
+ 2
+ 2
+ sg_DataTemplate[i].data_property.type
+
+
+ 3
+ 2
+ brightness_str
+
+
+
+ 0
+
+
+ 0
+ 1
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+
+ 1
+ 1
+ 0
+ 2
+ 10000000
+
+
+
+
+
+ Application/MDK-ARM
+ 0
+ 0
+ 0
+ 0
+
+ 1
+ 1
+ 2
+ 0
+ 0
+ 0
+ startup_stm32l431xx.s
+ startup_stm32l431xx.s
+ 0
+ 0
+
+
+
+
+ Application/User
+ 0
+ 0
+ 0
+ 0
+
+ 2
+ 2
+ 1
+ 0
+ 0
+ 0
+ ..\..\BSP\Src\gpio.c
+ gpio.c
+ 0
+ 0
+
+
+ 2
+ 3
+ 1
+ 0
+ 0
+ 0
+ ..\..\BSP\Src\main.c
+ main.c
+ 0
+ 0
+
+
+ 2
+ 4
+ 1
+ 0
+ 0
+ 0
+ ..\..\BSP\Src\mcu_init.c
+ mcu_init.c
+ 0
+ 0
+
+
+ 2
+ 5
+ 1
+ 0
+ 0
+ 0
+ ..\..\BSP\Src\stm32l4xx_hal_msp.c
+ stm32l4xx_hal_msp.c
+ 0
+ 0
+
+
+ 2
+ 6
+ 1
+ 0
+ 0
+ 0
+ ..\..\BSP\Src\usart.c
+ usart.c
+ 0
+ 0
+
+
+ 2
+ 7
+ 1
+ 0
+ 0
+ 0
+ ..\..\BSP\Src\adc.c
+ adc.c
+ 0
+ 0
+
+
+ 2
+ 8
+ 1
+ 0
+ 0
+ 0
+ ..\..\BSP\Src\dac.c
+ dac.c
+ 0
+ 0
+
+
+ 2
+ 9
+ 1
+ 0
+ 0
+ 0
+ ..\..\BSP\Src\i2c.c
+ i2c.c
+ 0
+ 0
+
+
+ 2
+ 10
+ 1
+ 0
+ 0
+ 0
+ ..\..\BSP\Src\spi.c
+ spi.c
+ 0
+ 0
+
+
+ 2
+ 11
+ 1
+ 0
+ 0
+ 0
+ ..\..\BSP\Src\stm32l4xx_it_module.c
+ stm32l4xx_it_module.c
+ 0
+ 0
+
+
+ 2
+ 12
+ 1
+ 0
+ 0
+ 0
+ ..\..\BSP\Src\tim.c
+ tim.c
+ 0
+ 0
+
+
+
+
+ examples
+ 0
+ 0
+ 0
+ 0
+
+ 3
+ 13
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\examples\qcloud_iot_explorer_sdk_ota\entry.c
+ entry.c
+ 0
+ 0
+
+
+ 3
+ 14
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\examples\qcloud_iot_explorer_sdk_ota\ota_mqtt_sample.c
+ ota_mqtt_sample.c
+ 0
+ 0
+
+
+
+
+ Drivers/STM32L4xx_HAL_Driver
+ 0
+ 0
+ 0
+ 0
+
+ 4
+ 15
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_tim.c
+ stm32l4xx_hal_tim.c
+ 0
+ 0
+
+
+ 4
+ 16
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_tim_ex.c
+ stm32l4xx_hal_tim_ex.c
+ 0
+ 0
+
+
+ 4
+ 17
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_uart.c
+ stm32l4xx_hal_uart.c
+ 0
+ 0
+
+
+ 4
+ 18
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_uart_ex.c
+ stm32l4xx_hal_uart_ex.c
+ 0
+ 0
+
+
+ 4
+ 19
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal.c
+ stm32l4xx_hal.c
+ 0
+ 0
+
+
+ 4
+ 20
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_i2c.c
+ stm32l4xx_hal_i2c.c
+ 0
+ 0
+
+
+ 4
+ 21
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_i2c_ex.c
+ stm32l4xx_hal_i2c_ex.c
+ 0
+ 0
+
+
+ 4
+ 22
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_rcc.c
+ stm32l4xx_hal_rcc.c
+ 0
+ 0
+
+
+ 4
+ 23
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_rcc_ex.c
+ stm32l4xx_hal_rcc_ex.c
+ 0
+ 0
+
+
+ 4
+ 24
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_flash.c
+ stm32l4xx_hal_flash.c
+ 0
+ 0
+
+
+ 4
+ 25
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_flash_ex.c
+ stm32l4xx_hal_flash_ex.c
+ 0
+ 0
+
+
+ 4
+ 26
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_flash_ramfunc.c
+ stm32l4xx_hal_flash_ramfunc.c
+ 0
+ 0
+
+
+ 4
+ 27
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_gpio.c
+ stm32l4xx_hal_gpio.c
+ 0
+ 0
+
+
+ 4
+ 28
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dma.c
+ stm32l4xx_hal_dma.c
+ 0
+ 0
+
+
+ 4
+ 29
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dma_ex.c
+ stm32l4xx_hal_dma_ex.c
+ 0
+ 0
+
+
+ 4
+ 30
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_pwr.c
+ stm32l4xx_hal_pwr.c
+ 0
+ 0
+
+
+ 4
+ 31
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_pwr_ex.c
+ stm32l4xx_hal_pwr_ex.c
+ 0
+ 0
+
+
+ 4
+ 32
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_cortex.c
+ stm32l4xx_hal_cortex.c
+ 0
+ 0
+
+
+ 4
+ 33
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_adc_ex.c
+ stm32l4xx_hal_adc_ex.c
+ 0
+ 0
+
+
+ 4
+ 34
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_adc.c
+ stm32l4xx_hal_adc.c
+ 0
+ 0
+
+
+ 4
+ 35
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dac.c
+ stm32l4xx_hal_dac.c
+ 0
+ 0
+
+
+ 4
+ 36
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dac_ex.c
+ stm32l4xx_hal_dac_ex.c
+ 0
+ 0
+
+
+ 4
+ 37
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_spi.c
+ stm32l4xx_hal_spi.c
+ 0
+ 0
+
+
+ 4
+ 38
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_spi_ex.c
+ stm32l4xx_hal_spi_ex.c
+ 0
+ 0
+
+
+
+
+ Drivers/CMSIS
+ 0
+ 0
+ 0
+ 0
+
+ 5
+ 39
+ 1
+ 0
+ 0
+ 0
+ ..\..\BSP\Src\system_stm32l4xx.c
+ system_stm32l4xx.c
+ 0
+ 0
+
+
+
+
+ Hardware
+ 0
+ 0
+ 0
+ 0
+
+ 6
+ 40
+ 1
+ 0
+ 0
+ 0
+ ..\..\BSP\Hardware\DHT11\DHT11_BUS.c
+ DHT11_BUS.c
+ 0
+ 0
+
+
+ 6
+ 41
+ 1
+ 0
+ 0
+ 0
+ ..\..\BSP\Hardware\OLED\oled.c
+ oled.c
+ 0
+ 0
+
+
+ 6
+ 42
+ 1
+ 0
+ 0
+ 0
+ ..\..\BSP\Hardware\BH1750\BH1750.c
+ BH1750.c
+ 0
+ 0
+
+
+
+
+ kernel
+ 0
+ 0
+ 0
+ 0
+
+ 7
+ 43
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_binary_heap.c
+ tos_binary_heap.c
+ 0
+ 0
+
+
+ 7
+ 44
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_char_fifo.c
+ tos_char_fifo.c
+ 0
+ 0
+
+
+ 7
+ 45
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_completion.c
+ tos_completion.c
+ 0
+ 0
+
+
+ 7
+ 46
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_countdownlatch.c
+ tos_countdownlatch.c
+ 0
+ 0
+
+
+ 7
+ 47
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_event.c
+ tos_event.c
+ 0
+ 0
+
+
+ 7
+ 48
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_global.c
+ tos_global.c
+ 0
+ 0
+
+
+ 7
+ 49
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_mail_queue.c
+ tos_mail_queue.c
+ 0
+ 0
+
+
+ 7
+ 50
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_message_queue.c
+ tos_message_queue.c
+ 0
+ 0
+
+
+ 7
+ 51
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_mmblk.c
+ tos_mmblk.c
+ 0
+ 0
+
+
+ 7
+ 52
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_mmheap.c
+ tos_mmheap.c
+ 0
+ 0
+
+
+ 7
+ 53
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_mutex.c
+ tos_mutex.c
+ 0
+ 0
+
+
+ 7
+ 54
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_pend.c
+ tos_pend.c
+ 0
+ 0
+
+
+ 7
+ 55
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_priority_mail_queue.c
+ tos_priority_mail_queue.c
+ 0
+ 0
+
+
+ 7
+ 56
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_priority_message_queue.c
+ tos_priority_message_queue.c
+ 0
+ 0
+
+
+ 7
+ 57
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_priority_queue.c
+ tos_priority_queue.c
+ 0
+ 0
+
+
+ 7
+ 58
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_ring_queue.c
+ tos_ring_queue.c
+ 0
+ 0
+
+
+ 7
+ 59
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_robin.c
+ tos_robin.c
+ 0
+ 0
+
+
+ 7
+ 60
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_sched.c
+ tos_sched.c
+ 0
+ 0
+
+
+ 7
+ 61
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_sem.c
+ tos_sem.c
+ 0
+ 0
+
+
+ 7
+ 62
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_sys.c
+ tos_sys.c
+ 0
+ 0
+
+
+ 7
+ 63
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_task.c
+ tos_task.c
+ 0
+ 0
+
+
+ 7
+ 64
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_tick.c
+ tos_tick.c
+ 0
+ 0
+
+
+ 7
+ 65
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_time.c
+ tos_time.c
+ 0
+ 0
+
+
+ 7
+ 66
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\kernel\core\tos_timer.c
+ tos_timer.c
+ 0
+ 0
+
+
+
+
+ cpu
+ 0
+ 0
+ 0
+ 0
+
+ 8
+ 67
+ 2
+ 0
+ 0
+ 0
+ ..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc\port_s.S
+ port_s.S
+ 0
+ 0
+
+
+ 8
+ 68
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\arch\arm\arm-v7m\common\tos_cpu.c
+ tos_cpu.c
+ 0
+ 0
+
+
+ 8
+ 69
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc\port_c.c
+ port_c.c
+ 0
+ 0
+
+
+
+
+ cmsis
+ 0
+ 0
+ 0
+ 0
+
+ 9
+ 70
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\osal\cmsis_os\cmsis_os.c
+ cmsis_os.c
+ 0
+ 0
+
+
+
+
+ module_wrapper
+ 0
+ 0
+ 0
+ 0
+
+ 10
+ 71
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\net\sal_module_wrapper\sal_module_wrapper.c
+ sal_module_wrapper.c
+ 0
+ 0
+
+
+ 10
+ 72
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\net\lora_module_wrapper\lora_module_wrapper.c
+ lora_module_wrapper.c
+ 0
+ 0
+
+
+ 10
+ 73
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\net\tencent_firmware_module_wrapper\tencent_firmware_module_wrapper.c
+ tencent_firmware_module_wrapper.c
+ 0
+ 0
+
+
+
+
+ devices
+ 0
+ 0
+ 0
+ 0
+
+ 11
+ 74
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\devices\esp8266\esp8266.c
+ esp8266.c
+ 0
+ 0
+
+
+ 11
+ 75
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\devices\rhf76_lora\RHF76.c
+ RHF76.c
+ 0
+ 0
+
+
+ 11
+ 76
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\devices\bc35_28_95\bc35_28_95.c
+ bc35_28_95.c
+ 0
+ 0
+
+
+ 11
+ 77
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\devices\esp8266_tencent_firmware\esp8266_tencent_firmware.c
+ esp8266_tencent_firmware.c
+ 0
+ 0
+
+
+ 11
+ 78
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\devices\sim800a\sim800a.c
+ sim800a.c
+ 0
+ 0
+
+
+
+
+ config
+ 0
+ 0
+ 0
+ 0
+
+ 12
+ 79
+ 5
+ 0
+ 0
+ 0
+ ..\..\TOS-CONFIG\tos_config.h
+ tos_config.h
+ 0
+ 0
+
+
+
+
+ hal
+ 0
+ 0
+ 0
+ 0
+
+ 13
+ 80
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\platform\hal\st\stm32l4xx\src\tos_hal_uart.c
+ tos_hal_uart.c
+ 0
+ 0
+
+
+
+
+ at-framwork
+ 0
+ 0
+ 0
+ 0
+
+ 14
+ 81
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\net\at\src\tos_at.c
+ tos_at.c
+ 0
+ 0
+
+
+ 14
+ 82
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\net\at\src\tos_at_utils.c
+ tos_at_utils.c
+ 0
+ 0
+
+
+
+
+ mbedtls
+ 0
+ 0
+ 0
+ 0
+
+ 15
+ 83
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\wrapper\src\entropy_hardware_alt.c
+ entropy_hardware_alt.c
+ 0
+ 0
+
+
+ 15
+ 84
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\wrapper\src\net_module_alt.c
+ net_module_alt.c
+ 0
+ 0
+
+
+ 15
+ 85
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\wrapper\src\timing_alt.c
+ timing_alt.c
+ 0
+ 0
+
+
+ 15
+ 86
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\aes.c
+ aes.c
+ 0
+ 0
+
+
+ 15
+ 87
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\aesni.c
+ aesni.c
+ 0
+ 0
+
+
+ 15
+ 88
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\arc4.c
+ arc4.c
+ 0
+ 0
+
+
+ 15
+ 89
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\aria.c
+ aria.c
+ 0
+ 0
+
+
+ 15
+ 90
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\asn1parse.c
+ asn1parse.c
+ 0
+ 0
+
+
+ 15
+ 91
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\asn1write.c
+ asn1write.c
+ 0
+ 0
+
+
+ 15
+ 92
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\base64.c
+ base64.c
+ 0
+ 0
+
+
+ 15
+ 93
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\bignum.c
+ bignum.c
+ 0
+ 0
+
+
+ 15
+ 94
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\blowfish.c
+ blowfish.c
+ 0
+ 0
+
+
+ 15
+ 95
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\camellia.c
+ camellia.c
+ 0
+ 0
+
+
+ 15
+ 96
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ccm.c
+ ccm.c
+ 0
+ 0
+
+
+ 15
+ 97
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\certs.c
+ certs.c
+ 0
+ 0
+
+
+ 15
+ 98
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\chacha20.c
+ chacha20.c
+ 0
+ 0
+
+
+ 15
+ 99
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\chachapoly.c
+ chachapoly.c
+ 0
+ 0
+
+
+ 15
+ 100
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\cipher.c
+ cipher.c
+ 0
+ 0
+
+
+ 15
+ 101
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\cipher_wrap.c
+ cipher_wrap.c
+ 0
+ 0
+
+
+ 15
+ 102
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\cmac.c
+ cmac.c
+ 0
+ 0
+
+
+ 15
+ 103
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ctr_drbg.c
+ ctr_drbg.c
+ 0
+ 0
+
+
+ 15
+ 104
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\debug.c
+ debug.c
+ 0
+ 0
+
+
+ 15
+ 105
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\des.c
+ des.c
+ 0
+ 0
+
+
+ 15
+ 106
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\dhm.c
+ dhm.c
+ 0
+ 0
+
+
+ 15
+ 107
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ecdh.c
+ ecdh.c
+ 0
+ 0
+
+
+ 15
+ 108
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ecdsa.c
+ ecdsa.c
+ 0
+ 0
+
+
+ 15
+ 109
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ecjpake.c
+ ecjpake.c
+ 0
+ 0
+
+
+ 15
+ 110
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ecp.c
+ ecp.c
+ 0
+ 0
+
+
+ 15
+ 111
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ecp_curves.c
+ ecp_curves.c
+ 0
+ 0
+
+
+ 15
+ 112
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\entropy.c
+ entropy.c
+ 0
+ 0
+
+
+ 15
+ 113
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\entropy_poll.c
+ entropy_poll.c
+ 0
+ 0
+
+
+ 15
+ 114
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\error.c
+ error.c
+ 0
+ 0
+
+
+ 15
+ 115
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\gcm.c
+ gcm.c
+ 0
+ 0
+
+
+ 15
+ 116
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\havege.c
+ havege.c
+ 0
+ 0
+
+
+ 15
+ 117
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\hkdf.c
+ hkdf.c
+ 0
+ 0
+
+
+ 15
+ 118
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\hmac_drbg.c
+ hmac_drbg.c
+ 0
+ 0
+
+
+ 15
+ 119
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\md.c
+ md.c
+ 0
+ 0
+
+
+ 15
+ 120
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\md_wrap.c
+ md_wrap.c
+ 0
+ 0
+
+
+ 15
+ 121
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\md2.c
+ md2.c
+ 0
+ 0
+
+
+ 15
+ 122
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\md4.c
+ md4.c
+ 0
+ 0
+
+
+ 15
+ 123
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\md5.c
+ md5.c
+ 0
+ 0
+
+
+ 15
+ 124
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\memory_buffer_alloc.c
+ memory_buffer_alloc.c
+ 0
+ 0
+
+
+ 15
+ 125
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\net_sockets.c
+ net_sockets.c
+ 0
+ 0
+
+
+ 15
+ 126
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\nist_kw.c
+ nist_kw.c
+ 0
+ 0
+
+
+ 15
+ 127
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\oid.c
+ oid.c
+ 0
+ 0
+
+
+ 15
+ 128
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\padlock.c
+ padlock.c
+ 0
+ 0
+
+
+ 15
+ 129
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\pem.c
+ pem.c
+ 0
+ 0
+
+
+ 15
+ 130
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\pk.c
+ pk.c
+ 0
+ 0
+
+
+ 15
+ 131
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\pk_wrap.c
+ pk_wrap.c
+ 0
+ 0
+
+
+ 15
+ 132
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\pkcs5.c
+ pkcs5.c
+ 0
+ 0
+
+
+ 15
+ 133
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\pkcs11.c
+ pkcs11.c
+ 0
+ 0
+
+
+ 15
+ 134
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\pkcs12.c
+ pkcs12.c
+ 0
+ 0
+
+
+ 15
+ 135
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\pkparse.c
+ pkparse.c
+ 0
+ 0
+
+
+ 15
+ 136
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\pkwrite.c
+ pkwrite.c
+ 0
+ 0
+
+
+ 15
+ 137
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\platform.c
+ platform.c
+ 0
+ 0
+
+
+ 15
+ 138
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\platform_util.c
+ platform_util.c
+ 0
+ 0
+
+
+ 15
+ 139
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\poly1305.c
+ poly1305.c
+ 0
+ 0
+
+
+ 15
+ 140
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ripemd160.c
+ ripemd160.c
+ 0
+ 0
+
+
+ 15
+ 141
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\rsa.c
+ rsa.c
+ 0
+ 0
+
+
+ 15
+ 142
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\rsa_internal.c
+ rsa_internal.c
+ 0
+ 0
+
+
+ 15
+ 143
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\sha1.c
+ sha1.c
+ 0
+ 0
+
+
+ 15
+ 144
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\sha256.c
+ sha256.c
+ 0
+ 0
+
+
+ 15
+ 145
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\sha512.c
+ sha512.c
+ 0
+ 0
+
+
+ 15
+ 146
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ssl_cache.c
+ ssl_cache.c
+ 0
+ 0
+
+
+ 15
+ 147
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ssl_ciphersuites.c
+ ssl_ciphersuites.c
+ 0
+ 0
+
+
+ 15
+ 148
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ssl_cli.c
+ ssl_cli.c
+ 0
+ 0
+
+
+ 15
+ 149
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ssl_cookie.c
+ ssl_cookie.c
+ 0
+ 0
+
+
+ 15
+ 150
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ssl_srv.c
+ ssl_srv.c
+ 0
+ 0
+
+
+ 15
+ 151
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ssl_ticket.c
+ ssl_ticket.c
+ 0
+ 0
+
+
+ 15
+ 152
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ssl_tls.c
+ ssl_tls.c
+ 0
+ 0
+
+
+ 15
+ 153
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\threading.c
+ threading.c
+ 0
+ 0
+
+
+ 15
+ 154
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\timing.c
+ timing.c
+ 0
+ 0
+
+
+ 15
+ 155
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\version.c
+ version.c
+ 0
+ 0
+
+
+ 15
+ 156
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\version_features.c
+ version_features.c
+ 0
+ 0
+
+
+ 15
+ 157
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\x509.c
+ x509.c
+ 0
+ 0
+
+
+ 15
+ 158
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\x509_create.c
+ x509_create.c
+ 0
+ 0
+
+
+ 15
+ 159
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\x509_crl.c
+ x509_crl.c
+ 0
+ 0
+
+
+ 15
+ 160
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\x509_crt.c
+ x509_crt.c
+ 0
+ 0
+
+
+ 15
+ 161
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\x509_csr.c
+ x509_csr.c
+ 0
+ 0
+
+
+ 15
+ 162
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\x509write_crt.c
+ x509write_crt.c
+ 0
+ 0
+
+
+ 15
+ 163
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\x509write_csr.c
+ x509write_csr.c
+ 0
+ 0
+
+
+ 15
+ 164
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\xtea.c
+ xtea.c
+ 0
+ 0
+
+
+
+
+ qcloud/port
+ 0
+ 0
+ 0
+ 0
+
+ 16
+ 165
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\port\TencentOS_tiny\HAL_AT_UART_tencentos_tiny.c
+ HAL_AT_UART_tencentos_tiny.c
+ 0
+ 0
+
+
+ 16
+ 166
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\port\TencentOS_tiny\HAL_Device_tencentos_tiny.c
+ HAL_Device_tencentos_tiny.c
+ 0
+ 0
+
+
+ 16
+ 167
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\port\TencentOS_tiny\HAL_OS_tencentos_tiny.c
+ HAL_OS_tencentos_tiny.c
+ 0
+ 0
+
+
+ 16
+ 168
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\port\TencentOS_tiny\HAL_TCP_module.c
+ HAL_TCP_module.c
+ 0
+ 0
+
+
+ 16
+ 169
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\port\TencentOS_tiny\HAL_Timer_tencentos_tiny.c
+ HAL_Timer_tencentos_tiny.c
+ 0
+ 0
+
+
+ 16
+ 170
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\port\TencentOS_tiny\HAL_UDP_module.c
+ HAL_UDP_module.c
+ 0
+ 0
+
+
+
+
+ qcloud/protocol/mqtt
+ 0
+ 0
+ 0
+ 0
+
+ 17
+ 171
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\protocol\mqtt\mqtt_client.c
+ mqtt_client.c
+ 0
+ 0
+
+
+ 17
+ 172
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\protocol\mqtt\mqtt_client_common.c
+ mqtt_client_common.c
+ 0
+ 0
+
+
+ 17
+ 173
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\protocol\mqtt\mqtt_client_connect.c
+ mqtt_client_connect.c
+ 0
+ 0
+
+
+ 17
+ 174
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\protocol\mqtt\mqtt_client_net.c
+ mqtt_client_net.c
+ 0
+ 0
+
+
+ 17
+ 175
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\protocol\mqtt\mqtt_client_publish.c
+ mqtt_client_publish.c
+ 0
+ 0
+
+
+ 17
+ 176
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\protocol\mqtt\mqtt_client_subscribe.c
+ mqtt_client_subscribe.c
+ 0
+ 0
+
+
+ 17
+ 177
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\protocol\mqtt\mqtt_client_unsubscribe.c
+ mqtt_client_unsubscribe.c
+ 0
+ 0
+
+
+ 17
+ 178
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\protocol\mqtt\mqtt_client_yield.c
+ mqtt_client_yield.c
+ 0
+ 0
+
+
+
+
+ qcloud/utils
+ 0
+ 0
+ 0
+ 0
+
+ 18
+ 179
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\json_parser.c
+ json_parser.c
+ 0
+ 0
+
+
+ 18
+ 180
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\json_token.c
+ json_token.c
+ 0
+ 0
+
+
+ 18
+ 181
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\qcloud_iot_log.c
+ qcloud_iot_log.c
+ 0
+ 0
+
+
+ 18
+ 182
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\string_utils.c
+ string_utils.c
+ 0
+ 0
+
+
+ 18
+ 183
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\utils_aes.c
+ utils_aes.c
+ 0
+ 0
+
+
+ 18
+ 184
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\utils_base64.c
+ utils_base64.c
+ 0
+ 0
+
+
+ 18
+ 185
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\utils_getopt.c
+ utils_getopt.c
+ 0
+ 0
+
+
+ 18
+ 186
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\utils_hmac.c
+ utils_hmac.c
+ 0
+ 0
+
+
+ 18
+ 187
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\utils_list.c
+ utils_list.c
+ 0
+ 0
+
+
+ 18
+ 188
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\utils_md5.c
+ utils_md5.c
+ 0
+ 0
+
+
+ 18
+ 189
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\utils_ringbuff.c
+ utils_ringbuff.c
+ 0
+ 0
+
+
+ 18
+ 190
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\utils_sha1.c
+ utils_sha1.c
+ 0
+ 0
+
+
+ 18
+ 191
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\utils_timer.c
+ utils_timer.c
+ 0
+ 0
+
+
+ 18
+ 192
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\qcloud_iot_ca.c
+ qcloud_iot_ca.c
+ 0
+ 0
+
+
+ 18
+ 193
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\qcloud_iot_device.c
+ qcloud_iot_device.c
+ 0
+ 0
+
+
+
+
+ qcloud/network
+ 0
+ 0
+ 0
+ 0
+
+ 19
+ 194
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\network\network_interface.c
+ network_interface.c
+ 0
+ 0
+
+
+ 19
+ 195
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\network\socket\network_socket.c
+ network_socket.c
+ 0
+ 0
+
+
+ 19
+ 196
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\network\tls\network_tls.c
+ network_tls.c
+ 0
+ 0
+
+
+ 19
+ 197
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\platform\tls\mbedtls\HAL_DTLS_mbedtls.c
+ HAL_DTLS_mbedtls.c
+ 0
+ 0
+
+
+ 19
+ 198
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\platform\tls\mbedtls\HAL_TLS_mbedtls.c
+ HAL_TLS_mbedtls.c
+ 0
+ 0
+
+
+
+
+ qcloud/services/ota
+ 0
+ 0
+ 0
+ 0
+
+ 20
+ 199
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\services\ota\ota_client.c
+ ota_client.c
+ 0
+ 0
+
+
+ 20
+ 200
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\services\ota\ota_fetch.c
+ ota_fetch.c
+ 0
+ 0
+
+
+ 20
+ 201
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\services\ota\ota_lib.c
+ ota_lib.c
+ 0
+ 0
+
+
+ 20
+ 202
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\services\ota\ota_mqtt.c
+ ota_mqtt.c
+ 0
+ 0
+
+
+
+
+ qcloud/protocol/http
+ 0
+ 0
+ 0
+ 0
+
+ 21
+ 203
+ 1
+ 0
+ 0
+ 0
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\protocol\http\utils_httpc.c
+ utils_httpc.c
+ 0
+ 0
+
+
+
+
+ ::CMSIS
+ 0
+ 0
+ 0
+ 1
+
+
+
diff --git a/board/TencentOS_tiny_EVB_MX_Plus/KEIL/qcloud_iot_explorer_sdk_ota/TencentOS_tiny.uvprojx b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/qcloud_iot_explorer_sdk_ota/TencentOS_tiny.uvprojx
new file mode 100644
index 00000000..4ab9a3cc
--- /dev/null
+++ b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/qcloud_iot_explorer_sdk_ota/TencentOS_tiny.uvprojx
@@ -0,0 +1,1522 @@
+
+
+
+ 2.1
+
+ ### uVision Project, (C) Keil Software
+
+
+
+ TencentOS_tiny
+ 0x4
+ ARM-ADS
+ 5060750::V5.06 update 6 (build 750)::ARMCC
+ 0
+
+
+ STM32L431RCTx
+ STMicroelectronics
+ Keil.STM32L4xx_DFP.2.0.0
+ http://www.keil.com/pack
+ IRAM(0x20000000-0x2000FFFF) IROM(0x8000000-0x803FFFF) CLOCK(8000000) FPU2 CPUTYPE("Cortex-M4")
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ $$Device:STM32L431RCTx$CMSIS\SVD\STM32L4x1.svd
+ 0
+ 0
+
+
+
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 1
+
+ .\obj\
+ TencentOS_tiny
+ 1
+ 0
+ 1
+ 1
+ 0
+ .\list\
+ 1
+ 0
+ 0
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+
+ 0
+ 0
+
+
+ 0
+ 0
+ 0
+ 0
+
+ 0
+
+
+
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 3
+
+
+ 0
+
+
+ SARMCM3.DLL
+ -REMAP -MPU
+ DCM.DLL
+ -pCM4
+ SARMCM3.DLL
+ -MPU
+ TCM.DLL
+ -pCM4
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 16
+
+
+
+
+ 1
+ 0
+ 0
+ 1
+ 1
+ 4107
+
+ 1
+ STLink\ST-LINKIII-KEIL_SWO.dll
+
+
+
+
+
+ 0
+
+
+
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 1
+ 1
+ 0
+ 1
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+ "Cortex-M4"
+
+ 0
+ 0
+ 0
+ 1
+ 1
+ 0
+ 0
+ 2
+ 0
+ 0
+ 0
+ 8
+ 1
+ 0
+ 0
+ 0
+ 3
+ 3
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 1
+ 0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x20000000
+ 0x10000
+
+
+ 1
+ 0x8000000
+ 0x40000
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 1
+ 0x0
+ 0x0
+
+
+ 1
+ 0x0
+ 0x0
+
+
+ 1
+ 0x0
+ 0x0
+
+
+ 1
+ 0x8000000
+ 0x40000
+
+
+ 1
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x0
+ 0x0
+
+
+ 0
+ 0x20000000
+ 0x10000
+
+
+ 0
+ 0x0
+ 0x0
+
+
+
+
+
+ 1
+ 1
+ 0
+ 0
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 2
+ 0
+ 0
+ 1
+ 0
+ 0
+ 1
+ 1
+ 1
+ 1
+ 0
+ 0
+ 0
+
+
+ USE_HAL_DRIVER,STM32L431xx,MBEDTLS_CONFIG_FILE=<qcloud/tls_psk_config.h>
+
+ ..\..\BSP\Inc;..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Inc;..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Legacy;..\..\..\..\platform\vendor_bsp\st\CMSIS\Device\ST\STM32L4xx\Include;..\..\..\..\platform\vendor_bsp\st\CMSIS\Include;..\..\..\..\kernel\core\include;..\..\..\..\platform\arch\arm\cortex-m4\keil;..\..\..\..\kernel\pm\include;..\..\..\..\kernel\hal\include;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc;..\..\..\..\osal\cmsis_os;..\..\..\..\devices\esp8266;..\..\..\..\devices\rhf76_lora;..\..\..\..\devices\esp8266_tencent_firmware;..\..\..\..\devices\bc35_28_95;..\..\BSP\Hardware\DHT11;..\..\BSP\Hardware\OLED;..\..\BSP\Hardware\BH1750;..\..\TOS-CONFIG;..\..\..\..\examples\helloworld;..\..\..\..\components\security\mbedtls\3rdparty\include;..\..\..\..\components\security\mbedtls\wrapper\include;..\..\..\..\net\at\include;..\..\..\..\net\sal_module_wrapper;..\..\..\..\net\lora_module_wrapper;..\..\..\..\net\tencent_firmware_module_wrapper;..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\include;..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\include\exports;..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\internal_inc
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+ 0
+
+
+
+
+
+
+
+
+ 1
+ 0
+ 0
+ 0
+ 1
+ 0
+ 0x08000000
+ 0x20000000
+
+
+
+
+
+
+
+
+
+
+
+
+ Application/MDK-ARM
+
+
+ startup_stm32l431xx.s
+ 2
+ startup_stm32l431xx.s
+
+
+
+
+ Application/User
+
+
+ gpio.c
+ 1
+ ..\..\BSP\Src\gpio.c
+
+
+ main.c
+ 1
+ ..\..\BSP\Src\main.c
+
+
+ mcu_init.c
+ 1
+ ..\..\BSP\Src\mcu_init.c
+
+
+ stm32l4xx_hal_msp.c
+ 1
+ ..\..\BSP\Src\stm32l4xx_hal_msp.c
+
+
+ usart.c
+ 1
+ ..\..\BSP\Src\usart.c
+
+
+ adc.c
+ 1
+ ..\..\BSP\Src\adc.c
+
+
+ dac.c
+ 1
+ ..\..\BSP\Src\dac.c
+
+
+ i2c.c
+ 1
+ ..\..\BSP\Src\i2c.c
+
+
+ spi.c
+ 1
+ ..\..\BSP\Src\spi.c
+
+
+ stm32l4xx_it_module.c
+ 1
+ ..\..\BSP\Src\stm32l4xx_it_module.c
+
+
+ tim.c
+ 1
+ ..\..\BSP\Src\tim.c
+
+
+
+
+ examples
+
+
+ entry.c
+ 1
+ ..\..\..\..\examples\qcloud_iot_explorer_sdk_ota\entry.c
+
+
+ ota_mqtt_sample.c
+ 1
+ ..\..\..\..\examples\qcloud_iot_explorer_sdk_ota\ota_mqtt_sample.c
+
+
+
+
+ Drivers/STM32L4xx_HAL_Driver
+
+
+ stm32l4xx_hal_tim.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_tim.c
+
+
+ stm32l4xx_hal_tim_ex.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_tim_ex.c
+
+
+ stm32l4xx_hal_uart.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_uart.c
+
+
+ stm32l4xx_hal_uart_ex.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_uart_ex.c
+
+
+ stm32l4xx_hal.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal.c
+
+
+ stm32l4xx_hal_i2c.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_i2c.c
+
+
+ stm32l4xx_hal_i2c_ex.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_i2c_ex.c
+
+
+ stm32l4xx_hal_rcc.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_rcc.c
+
+
+ stm32l4xx_hal_rcc_ex.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_rcc_ex.c
+
+
+ stm32l4xx_hal_flash.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_flash.c
+
+
+ stm32l4xx_hal_flash_ex.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_flash_ex.c
+
+
+ stm32l4xx_hal_flash_ramfunc.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_flash_ramfunc.c
+
+
+ stm32l4xx_hal_gpio.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_gpio.c
+
+
+ stm32l4xx_hal_dma.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dma.c
+
+
+ stm32l4xx_hal_dma_ex.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dma_ex.c
+
+
+ stm32l4xx_hal_pwr.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_pwr.c
+
+
+ stm32l4xx_hal_pwr_ex.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_pwr_ex.c
+
+
+ stm32l4xx_hal_cortex.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_cortex.c
+
+
+ stm32l4xx_hal_adc_ex.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_adc_ex.c
+
+
+ stm32l4xx_hal_adc.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_adc.c
+
+
+ stm32l4xx_hal_dac.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dac.c
+
+
+ stm32l4xx_hal_dac_ex.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dac_ex.c
+
+
+ stm32l4xx_hal_spi.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_spi.c
+
+
+ stm32l4xx_hal_spi_ex.c
+ 1
+ ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_spi_ex.c
+
+
+
+
+ Drivers/CMSIS
+
+
+ system_stm32l4xx.c
+ 1
+ ..\..\BSP\Src\system_stm32l4xx.c
+
+
+
+
+ Hardware
+
+
+ DHT11_BUS.c
+ 1
+ ..\..\BSP\Hardware\DHT11\DHT11_BUS.c
+
+
+ oled.c
+ 1
+ ..\..\BSP\Hardware\OLED\oled.c
+
+
+ BH1750.c
+ 1
+ ..\..\BSP\Hardware\BH1750\BH1750.c
+
+
+
+
+ kernel
+
+
+ tos_binary_heap.c
+ 1
+ ..\..\..\..\kernel\core\tos_binary_heap.c
+
+
+ tos_char_fifo.c
+ 1
+ ..\..\..\..\kernel\core\tos_char_fifo.c
+
+
+ tos_completion.c
+ 1
+ ..\..\..\..\kernel\core\tos_completion.c
+
+
+ tos_countdownlatch.c
+ 1
+ ..\..\..\..\kernel\core\tos_countdownlatch.c
+
+
+ tos_event.c
+ 1
+ ..\..\..\..\kernel\core\tos_event.c
+
+
+ tos_global.c
+ 1
+ ..\..\..\..\kernel\core\tos_global.c
+
+
+ tos_mail_queue.c
+ 1
+ ..\..\..\..\kernel\core\tos_mail_queue.c
+
+
+ tos_message_queue.c
+ 1
+ ..\..\..\..\kernel\core\tos_message_queue.c
+
+
+ tos_mmblk.c
+ 1
+ ..\..\..\..\kernel\core\tos_mmblk.c
+
+
+ tos_mmheap.c
+ 1
+ ..\..\..\..\kernel\core\tos_mmheap.c
+
+
+ tos_mutex.c
+ 1
+ ..\..\..\..\kernel\core\tos_mutex.c
+
+
+ tos_pend.c
+ 1
+ ..\..\..\..\kernel\core\tos_pend.c
+
+
+ tos_priority_mail_queue.c
+ 1
+ ..\..\..\..\kernel\core\tos_priority_mail_queue.c
+
+
+ tos_priority_message_queue.c
+ 1
+ ..\..\..\..\kernel\core\tos_priority_message_queue.c
+
+
+ tos_priority_queue.c
+ 1
+ ..\..\..\..\kernel\core\tos_priority_queue.c
+
+
+ tos_ring_queue.c
+ 1
+ ..\..\..\..\kernel\core\tos_ring_queue.c
+
+
+ tos_robin.c
+ 1
+ ..\..\..\..\kernel\core\tos_robin.c
+
+
+ tos_sched.c
+ 1
+ ..\..\..\..\kernel\core\tos_sched.c
+
+
+ tos_sem.c
+ 1
+ ..\..\..\..\kernel\core\tos_sem.c
+
+
+ tos_sys.c
+ 1
+ ..\..\..\..\kernel\core\tos_sys.c
+
+
+ tos_task.c
+ 1
+ ..\..\..\..\kernel\core\tos_task.c
+
+
+ tos_tick.c
+ 1
+ ..\..\..\..\kernel\core\tos_tick.c
+
+
+ tos_time.c
+ 1
+ ..\..\..\..\kernel\core\tos_time.c
+
+
+ tos_timer.c
+ 1
+ ..\..\..\..\kernel\core\tos_timer.c
+
+
+
+
+ cpu
+
+
+ port_s.S
+ 2
+ ..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc\port_s.S
+
+
+ tos_cpu.c
+ 1
+ ..\..\..\..\arch\arm\arm-v7m\common\tos_cpu.c
+
+
+ port_c.c
+ 1
+ ..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc\port_c.c
+
+
+
+
+ cmsis
+
+
+ cmsis_os.c
+ 1
+ ..\..\..\..\osal\cmsis_os\cmsis_os.c
+
+
+
+
+ module_wrapper
+
+
+ sal_module_wrapper.c
+ 1
+ ..\..\..\..\net\sal_module_wrapper\sal_module_wrapper.c
+
+
+ lora_module_wrapper.c
+ 1
+ ..\..\..\..\net\lora_module_wrapper\lora_module_wrapper.c
+
+
+ tencent_firmware_module_wrapper.c
+ 1
+ ..\..\..\..\net\tencent_firmware_module_wrapper\tencent_firmware_module_wrapper.c
+
+
+
+
+ devices
+
+
+ esp8266.c
+ 1
+ ..\..\..\..\devices\esp8266\esp8266.c
+
+
+ RHF76.c
+ 1
+ ..\..\..\..\devices\rhf76_lora\RHF76.c
+
+
+ bc35_28_95.c
+ 1
+ ..\..\..\..\devices\bc35_28_95\bc35_28_95.c
+
+
+ esp8266_tencent_firmware.c
+ 1
+ ..\..\..\..\devices\esp8266_tencent_firmware\esp8266_tencent_firmware.c
+
+
+ sim800a.c
+ 1
+ ..\..\..\..\devices\sim800a\sim800a.c
+
+
+
+
+ config
+
+
+ tos_config.h
+ 5
+ ..\..\TOS-CONFIG\tos_config.h
+
+
+
+
+ hal
+
+
+ tos_hal_uart.c
+ 1
+ ..\..\..\..\platform\hal\st\stm32l4xx\src\tos_hal_uart.c
+
+
+
+
+ at-framwork
+
+
+ tos_at.c
+ 1
+ ..\..\..\..\net\at\src\tos_at.c
+
+
+ tos_at_utils.c
+ 1
+ ..\..\..\..\net\at\src\tos_at_utils.c
+
+
+
+
+ mbedtls
+
+
+ entropy_hardware_alt.c
+ 1
+ ..\..\..\..\components\security\mbedtls\wrapper\src\entropy_hardware_alt.c
+
+
+ net_module_alt.c
+ 1
+ ..\..\..\..\components\security\mbedtls\wrapper\src\net_module_alt.c
+
+
+ timing_alt.c
+ 1
+ ..\..\..\..\components\security\mbedtls\wrapper\src\timing_alt.c
+
+
+ aes.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\aes.c
+
+
+ aesni.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\aesni.c
+
+
+ arc4.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\arc4.c
+
+
+ aria.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\aria.c
+
+
+ asn1parse.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\asn1parse.c
+
+
+ asn1write.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\asn1write.c
+
+
+ base64.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\base64.c
+
+
+ bignum.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\bignum.c
+
+
+ blowfish.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\blowfish.c
+
+
+ camellia.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\camellia.c
+
+
+ ccm.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ccm.c
+
+
+ certs.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\certs.c
+
+
+ chacha20.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\chacha20.c
+
+
+ chachapoly.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\chachapoly.c
+
+
+ cipher.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\cipher.c
+
+
+ cipher_wrap.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\cipher_wrap.c
+
+
+ cmac.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\cmac.c
+
+
+ ctr_drbg.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ctr_drbg.c
+
+
+ debug.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\debug.c
+
+
+ des.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\des.c
+
+
+ dhm.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\dhm.c
+
+
+ ecdh.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ecdh.c
+
+
+ ecdsa.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ecdsa.c
+
+
+ ecjpake.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ecjpake.c
+
+
+ ecp.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ecp.c
+
+
+ ecp_curves.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ecp_curves.c
+
+
+ entropy.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\entropy.c
+
+
+ entropy_poll.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\entropy_poll.c
+
+
+ error.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\error.c
+
+
+ gcm.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\gcm.c
+
+
+ havege.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\havege.c
+
+
+ hkdf.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\hkdf.c
+
+
+ hmac_drbg.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\hmac_drbg.c
+
+
+ md.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\md.c
+
+
+ md_wrap.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\md_wrap.c
+
+
+ md2.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\md2.c
+
+
+ md4.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\md4.c
+
+
+ md5.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\md5.c
+
+
+ memory_buffer_alloc.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\memory_buffer_alloc.c
+
+
+ net_sockets.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\net_sockets.c
+
+
+ nist_kw.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\nist_kw.c
+
+
+ oid.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\oid.c
+
+
+ padlock.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\padlock.c
+
+
+ pem.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\pem.c
+
+
+ pk.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\pk.c
+
+
+ pk_wrap.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\pk_wrap.c
+
+
+ pkcs5.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\pkcs5.c
+
+
+ pkcs11.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\pkcs11.c
+
+
+ pkcs12.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\pkcs12.c
+
+
+ pkparse.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\pkparse.c
+
+
+ pkwrite.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\pkwrite.c
+
+
+ platform.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\platform.c
+
+
+ platform_util.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\platform_util.c
+
+
+ poly1305.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\poly1305.c
+
+
+ ripemd160.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ripemd160.c
+
+
+ rsa.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\rsa.c
+
+
+ rsa_internal.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\rsa_internal.c
+
+
+ sha1.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\sha1.c
+
+
+ sha256.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\sha256.c
+
+
+ sha512.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\sha512.c
+
+
+ ssl_cache.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ssl_cache.c
+
+
+ ssl_ciphersuites.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ssl_ciphersuites.c
+
+
+ ssl_cli.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ssl_cli.c
+
+
+ ssl_cookie.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ssl_cookie.c
+
+
+ ssl_srv.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ssl_srv.c
+
+
+ ssl_ticket.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ssl_ticket.c
+
+
+ ssl_tls.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\ssl_tls.c
+
+
+ threading.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\threading.c
+
+
+ timing.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\timing.c
+
+
+ version.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\version.c
+
+
+ version_features.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\version_features.c
+
+
+ x509.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\x509.c
+
+
+ x509_create.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\x509_create.c
+
+
+ x509_crl.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\x509_crl.c
+
+
+ x509_crt.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\x509_crt.c
+
+
+ x509_csr.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\x509_csr.c
+
+
+ x509write_crt.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\x509write_crt.c
+
+
+ x509write_csr.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\x509write_csr.c
+
+
+ xtea.c
+ 1
+ ..\..\..\..\components\security\mbedtls\3rdparty\src\xtea.c
+
+
+
+
+ qcloud/port
+
+
+ HAL_AT_UART_tencentos_tiny.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\port\TencentOS_tiny\HAL_AT_UART_tencentos_tiny.c
+
+
+ HAL_Device_tencentos_tiny.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\port\TencentOS_tiny\HAL_Device_tencentos_tiny.c
+
+
+ HAL_OS_tencentos_tiny.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\port\TencentOS_tiny\HAL_OS_tencentos_tiny.c
+
+
+ HAL_TCP_module.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\port\TencentOS_tiny\HAL_TCP_module.c
+
+
+ HAL_Timer_tencentos_tiny.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\port\TencentOS_tiny\HAL_Timer_tencentos_tiny.c
+
+
+ HAL_UDP_module.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\port\TencentOS_tiny\HAL_UDP_module.c
+
+
+
+
+ qcloud/protocol/mqtt
+
+
+ mqtt_client.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\protocol\mqtt\mqtt_client.c
+
+
+ mqtt_client_common.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\protocol\mqtt\mqtt_client_common.c
+
+
+ mqtt_client_connect.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\protocol\mqtt\mqtt_client_connect.c
+
+
+ mqtt_client_net.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\protocol\mqtt\mqtt_client_net.c
+
+
+ mqtt_client_publish.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\protocol\mqtt\mqtt_client_publish.c
+
+
+ mqtt_client_subscribe.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\protocol\mqtt\mqtt_client_subscribe.c
+
+
+ mqtt_client_unsubscribe.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\protocol\mqtt\mqtt_client_unsubscribe.c
+
+
+ mqtt_client_yield.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\protocol\mqtt\mqtt_client_yield.c
+
+
+
+
+ qcloud/utils
+
+
+ json_parser.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\json_parser.c
+
+
+ json_token.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\json_token.c
+
+
+ qcloud_iot_log.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\qcloud_iot_log.c
+
+
+ string_utils.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\string_utils.c
+
+
+ utils_aes.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\utils_aes.c
+
+
+ utils_base64.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\utils_base64.c
+
+
+ utils_getopt.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\utils_getopt.c
+
+
+ utils_hmac.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\utils_hmac.c
+
+
+ utils_list.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\utils_list.c
+
+
+ utils_md5.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\utils_md5.c
+
+
+ utils_ringbuff.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\utils_ringbuff.c
+
+
+ utils_sha1.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\utils_sha1.c
+
+
+ utils_timer.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\utils_timer.c
+
+
+ qcloud_iot_ca.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\qcloud_iot_ca.c
+
+
+ qcloud_iot_device.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\utils\qcloud_iot_device.c
+
+
+
+
+ qcloud/network
+
+
+ network_interface.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\network\network_interface.c
+
+
+ network_socket.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\network\socket\network_socket.c
+
+
+ network_tls.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\network\tls\network_tls.c
+
+
+ HAL_DTLS_mbedtls.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\platform\tls\mbedtls\HAL_DTLS_mbedtls.c
+
+
+ HAL_TLS_mbedtls.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\platform\tls\mbedtls\HAL_TLS_mbedtls.c
+
+
+
+
+ qcloud/services/ota
+
+
+ ota_client.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\services\ota\ota_client.c
+
+
+ ota_fetch.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\services\ota\ota_fetch.c
+
+
+ ota_lib.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\services\ota\ota_lib.c
+
+
+ ota_mqtt.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\services\ota\ota_mqtt.c
+
+
+
+
+ qcloud/protocol/http
+
+
+ utils_httpc.c
+ 1
+ ..\..\..\..\components\connectivity\qcloud-iot-explorer-sdk\3rdparty\sdk_src\protocol\http\utils_httpc.c
+
+
+
+
+ ::CMSIS
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/board/TencentOS_tiny_EVB_MX_Plus/KEIL/qcloud_iot_explorer_sdk_ota/startup_stm32l431xx.s b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/qcloud_iot_explorer_sdk_ota/startup_stm32l431xx.s
new file mode 100644
index 00000000..6a5c15a5
--- /dev/null
+++ b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/qcloud_iot_explorer_sdk_ota/startup_stm32l431xx.s
@@ -0,0 +1,404 @@
+;********************** COPYRIGHT(c) 2017 STMicroelectronics ******************
+;* File Name : startup_stm32l431xx.s
+;* Author : MCD Application Team
+;* Description : STM32L431xx Ultra Low Power devices vector table for MDK-ARM toolchain.
+;* This module performs:
+;* - Set the initial SP
+;* - Set the initial PC == Reset_Handler
+;* - Set the vector table entries with the exceptions ISR address
+;* - Branches to __main in the C library (which eventually
+;* calls main()).
+;* After Reset the Cortex-M4 processor is in Thread mode,
+;* priority is Privileged, and the Stack is set to Main.
+;* <<< Use Configuration Wizard in Context Menu >>>
+;*******************************************************************************
+;*
+;* Redistribution and use in source and binary forms, with or without modification,
+;* are permitted provided that the following conditions are met:
+;* 1. Redistributions of source code must retain the above copyright notice,
+;* this list of conditions and the following disclaimer.
+;* 2. Redistributions in binary form must reproduce the above copyright notice,
+;* this list of conditions and the following disclaimer in the documentation
+;* and/or other materials provided with the distribution.
+;* 3. Neither the name of STMicroelectronics nor the names of its contributors
+;* may be used to endorse or promote products derived from this software
+;* without specific prior written permission.
+;*
+;* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
+;* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
+;* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
+;* DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
+;* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
+;* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
+;* SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
+;* CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
+;* OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
+;* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
+;*
+;*******************************************************************************
+;
+; Amount of memory (in bytes) allocated for Stack
+; Tailor this value to your application needs
+; Stack Configuration
+; Stack Size (in Bytes) <0x0-0xFFFFFFFF:8>
+;
+
+Stack_Size EQU 0x100
+
+ AREA STACK, NOINIT, READWRITE, ALIGN=3
+Stack_Mem SPACE Stack_Size
+__initial_sp
+
+
+; Heap Configuration
+; Heap Size (in Bytes) <0x0-0xFFFFFFFF:8>
+;
+
+Heap_Size EQU 0x100
+
+ AREA HEAP, NOINIT, READWRITE, ALIGN=3
+__heap_base
+Heap_Mem SPACE Heap_Size
+__heap_limit
+
+ PRESERVE8
+ THUMB
+
+
+; Vector Table Mapped to Address 0 at Reset
+ AREA RESET, DATA, READONLY
+ EXPORT __Vectors
+ EXPORT __Vectors_End
+ EXPORT __Vectors_Size
+
+__Vectors DCD __initial_sp ; Top of Stack
+ DCD Reset_Handler ; Reset Handler
+ DCD NMI_Handler ; NMI Handler
+ DCD HardFault_Handler ; Hard Fault Handler
+ DCD MemManage_Handler ; MPU Fault Handler
+ DCD BusFault_Handler ; Bus Fault Handler
+ DCD UsageFault_Handler ; Usage Fault Handler
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD SVC_Handler ; SVCall Handler
+ DCD DebugMon_Handler ; Debug Monitor Handler
+ DCD 0 ; Reserved
+ DCD PendSV_Handler ; PendSV Handler
+ DCD SysTick_Handler ; SysTick Handler
+
+ ; External Interrupts
+ DCD WWDG_IRQHandler ; Window WatchDog
+ DCD PVD_PVM_IRQHandler ; PVD/PVM1/PVM2/PVM3/PVM4 through EXTI Line detection
+ DCD TAMP_STAMP_IRQHandler ; Tamper and TimeStamps through the EXTI line
+ DCD RTC_WKUP_IRQHandler ; RTC Wakeup through the EXTI line
+ DCD FLASH_IRQHandler ; FLASH
+ DCD RCC_IRQHandler ; RCC
+ DCD EXTI0_IRQHandler ; EXTI Line0
+ DCD EXTI1_IRQHandler ; EXTI Line1
+ DCD EXTI2_IRQHandler ; EXTI Line2
+ DCD EXTI3_IRQHandler ; EXTI Line3
+ DCD EXTI4_IRQHandler ; EXTI Line4
+ DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1
+ DCD DMA1_Channel2_IRQHandler ; DMA1 Channel 2
+ DCD DMA1_Channel3_IRQHandler ; DMA1 Channel 3
+ DCD DMA1_Channel4_IRQHandler ; DMA1 Channel 4
+ DCD DMA1_Channel5_IRQHandler ; DMA1 Channel 5
+ DCD DMA1_Channel6_IRQHandler ; DMA1 Channel 6
+ DCD DMA1_Channel7_IRQHandler ; DMA1 Channel 7
+ DCD ADC1_IRQHandler ; ADC1
+ DCD CAN1_TX_IRQHandler ; CAN1 TX
+ DCD CAN1_RX0_IRQHandler ; CAN1 RX0
+ DCD CAN1_RX1_IRQHandler ; CAN1 RX1
+ DCD CAN1_SCE_IRQHandler ; CAN1 SCE
+ DCD EXTI9_5_IRQHandler ; External Line[9:5]s
+ DCD TIM1_BRK_TIM15_IRQHandler ; TIM1 Break and TIM15
+ DCD TIM1_UP_TIM16_IRQHandler ; TIM1 Update and TIM16
+ DCD TIM1_TRG_COM_IRQHandler ; TIM1 Trigger and Commutation
+ DCD TIM1_CC_IRQHandler ; TIM1 Capture Compare
+ DCD TIM2_IRQHandler ; TIM2
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD I2C1_EV_IRQHandler ; I2C1 Event
+ DCD I2C1_ER_IRQHandler ; I2C1 Error
+ DCD I2C2_EV_IRQHandler ; I2C2 Event
+ DCD I2C2_ER_IRQHandler ; I2C2 Error
+ DCD SPI1_IRQHandler ; SPI1
+ DCD SPI2_IRQHandler ; SPI2
+ DCD USART1_IRQHandler ; USART1
+ DCD USART2_IRQHandler ; USART2
+ DCD USART3_IRQHandler ; USART3
+ DCD EXTI15_10_IRQHandler ; External Line[15:10]
+ DCD RTC_Alarm_IRQHandler ; RTC Alarm (A and B) through EXTI Line
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD SDMMC1_IRQHandler ; SDMMC1
+ DCD 0 ; Reserved
+ DCD SPI3_IRQHandler ; SPI3
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD TIM6_DAC_IRQHandler ; TIM6 and DAC1&2 underrun errors
+ DCD TIM7_IRQHandler ; TIM7
+ DCD DMA2_Channel1_IRQHandler ; DMA2 Channel 1
+ DCD DMA2_Channel2_IRQHandler ; DMA2 Channel 2
+ DCD DMA2_Channel3_IRQHandler ; DMA2 Channel 3
+ DCD DMA2_Channel4_IRQHandler ; DMA2 Channel 4
+ DCD DMA2_Channel5_IRQHandler ; DMA2 Channel 5
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD COMP_IRQHandler ; COMP Interrupt
+ DCD LPTIM1_IRQHandler ; LP TIM1 interrupt
+ DCD LPTIM2_IRQHandler ; LP TIM2 interrupt
+ DCD 0 ; Reserved
+ DCD DMA2_Channel6_IRQHandler ; DMA2 Channel 6
+ DCD DMA2_Channel7_IRQHandler ; DMA2 Channel 7
+ DCD LPUART1_IRQHandler ; LP UART1 interrupt
+ DCD QUADSPI_IRQHandler ; Quad SPI global interrupt
+ DCD I2C3_EV_IRQHandler ; I2C3 event
+ DCD I2C3_ER_IRQHandler ; I2C3 error
+ DCD SAI1_IRQHandler ; Serial Audio Interface 1 global interrupt
+ DCD 0 ; Reserved
+ DCD SWPMI1_IRQHandler ; Serial Wire Interface 1 global interrupt
+ DCD TSC_IRQHandler ; Touch Sense Controller global interrupt
+ DCD 0 ; Reserved
+ DCD 0 ; Reserved
+ DCD RNG_IRQHandler ; RNG global interrupt
+ DCD FPU_IRQHandler ; FPU
+ DCD CRS_IRQHandler ; CRS interrupt
+
+__Vectors_End
+
+__Vectors_Size EQU __Vectors_End - __Vectors
+
+ AREA |.text|, CODE, READONLY
+
+; Reset handler
+Reset_Handler PROC
+ EXPORT Reset_Handler [WEAK]
+ IMPORT SystemInit
+ IMPORT __main
+
+ LDR R0, =SystemInit
+ BLX R0
+ LDR R0, =__main
+ BX R0
+ ENDP
+
+; Dummy Exception Handlers (infinite loops which can be modified)
+
+NMI_Handler PROC
+ EXPORT NMI_Handler [WEAK]
+ B .
+ ENDP
+HardFault_Handler\
+ PROC
+ EXPORT HardFault_Handler [WEAK]
+ B .
+ ENDP
+MemManage_Handler\
+ PROC
+ EXPORT MemManage_Handler [WEAK]
+ B .
+ ENDP
+BusFault_Handler\
+ PROC
+ EXPORT BusFault_Handler [WEAK]
+ B .
+ ENDP
+UsageFault_Handler\
+ PROC
+ EXPORT UsageFault_Handler [WEAK]
+ B .
+ ENDP
+SVC_Handler PROC
+ EXPORT SVC_Handler [WEAK]
+ B .
+ ENDP
+DebugMon_Handler\
+ PROC
+ EXPORT DebugMon_Handler [WEAK]
+ B .
+ ENDP
+PendSV_Handler PROC
+ EXPORT PendSV_Handler [WEAK]
+ B .
+ ENDP
+SysTick_Handler PROC
+ EXPORT SysTick_Handler [WEAK]
+ B .
+ ENDP
+
+Default_Handler PROC
+
+ EXPORT WWDG_IRQHandler [WEAK]
+ EXPORT PVD_PVM_IRQHandler [WEAK]
+ EXPORT TAMP_STAMP_IRQHandler [WEAK]
+ EXPORT RTC_WKUP_IRQHandler [WEAK]
+ EXPORT FLASH_IRQHandler [WEAK]
+ EXPORT RCC_IRQHandler [WEAK]
+ EXPORT EXTI0_IRQHandler [WEAK]
+ EXPORT EXTI1_IRQHandler [WEAK]
+ EXPORT EXTI2_IRQHandler [WEAK]
+ EXPORT EXTI3_IRQHandler [WEAK]
+ EXPORT EXTI4_IRQHandler [WEAK]
+ EXPORT DMA1_Channel1_IRQHandler [WEAK]
+ EXPORT DMA1_Channel2_IRQHandler [WEAK]
+ EXPORT DMA1_Channel3_IRQHandler [WEAK]
+ EXPORT DMA1_Channel4_IRQHandler [WEAK]
+ EXPORT DMA1_Channel5_IRQHandler [WEAK]
+ EXPORT DMA1_Channel6_IRQHandler [WEAK]
+ EXPORT DMA1_Channel7_IRQHandler [WEAK]
+ EXPORT ADC1_IRQHandler [WEAK]
+ EXPORT CAN1_TX_IRQHandler [WEAK]
+ EXPORT CAN1_RX0_IRQHandler [WEAK]
+ EXPORT CAN1_RX1_IRQHandler [WEAK]
+ EXPORT CAN1_SCE_IRQHandler [WEAK]
+ EXPORT EXTI9_5_IRQHandler [WEAK]
+ EXPORT TIM1_BRK_TIM15_IRQHandler [WEAK]
+ EXPORT TIM1_UP_TIM16_IRQHandler [WEAK]
+ EXPORT TIM1_TRG_COM_IRQHandler [WEAK]
+ EXPORT TIM1_CC_IRQHandler [WEAK]
+ EXPORT TIM2_IRQHandler [WEAK]
+ EXPORT I2C1_EV_IRQHandler [WEAK]
+ EXPORT I2C1_ER_IRQHandler [WEAK]
+ EXPORT I2C2_EV_IRQHandler [WEAK]
+ EXPORT I2C2_ER_IRQHandler [WEAK]
+ EXPORT SPI1_IRQHandler [WEAK]
+ EXPORT SPI2_IRQHandler [WEAK]
+ EXPORT USART1_IRQHandler [WEAK]
+ EXPORT USART2_IRQHandler [WEAK]
+ EXPORT USART3_IRQHandler [WEAK]
+ EXPORT EXTI15_10_IRQHandler [WEAK]
+ EXPORT RTC_Alarm_IRQHandler [WEAK]
+ EXPORT SDMMC1_IRQHandler [WEAK]
+ EXPORT SPI3_IRQHandler [WEAK]
+ EXPORT TIM6_DAC_IRQHandler [WEAK]
+ EXPORT TIM7_IRQHandler [WEAK]
+ EXPORT DMA2_Channel1_IRQHandler [WEAK]
+ EXPORT DMA2_Channel2_IRQHandler [WEAK]
+ EXPORT DMA2_Channel3_IRQHandler [WEAK]
+ EXPORT DMA2_Channel4_IRQHandler [WEAK]
+ EXPORT DMA2_Channel5_IRQHandler [WEAK]
+ EXPORT COMP_IRQHandler [WEAK]
+ EXPORT LPTIM1_IRQHandler [WEAK]
+ EXPORT LPTIM2_IRQHandler [WEAK]
+ EXPORT DMA2_Channel6_IRQHandler [WEAK]
+ EXPORT DMA2_Channel7_IRQHandler [WEAK]
+ EXPORT LPUART1_IRQHandler [WEAK]
+ EXPORT QUADSPI_IRQHandler [WEAK]
+ EXPORT I2C3_EV_IRQHandler [WEAK]
+ EXPORT I2C3_ER_IRQHandler [WEAK]
+ EXPORT SAI1_IRQHandler [WEAK]
+ EXPORT SWPMI1_IRQHandler [WEAK]
+ EXPORT TSC_IRQHandler [WEAK]
+ EXPORT RNG_IRQHandler [WEAK]
+ EXPORT FPU_IRQHandler [WEAK]
+ EXPORT CRS_IRQHandler [WEAK]
+
+WWDG_IRQHandler
+PVD_PVM_IRQHandler
+TAMP_STAMP_IRQHandler
+RTC_WKUP_IRQHandler
+FLASH_IRQHandler
+RCC_IRQHandler
+EXTI0_IRQHandler
+EXTI1_IRQHandler
+EXTI2_IRQHandler
+EXTI3_IRQHandler
+EXTI4_IRQHandler
+DMA1_Channel1_IRQHandler
+DMA1_Channel2_IRQHandler
+DMA1_Channel3_IRQHandler
+DMA1_Channel4_IRQHandler
+DMA1_Channel5_IRQHandler
+DMA1_Channel6_IRQHandler
+DMA1_Channel7_IRQHandler
+ADC1_IRQHandler
+CAN1_TX_IRQHandler
+CAN1_RX0_IRQHandler
+CAN1_RX1_IRQHandler
+CAN1_SCE_IRQHandler
+EXTI9_5_IRQHandler
+TIM1_BRK_TIM15_IRQHandler
+TIM1_UP_TIM16_IRQHandler
+TIM1_TRG_COM_IRQHandler
+TIM1_CC_IRQHandler
+TIM2_IRQHandler
+I2C1_EV_IRQHandler
+I2C1_ER_IRQHandler
+I2C2_EV_IRQHandler
+I2C2_ER_IRQHandler
+SPI1_IRQHandler
+SPI2_IRQHandler
+USART1_IRQHandler
+USART2_IRQHandler
+USART3_IRQHandler
+EXTI15_10_IRQHandler
+RTC_Alarm_IRQHandler
+SDMMC1_IRQHandler
+SPI3_IRQHandler
+TIM6_DAC_IRQHandler
+TIM7_IRQHandler
+DMA2_Channel1_IRQHandler
+DMA2_Channel2_IRQHandler
+DMA2_Channel3_IRQHandler
+DMA2_Channel4_IRQHandler
+DMA2_Channel5_IRQHandler
+COMP_IRQHandler
+LPTIM1_IRQHandler
+LPTIM2_IRQHandler
+DMA2_Channel6_IRQHandler
+DMA2_Channel7_IRQHandler
+LPUART1_IRQHandler
+QUADSPI_IRQHandler
+I2C3_EV_IRQHandler
+I2C3_ER_IRQHandler
+SAI1_IRQHandler
+SWPMI1_IRQHandler
+TSC_IRQHandler
+RNG_IRQHandler
+FPU_IRQHandler
+CRS_IRQHandler
+
+ B .
+
+ ENDP
+
+ ALIGN
+
+;*******************************************************************************
+; User Stack and Heap initialization
+;*******************************************************************************
+ IF :DEF:__MICROLIB
+
+ EXPORT __initial_sp
+ EXPORT __heap_base
+ EXPORT __heap_limit
+
+ ELSE
+
+ IMPORT __use_two_region_memory
+ EXPORT __user_initial_stackheap
+
+__user_initial_stackheap
+
+ LDR R0, = Heap_Mem
+ LDR R1, =(Stack_Mem + Stack_Size)
+ LDR R2, = (Heap_Mem + Heap_Size)
+ LDR R3, = Stack_Mem
+ BX LR
+
+ ALIGN
+
+ ENDIF
+
+ END
+
+;************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE*****
diff --git a/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/include/config.h b/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/include/config.h
index 6b678e21..a44dbd47 100644
--- a/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/include/config.h
+++ b/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/include/config.h
@@ -11,7 +11,7 @@
/* #undef LOG_UPLOAD */
/* #undef IOT_DEBUG */
/* #undef DEBUG_DEV_INFO_USED */
-#define AT_TCP_ENABLED
+/* #undef AT_TCP_ENABLED */
#define AT_UART_RECV_IRQ
/* #undef AT_OS_USED */
/* #undef AT_DEBUG */
diff --git a/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/include/exports/qcloud_iot_export_mqtt.h b/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/include/exports/qcloud_iot_export_mqtt.h
index 68c246a8..772139dc 100644
--- a/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/include/exports/qcloud_iot_export_mqtt.h
+++ b/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/include/exports/qcloud_iot_export_mqtt.h
@@ -119,7 +119,7 @@ typedef void (*OnSubEventHandler)(void *pClient, MQTTEventType event_type, void
*/
typedef struct {
QoS qos; // MQTT QoS level
- OnMessageHandler on_message_handler; // callback when message arrived
+ OnMessageHandler on_message_handler; // callback when message arrived
OnSubEventHandler on_sub_event_handler; // callback when event happened
void *user_data; // user context for callback
} SubscribeParams;
@@ -160,7 +160,7 @@ typedef struct {
/* device info */
char *product_id; // product ID
char *device_name; // device name
-
+
#ifdef AUTH_MODE_CERT
char *cert_file; // cert file path
char *key_file; // key file path
@@ -219,7 +219,7 @@ int IOT_MQTT_Yield(void *pClient, uint32_t timeout_ms);
/**
* @brief Publish MQTT message
*
- * @param pClient handle to MQTT client
+ * @param pClient handle to MQTT client
* @param topicName MQTT topic name
* @param pParams publish parameters
*
@@ -230,7 +230,7 @@ int IOT_MQTT_Publish(void *pClient, char *topicName, PublishParams *pParams);
/**
* @brief Subscribe MQTT topic
*
- * @param pClient handle to MQTT client
+ * @param pClient handle to MQTT client
* @param topicFilter MQTT topic filter
* @param pParams subscribe parameters
*
@@ -241,7 +241,7 @@ int IOT_MQTT_Subscribe(void *pClient, char *topicFilter, SubscribeParams *pParam
/**
* @brief Unsubscribe MQTT topic
*
- * @param pClient handle to MQTT client
+ * @param pClient handle to MQTT client
* @param topicFilter MQTT topic filter
*
* @return packet id (>=0) when success, or err code (<0) for failure
@@ -251,7 +251,7 @@ int IOT_MQTT_Unsubscribe(void *pClient, char *topicFilter);
/**
* @brief Check if MQTT is connected
*
- * @param pClient handle to MQTT client
+ * @param pClient handle to MQTT client
* @return true= connected, false = unconnected
*/
bool IOT_MQTT_IsConnected(void *pClient);
diff --git a/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/include/qcloud_iot_export_variables.h b/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/include/qcloud_iot_export_variables.h
index f9bcf223..b79e2ef3 100644
--- a/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/include/qcloud_iot_export_variables.h
+++ b/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/include/qcloud_iot_export_variables.h
@@ -20,9 +20,9 @@
* Below variables are dependant on user situation (network status/device memory/application context)
* Adjust the default value to meet your requirement
*/
-
+
/* default MQTT/CoAP timeout value when connect/pub/sub (unit: ms) */
-#define QCLOUD_IOT_MQTT_COMMAND_TIMEOUT (5 * 1000)
+#define QCLOUD_IOT_MQTT_COMMAND_TIMEOUT (15 * 1000)
/* default MQTT keep alive interval (unit: ms) */
#define QCLOUD_IOT_MQTT_KEEP_ALIVE_INTERNAL (240 * 1000)
@@ -57,7 +57,7 @@
#define MAX_LOG_MSG_LEN (1023)
#endif
-/*
+/*
* Log upload related params, which will affect the size of device memory/disk consumption
* the default value can be changed for different user situation
*/
diff --git a/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/platform/tls/mbedtls/HAL_DTLS_mbedtls.c b/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/platform/tls/mbedtls/HAL_DTLS_mbedtls.c
index 86b6f3da..7f060381 100644
--- a/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/platform/tls/mbedtls/HAL_DTLS_mbedtls.c
+++ b/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/platform/tls/mbedtls/HAL_DTLS_mbedtls.c
@@ -56,12 +56,16 @@ typedef struct {
mbedtls_ctr_drbg_context ctr_drbg;
mbedtls_ssl_context ssl;
mbedtls_ssl_config ssl_conf;
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
mbedtls_x509_crt ca_cert;
mbedtls_x509_crt client_cert;
+#endif
mbedtls_pk_context private_key;
mbedtls_timing_delay_context timer;
+#if 0
mbedtls_ssl_cookie_ctx cookie_ctx;
+#endif
} DTLSDataParams;
/**
@@ -70,14 +74,18 @@ typedef struct {
static void _free_mebeddtls(DTLSDataParams *pParams)
{
mbedtls_net_free(&(pParams->socket_fd));
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
mbedtls_x509_crt_free(&(pParams->client_cert));
mbedtls_x509_crt_free(&(pParams->ca_cert));
mbedtls_pk_free(&(pParams->private_key));
+#endif
mbedtls_ssl_free(&(pParams->ssl));
mbedtls_ssl_config_free(&(pParams->ssl_conf));
mbedtls_ctr_drbg_free(&(pParams->ctr_drbg));
mbedtls_entropy_free(&(pParams->entropy));
+#if 0
mbedtls_ssl_cookie_free(&(pParams->cookie_ctx));
+#endif
HAL_Free(pParams);
}
@@ -100,9 +108,11 @@ static int _mbedtls_client_init(DTLSDataParams *pDataParams, DTLSConnectParams *
mbedtls_net_init( &(pDataParams->socket_fd) );
mbedtls_ssl_init( &(pDataParams->ssl) );
mbedtls_ssl_config_init( &(pDataParams->ssl_conf) );
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
mbedtls_x509_crt_init( &(pDataParams->ca_cert) );
mbedtls_x509_crt_init(&(pDataParams->client_cert));
mbedtls_pk_init(&(pDataParams->private_key));
+#endif
mbedtls_ctr_drbg_init( &(pDataParams->ctr_drbg) );
mbedtls_entropy_init( &(pDataParams->entropy) );
@@ -114,26 +124,32 @@ static int _mbedtls_client_init(DTLSDataParams *pDataParams, DTLSConnectParams *
mbedtls_ssl_conf_authmode(&pDataParams->ssl_conf, MBEDTLS_SSL_VERIFY_NONE );
- if (pConnectParams->ca_crt != NULL) {
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
+ if (pConnectParams->ca_crt != NULL)
+ {
if ((ret = mbedtls_x509_crt_parse(&(pDataParams->ca_cert), (const unsigned char *)pConnectParams->ca_crt,
(pConnectParams->ca_crt_len + 1)))) {
Log_e("parse ca crt failed returned -0x%04x", -ret);
return QCLOUD_ERR_SSL_CERT;
}
}
+#endif
#ifdef AUTH_MODE_CERT
if (pConnectParams->cert_file != NULL && pConnectParams->key_file != NULL) {
- if ((ret = mbedtls_x509_crt_parse_file(&(pDataParams->client_cert), pConnectParams->cert_file)) != 0) {
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
+ if ((ret = mbedtls_x509_crt_parse_file(&(pDataParams->client_cert), pConnectParams->cert_file)) != 0) {
Log_e("load client cert file failed returned -0x%x", ret);
return QCLOUD_ERR_SSL_CERT;
}
+#endif
if ((ret = mbedtls_pk_parse_keyfile(&(pDataParams->private_key), pConnectParams->key_file, "")) != 0) {
Log_e("load client key file failed returned -0x%x", ret);
return QCLOUD_ERR_SSL_CERT;
}
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
if (0 == ret) {
mbedtls_ssl_conf_ca_chain(&(pDataParams->ssl_conf), &(pDataParams->ca_cert), NULL);
if ((ret = mbedtls_ssl_conf_own_cert(&(pDataParams->ssl_conf), &(pDataParams->client_cert), &(pDataParams->private_key))) != 0) {
@@ -141,6 +157,7 @@ static int _mbedtls_client_init(DTLSDataParams *pDataParams, DTLSConnectParams *
return QCLOUD_ERR_SSL_CERT;
}
}
+#endif
} else {
Log_d("cert_file/key_file is empty!|cert_file=%s|key_file=%s", pConnectParams->cert_file, pConnectParams->key_file);
}
@@ -188,10 +205,12 @@ int _mbedtls_udp_connect(mbedtls_net_context *socket_fd, const char *host, int p
}
}
+#if 0
if ((ret = mbedtls_net_set_block(socket_fd)) != 0) {
Log_e("set block faliled returned -0x%04x", -ret);
return QCLOUD_ERR_TCP_CONNECT;
}
+#endif
return QCLOUD_RET_SUCCESS;
}
@@ -223,12 +242,14 @@ uintptr_t HAL_DTLS_Connect(DTLSConnectParams *pConnectParams, const char *host,
mbedtls_ssl_conf_rng(&pDataParams->ssl_conf, mbedtls_ctr_drbg_random, &pDataParams->ctr_drbg);
mbedtls_ssl_conf_dbg(&pDataParams->ssl_conf, _dtls_debug, NULL);
+#if 0
if ((ret = mbedtls_ssl_cookie_setup(&pDataParams->cookie_ctx, mbedtls_ctr_drbg_random, &pDataParams->ctr_drbg)) != 0) {
Log_e("mbedtls_ssl_cookie_setup result 0x%04x", ret);
goto error;
}
mbedtls_ssl_conf_dtls_cookies(&pDataParams->ssl_conf, mbedtls_ssl_cookie_write, mbedtls_ssl_cookie_check, &pDataParams->cookie_ctx);
+#endif
#ifndef AUTH_MODE_CERT
mbedtls_ssl_conf_ciphersuites(&(pDataParams->ssl_conf), ciphersuites);
@@ -255,23 +276,27 @@ uintptr_t HAL_DTLS_Connect(DTLSConnectParams *pConnectParams, const char *host,
mbedtls_timing_get_delay);
}
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
if ((ret = mbedtls_ssl_set_hostname(&(pDataParams->ssl), host)) != 0) {
- Log_e("mbedtls_ssl_set_hostname failed returned -0x%x", -ret);
- goto error;
- }
+ Log_e("mbedtls_ssl_set_hostname failed returned -0x%x", -ret);
+ goto error;
+ }
+#endif
mbedtls_ssl_set_bio(&(pDataParams->ssl), (void *)&pDataParams->socket_fd, mbedtls_net_send, mbedtls_net_recv,
mbedtls_net_recv_timeout);
- while ((ret = mbedtls_ssl_handshake(&(pDataParams->ssl))) != 0) {
- if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) {
- Log_e("mbedtls_ssl_handshake failed returned -0x%x", -ret);
- if (ret == MBEDTLS_ERR_X509_CERT_VERIFY_FAILED) {
- Log_e("Unable to verify the server's certificate");
- }
- goto error;
- }
- }
+ while ((ret = mbedtls_ssl_handshake(&(pDataParams->ssl))) != 0) {
+ if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) {
+ Log_e("mbedtls_ssl_handshake failed returned -0x%x", -ret);
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
+ if (ret == MBEDTLS_ERR_X509_CERT_VERIFY_FAILED) {
+ Log_e("Unable to verify the server's certificate");
+ }
+#endif
+ goto error;
+ }
+ }
if ((ret = mbedtls_ssl_get_verify_result(&(pDataParams->ssl))) != 0) {
Log_e("mbedtls_ssl_get_verify_result failed returned -0x%x", -ret);
@@ -299,14 +324,18 @@ void HAL_DTLS_Disconnect(uintptr_t handle)
} while (ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE);
mbedtls_net_free(&(pParams->socket_fd));
+#ifdef MBEDTLS_X509_CRT_PARSE_C
mbedtls_x509_crt_free(&(pParams->client_cert));
mbedtls_x509_crt_free(&(pParams->ca_cert));
mbedtls_pk_free(&(pParams->private_key));
+#endif
mbedtls_ssl_free(&(pParams->ssl));
mbedtls_ssl_config_free(&(pParams->ssl_conf));
mbedtls_ctr_drbg_free(&(pParams->ctr_drbg));
mbedtls_entropy_free(&(pParams->entropy));
+#if 0
mbedtls_ssl_cookie_free(&(pParams->cookie_ctx));
+#endif
HAL_Free((void *)handle);
}
diff --git a/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/platform/tls/mbedtls/HAL_TLS_mbedtls.c b/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/platform/tls/mbedtls/HAL_TLS_mbedtls.c
index f6edd1c6..3d9d9358 100644
--- a/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/platform/tls/mbedtls/HAL_TLS_mbedtls.c
+++ b/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/platform/tls/mbedtls/HAL_TLS_mbedtls.c
@@ -50,8 +50,10 @@ typedef struct {
mbedtls_ctr_drbg_context ctr_drbg;
mbedtls_ssl_context ssl;
mbedtls_ssl_config ssl_conf;
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
mbedtls_x509_crt ca_cert;
mbedtls_x509_crt client_cert;
+#endif
mbedtls_pk_context private_key;
} TLSDataParams;
@@ -61,9 +63,11 @@ typedef struct {
static void _free_mebedtls(TLSDataParams *pParams)
{
mbedtls_net_free(&(pParams->socket_fd));
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
mbedtls_x509_crt_free(&(pParams->client_cert));
mbedtls_x509_crt_free(&(pParams->ca_cert));
mbedtls_pk_free(&(pParams->private_key));
+#endif
mbedtls_ssl_free(&(pParams->ssl));
mbedtls_ssl_config_free(&(pParams->ssl_conf));
mbedtls_ctr_drbg_free(&(pParams->ctr_drbg));
@@ -91,9 +95,11 @@ static int _mbedtls_client_init(TLSDataParams *pDataParams, TLSConnectParams *pC
mbedtls_ssl_init(&(pDataParams->ssl));
mbedtls_ssl_config_init(&(pDataParams->ssl_conf));
mbedtls_ctr_drbg_init(&(pDataParams->ctr_drbg));
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
mbedtls_x509_crt_init(&(pDataParams->ca_cert));
mbedtls_x509_crt_init(&(pDataParams->client_cert));
mbedtls_pk_init(&(pDataParams->private_key));
+#endif
mbedtls_entropy_init(&(pDataParams->entropy));
// custom parameter is NULL for now
@@ -103,20 +109,25 @@ static int _mbedtls_client_init(TLSDataParams *pDataParams, TLSConnectParams *pC
return QCLOUD_ERR_SSL_INIT;
}
- if (pConnectParams->ca_crt != NULL) {
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
+ if (pConnectParams->ca_crt != NULL)
+ {
if ((ret = mbedtls_x509_crt_parse(&(pDataParams->ca_cert), (const unsigned char *)pConnectParams->ca_crt,
(pConnectParams->ca_crt_len + 1)))) {
Log_e("parse ca crt failed returned 0x%04x", ret < 0 ? -ret : ret);
return QCLOUD_ERR_SSL_CERT;
}
}
+#endif
#ifdef AUTH_MODE_CERT
if (pConnectParams->cert_file != NULL && pConnectParams->key_file != NULL) {
- if ((ret = mbedtls_x509_crt_parse_file(&(pDataParams->client_cert), pConnectParams->cert_file)) != 0) {
- Log_e("load client cert file failed returned 0x%x", ret < 0 ? -ret : ret);
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
+ if ((ret = mbedtls_x509_crt_parse_file(&(pDataParams->client_cert), pConnectParams->cert_file)) != 0) {
+ Log_e("load client cert file failed returned 0x%x", ret<0?-ret:ret);
return QCLOUD_ERR_SSL_CERT;
}
+#endif
if ((ret = mbedtls_pk_parse_keyfile(&(pDataParams->private_key), pConnectParams->key_file, "")) != 0) {
Log_e("load client key file failed returned 0x%x", ret < 0 ? -ret : ret);
@@ -171,10 +182,12 @@ int _mbedtls_tcp_connect(mbedtls_net_context *socket_fd, const char *host, int p
}
+#if 0
if ((ret = mbedtls_net_set_block(socket_fd)) != 0) {
Log_e("set block faliled returned 0x%04x", ret < 0 ? -ret : ret);
return QCLOUD_ERR_TCP_CONNECT;
}
+#endif
return QCLOUD_RET_SUCCESS;
}
@@ -186,10 +199,11 @@ int _mbedtls_tcp_connect(mbedtls_net_context *socket_fd, const char *host, int p
*
* @return
*/
-int _qcloud_server_certificate_verify(void *hostname, mbedtls_x509_crt *crt, int depth, uint32_t *flags)
-{
+ #if defined(MBEDTLS_X509_CRT_PARSE_C)
+int _qcloud_server_certificate_verify(void *hostname, mbedtls_x509_crt *crt, int depth, uint32_t *flags) {
return *flags;
}
+#endif
uintptr_t HAL_TLS_Connect(TLSConnectParams *pConnectParams, const char *host, int port)
{
@@ -210,18 +224,22 @@ uintptr_t HAL_TLS_Connect(TLSConnectParams *pConnectParams, const char *host, in
goto error;
}
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
mbedtls_ssl_conf_verify(&(pDataParams->ssl_conf), _qcloud_server_certificate_verify, (void *)host);
mbedtls_ssl_conf_authmode(&(pDataParams->ssl_conf), MBEDTLS_SSL_VERIFY_REQUIRED);
+#endif
mbedtls_ssl_conf_rng(&(pDataParams->ssl_conf), mbedtls_ctr_drbg_random, &(pDataParams->ctr_drbg));
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
mbedtls_ssl_conf_ca_chain(&(pDataParams->ssl_conf), &(pDataParams->ca_cert), NULL);
if ((ret = mbedtls_ssl_conf_own_cert(&(pDataParams->ssl_conf),
&(pDataParams->client_cert), &(pDataParams->private_key))) != 0) {
Log_e("mbedtls_ssl_conf_own_cert failed returned 0x%04x", ret < 0 ? -ret : ret);
goto error;
}
+#endif
mbedtls_ssl_conf_read_timeout(&(pDataParams->ssl_conf), pConnectParams->timeout_ms);
if ((ret = mbedtls_ssl_setup(&(pDataParams->ssl), &(pDataParams->ssl_conf))) != 0) {
@@ -236,11 +254,13 @@ uintptr_t HAL_TLS_Connect(TLSConnectParams *pConnectParams, const char *host, in
}
#endif
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
// Set the hostname to check against the received server certificate and sni
if ((ret = mbedtls_ssl_set_hostname(&(pDataParams->ssl), host)) != 0) {
Log_e("mbedtls_ssl_set_hostname failed returned 0x%04x", ret < 0 ? -ret : ret);
goto error;
}
+#endif
mbedtls_ssl_set_bio(&(pDataParams->ssl), &(pDataParams->socket_fd), mbedtls_net_send, mbedtls_net_recv,
mbedtls_net_recv_timeout);
@@ -253,10 +273,13 @@ uintptr_t HAL_TLS_Connect(TLSConnectParams *pConnectParams, const char *host, in
while ((ret = mbedtls_ssl_handshake(&(pDataParams->ssl))) != 0) {
if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) {
- Log_e("mbedtls_ssl_handshake failed returned 0x%04x", ret < 0 ? -ret : ret);
+ Log_e("mbedtls_ssl_handshake failed returned 0x%04x", ret<0?-ret:ret);
+
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
if (ret == MBEDTLS_ERR_X509_CERT_VERIFY_FAILED) {
Log_e("Unable to verify the server's certificate");
}
+#endif
goto error;
}
}
@@ -290,9 +313,11 @@ void HAL_TLS_Disconnect(uintptr_t handle)
} while (ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE);
mbedtls_net_free(&(pParams->socket_fd));
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
mbedtls_x509_crt_free(&(pParams->client_cert));
mbedtls_x509_crt_free(&(pParams->ca_cert));
mbedtls_pk_free(&(pParams->private_key));
+#endif
mbedtls_ssl_free(&(pParams->ssl));
mbedtls_ssl_config_free(&(pParams->ssl_conf));
mbedtls_ctr_drbg_free(&(pParams->ctr_drbg));
diff --git a/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/sdk_src/internal_inc/ota_lib.h b/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/sdk_src/internal_inc/ota_lib.h
index 2227f70b..e03dcb39 100644
--- a/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/sdk_src/internal_inc/ota_lib.h
+++ b/components/connectivity/qcloud-iot-explorer-sdk/3rdparty/sdk_src/internal_inc/ota_lib.h
@@ -20,7 +20,7 @@
extern "C" {
#endif
-#include
+// #include
#include
#include "qcloud_iot_export_ota.h"
diff --git a/components/connectivity/qcloud-iot-explorer-sdk/port/TencentOS_tiny/HAL_AT_UART_tencentos_tiny.c b/components/connectivity/qcloud-iot-explorer-sdk/port/TencentOS_tiny/HAL_AT_UART_tencentos_tiny.c
index 72283a0d..f85eaaad 100644
--- a/components/connectivity/qcloud-iot-explorer-sdk/port/TencentOS_tiny/HAL_AT_UART_tencentos_tiny.c
+++ b/components/connectivity/qcloud-iot-explorer-sdk/port/TencentOS_tiny/HAL_AT_UART_tencentos_tiny.c
@@ -38,8 +38,6 @@ static UART_HandleTypeDef *pAtUart = &huart1;
extern void AT_Uart_Init(void);
extern void at_client_uart_rx_isr_cb(uint8_t *pdata, uint8_t len);
-
-#include "board.h"
/**
* @brief This function handles AT UART global interrupt,push recv char to ringbuff.
*/
@@ -51,7 +49,6 @@ void HAL_AT_UART_IRQHandler(void)
ch = (uint8_t) READ_REG(pAtUart->Instance->RDR)&0xFF;
/*this callback for at_client*/
at_client_uart_rx_isr_cb(&ch, 1);
- HAL_GPIO_TogglePin(LD2_GPIO_Port, LD2_Pin);
}
__HAL_UART_CLEAR_PEFLAG(pAtUart);
}
diff --git a/components/connectivity/qcloud-iot-hub-sdk/3rdparty/platform/tls/mbedtls/HAL_DTLS_mbedtls.c b/components/connectivity/qcloud-iot-hub-sdk/3rdparty/platform/tls/mbedtls/HAL_DTLS_mbedtls.c
index 8a24a729..cfa59c6f 100644
--- a/components/connectivity/qcloud-iot-hub-sdk/3rdparty/platform/tls/mbedtls/HAL_DTLS_mbedtls.c
+++ b/components/connectivity/qcloud-iot-hub-sdk/3rdparty/platform/tls/mbedtls/HAL_DTLS_mbedtls.c
@@ -55,12 +55,16 @@ typedef struct {
mbedtls_ctr_drbg_context ctr_drbg;
mbedtls_ssl_context ssl;
mbedtls_ssl_config ssl_conf;
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
mbedtls_x509_crt ca_cert;
mbedtls_x509_crt client_cert;
+#endif
mbedtls_pk_context private_key;
mbedtls_timing_delay_context timer;
+#if 0
mbedtls_ssl_cookie_ctx cookie_ctx;
+#endif
} DTLSDataParams;
/**
@@ -69,14 +73,18 @@ typedef struct {
static void _free_mebeddtls(DTLSDataParams *pParams)
{
mbedtls_net_free(&(pParams->socket_fd));
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
mbedtls_x509_crt_free(&(pParams->client_cert));
mbedtls_x509_crt_free(&(pParams->ca_cert));
mbedtls_pk_free(&(pParams->private_key));
+#endif
mbedtls_ssl_free(&(pParams->ssl));
mbedtls_ssl_config_free(&(pParams->ssl_conf));
mbedtls_ctr_drbg_free(&(pParams->ctr_drbg));
mbedtls_entropy_free(&(pParams->entropy));
+#if 0
mbedtls_ssl_cookie_free(&(pParams->cookie_ctx));
+#endif
HAL_Free(pParams);
}
@@ -97,11 +105,13 @@ static int _mbedtls_client_init(DTLSDataParams *pDataParams, DTLSConnectParams *
mbedtls_net_init(&(pDataParams->socket_fd));
mbedtls_ssl_init(&(pDataParams->ssl));
mbedtls_ssl_config_init(&(pDataParams->ssl_conf));
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
mbedtls_x509_crt_init(&(pDataParams->ca_cert));
mbedtls_x509_crt_init(&(pDataParams->client_cert));
mbedtls_pk_init(&(pDataParams->private_key));
- mbedtls_ctr_drbg_init(&(pDataParams->ctr_drbg));
- mbedtls_entropy_init(&(pDataParams->entropy));
+#endif
+ mbedtls_ctr_drbg_init( &(pDataParams->ctr_drbg) );
+ mbedtls_entropy_init( &(pDataParams->entropy) );
if ((ret = mbedtls_ctr_drbg_seed(&pDataParams->ctr_drbg, mbedtls_entropy_func, &pDataParams->entropy, NULL, 0)) !=
0) {
@@ -111,6 +121,7 @@ static int _mbedtls_client_init(DTLSDataParams *pDataParams, DTLSConnectParams *
mbedtls_ssl_conf_authmode(&pDataParams->ssl_conf, MBEDTLS_SSL_VERIFY_NONE);
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
if (pConnectParams->ca_crt != NULL) {
if ((ret = mbedtls_x509_crt_parse(&(pDataParams->ca_cert), (const unsigned char *)pConnectParams->ca_crt,
(pConnectParams->ca_crt_len + 1)))) {
@@ -118,19 +129,23 @@ static int _mbedtls_client_init(DTLSDataParams *pDataParams, DTLSConnectParams *
return QCLOUD_ERR_SSL_CERT;
}
}
+#endif
#ifdef AUTH_MODE_CERT
if (pConnectParams->cert_file != NULL && pConnectParams->key_file != NULL) {
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
if ((ret = mbedtls_x509_crt_parse_file(&(pDataParams->client_cert), pConnectParams->cert_file)) != 0) {
Log_e("load client cert file failed returned -0x%x", ret);
return QCLOUD_ERR_SSL_CERT;
}
+#endif
if ((ret = mbedtls_pk_parse_keyfile(&(pDataParams->private_key), pConnectParams->key_file, "")) != 0) {
Log_e("load client key file failed returned -0x%x", ret);
return QCLOUD_ERR_SSL_CERT;
}
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
if (0 == ret) {
mbedtls_ssl_conf_ca_chain(&(pDataParams->ssl_conf), &(pDataParams->ca_cert), NULL);
if ((ret = mbedtls_ssl_conf_own_cert(&(pDataParams->ssl_conf), &(pDataParams->client_cert),
@@ -139,6 +154,7 @@ static int _mbedtls_client_init(DTLSDataParams *pDataParams, DTLSConnectParams *
return QCLOUD_ERR_SSL_CERT;
}
}
+#endif
} else {
Log_d("cert_file/key_file is empty!|cert_file=%s|key_file=%s", pConnectParams->cert_file,
pConnectParams->key_file);
@@ -187,10 +203,12 @@ int _mbedtls_udp_connect(mbedtls_net_context *socket_fd, const char *host, int p
}
}
+#if 0
if ((ret = mbedtls_net_set_block(socket_fd)) != 0) {
Log_e("set block faliled returned -0x%04x", -ret);
return QCLOUD_ERR_TCP_CONNECT;
}
+#endif
return QCLOUD_RET_SUCCESS;
}
@@ -222,6 +240,7 @@ uintptr_t HAL_DTLS_Connect(DTLSConnectParams *pConnectParams, const char *host,
mbedtls_ssl_conf_rng(&pDataParams->ssl_conf, mbedtls_ctr_drbg_random, &pDataParams->ctr_drbg);
mbedtls_ssl_conf_dbg(&pDataParams->ssl_conf, _dtls_debug, NULL);
+#if 0
if ((ret = mbedtls_ssl_cookie_setup(&pDataParams->cookie_ctx, mbedtls_ctr_drbg_random, &pDataParams->ctr_drbg)) !=
0) {
Log_e("mbedtls_ssl_cookie_setup result 0x%04x", ret);
@@ -229,7 +248,7 @@ uintptr_t HAL_DTLS_Connect(DTLSConnectParams *pConnectParams, const char *host,
}
mbedtls_ssl_conf_dtls_cookies(&pDataParams->ssl_conf, mbedtls_ssl_cookie_write, mbedtls_ssl_cookie_check,
- &pDataParams->cookie_ctx);
+#endif
#ifndef AUTH_MODE_CERT
mbedtls_ssl_conf_ciphersuites(&(pDataParams->ssl_conf), ciphersuites);
@@ -256,10 +275,12 @@ uintptr_t HAL_DTLS_Connect(DTLSConnectParams *pConnectParams, const char *host,
mbedtls_timing_get_delay);
}
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
if ((ret = mbedtls_ssl_set_hostname(&(pDataParams->ssl), host)) != 0) {
Log_e("mbedtls_ssl_set_hostname failed returned -0x%x", -ret);
goto error;
}
+#endif
mbedtls_ssl_set_bio(&(pDataParams->ssl), (void *)&pDataParams->socket_fd, mbedtls_net_send, mbedtls_net_recv,
mbedtls_net_recv_timeout);
@@ -267,9 +288,11 @@ uintptr_t HAL_DTLS_Connect(DTLSConnectParams *pConnectParams, const char *host,
while ((ret = mbedtls_ssl_handshake(&(pDataParams->ssl))) != 0) {
if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) {
Log_e("mbedtls_ssl_handshake failed returned -0x%x", -ret);
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
if (ret == MBEDTLS_ERR_X509_CERT_VERIFY_FAILED) {
Log_e("Unable to verify the server's certificate");
}
+#endif
goto error;
}
}
@@ -300,14 +323,18 @@ void HAL_DTLS_Disconnect(uintptr_t handle)
} while (ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE);
mbedtls_net_free(&(pParams->socket_fd));
+#ifdef MBEDTLS_X509_CRT_PARSE_C
mbedtls_x509_crt_free(&(pParams->client_cert));
mbedtls_x509_crt_free(&(pParams->ca_cert));
mbedtls_pk_free(&(pParams->private_key));
+#endif
mbedtls_ssl_free(&(pParams->ssl));
mbedtls_ssl_config_free(&(pParams->ssl_conf));
mbedtls_ctr_drbg_free(&(pParams->ctr_drbg));
mbedtls_entropy_free(&(pParams->entropy));
+#if 0
mbedtls_ssl_cookie_free(&(pParams->cookie_ctx));
+#endif
HAL_Free((void *)handle);
}
diff --git a/components/connectivity/qcloud-iot-hub-sdk/3rdparty/platform/tls/mbedtls/HAL_TLS_mbedtls.c b/components/connectivity/qcloud-iot-hub-sdk/3rdparty/platform/tls/mbedtls/HAL_TLS_mbedtls.c
index 693f1956..dc169063 100644
--- a/components/connectivity/qcloud-iot-hub-sdk/3rdparty/platform/tls/mbedtls/HAL_TLS_mbedtls.c
+++ b/components/connectivity/qcloud-iot-hub-sdk/3rdparty/platform/tls/mbedtls/HAL_TLS_mbedtls.c
@@ -48,8 +48,10 @@ typedef struct {
mbedtls_ctr_drbg_context ctr_drbg;
mbedtls_ssl_context ssl;
mbedtls_ssl_config ssl_conf;
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
mbedtls_x509_crt ca_cert;
mbedtls_x509_crt client_cert;
+#endif
mbedtls_pk_context private_key;
} TLSDataParams;
@@ -59,9 +61,11 @@ typedef struct {
static void _free_mebedtls(TLSDataParams *pParams)
{
mbedtls_net_free(&(pParams->socket_fd));
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
mbedtls_x509_crt_free(&(pParams->client_cert));
mbedtls_x509_crt_free(&(pParams->ca_cert));
mbedtls_pk_free(&(pParams->private_key));
+#endif
mbedtls_ssl_free(&(pParams->ssl));
mbedtls_ssl_config_free(&(pParams->ssl_conf));
mbedtls_ctr_drbg_free(&(pParams->ctr_drbg));
@@ -88,9 +92,11 @@ static int _mbedtls_client_init(TLSDataParams *pDataParams, TLSConnectParams *pC
mbedtls_ssl_init(&(pDataParams->ssl));
mbedtls_ssl_config_init(&(pDataParams->ssl_conf));
mbedtls_ctr_drbg_init(&(pDataParams->ctr_drbg));
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
mbedtls_x509_crt_init(&(pDataParams->ca_cert));
mbedtls_x509_crt_init(&(pDataParams->client_cert));
mbedtls_pk_init(&(pDataParams->private_key));
+#endif
mbedtls_entropy_init(&(pDataParams->entropy));
// custom parameter is NULL for now
@@ -100,6 +106,7 @@ static int _mbedtls_client_init(TLSDataParams *pDataParams, TLSConnectParams *pC
return QCLOUD_ERR_SSL_INIT;
}
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
if (pConnectParams->ca_crt != NULL) {
if ((ret = mbedtls_x509_crt_parse(&(pDataParams->ca_cert), (const unsigned char *)pConnectParams->ca_crt,
(pConnectParams->ca_crt_len + 1)))) {
@@ -107,13 +114,16 @@ static int _mbedtls_client_init(TLSDataParams *pDataParams, TLSConnectParams *pC
return QCLOUD_ERR_SSL_CERT;
}
}
+#endif
#ifdef AUTH_MODE_CERT
if (pConnectParams->cert_file != NULL && pConnectParams->key_file != NULL) {
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
if ((ret = mbedtls_x509_crt_parse_file(&(pDataParams->client_cert), pConnectParams->cert_file)) != 0) {
Log_e("load client cert file failed returned 0x%x", ret < 0 ? -ret : ret);
return QCLOUD_ERR_SSL_CERT;
}
+#endif
if ((ret = mbedtls_pk_parse_keyfile(&(pDataParams->private_key), pConnectParams->key_file, "")) != 0) {
Log_e("load client key file failed returned 0x%x", ret < 0 ? -ret : ret);
@@ -167,10 +177,12 @@ int _mbedtls_tcp_connect(mbedtls_net_context *socket_fd, const char *host, int p
}
}
+#if 0
if ((ret = mbedtls_net_set_block(socket_fd)) != 0) {
Log_e("set block faliled returned 0x%04x", ret < 0 ? -ret : ret);
return QCLOUD_ERR_TCP_CONNECT;
}
+#endif
return QCLOUD_RET_SUCCESS;
}
@@ -182,10 +194,12 @@ int _mbedtls_tcp_connect(mbedtls_net_context *socket_fd, const char *host, int p
*
* @return
*/
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
int _qcloud_server_certificate_verify(void *hostname, mbedtls_x509_crt *crt, int depth, uint32_t *flags)
{
return *flags;
}
+#endif
uintptr_t HAL_TLS_Connect(TLSConnectParams *pConnectParams, const char *host, int port)
{
@@ -204,18 +218,22 @@ uintptr_t HAL_TLS_Connect(TLSConnectParams *pConnectParams, const char *host, in
goto error;
}
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
mbedtls_ssl_conf_verify(&(pDataParams->ssl_conf), _qcloud_server_certificate_verify, (void *)host);
mbedtls_ssl_conf_authmode(&(pDataParams->ssl_conf), MBEDTLS_SSL_VERIFY_REQUIRED);
+#endif
mbedtls_ssl_conf_rng(&(pDataParams->ssl_conf), mbedtls_ctr_drbg_random, &(pDataParams->ctr_drbg));
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
mbedtls_ssl_conf_ca_chain(&(pDataParams->ssl_conf), &(pDataParams->ca_cert), NULL);
if ((ret = mbedtls_ssl_conf_own_cert(&(pDataParams->ssl_conf), &(pDataParams->client_cert),
&(pDataParams->private_key))) != 0) {
Log_e("mbedtls_ssl_conf_own_cert failed returned 0x%04x", ret < 0 ? -ret : ret);
goto error;
}
+#endif
mbedtls_ssl_conf_read_timeout(&(pDataParams->ssl_conf), pConnectParams->timeout_ms);
if ((ret = mbedtls_ssl_setup(&(pDataParams->ssl), &(pDataParams->ssl_conf))) != 0) {
@@ -230,11 +248,13 @@ uintptr_t HAL_TLS_Connect(TLSConnectParams *pConnectParams, const char *host, in
}
#endif
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
// Set the hostname to check against the received server certificate and sni
if ((ret = mbedtls_ssl_set_hostname(&(pDataParams->ssl), host)) != 0) {
Log_e("mbedtls_ssl_set_hostname failed returned 0x%04x", ret < 0 ? -ret : ret);
goto error;
}
+#endif
mbedtls_ssl_set_bio(&(pDataParams->ssl), &(pDataParams->socket_fd), mbedtls_net_send, mbedtls_net_recv,
mbedtls_net_recv_timeout);
@@ -248,9 +268,11 @@ uintptr_t HAL_TLS_Connect(TLSConnectParams *pConnectParams, const char *host, in
while ((ret = mbedtls_ssl_handshake(&(pDataParams->ssl))) != 0) {
if (ret != MBEDTLS_ERR_SSL_WANT_READ && ret != MBEDTLS_ERR_SSL_WANT_WRITE) {
Log_e("mbedtls_ssl_handshake failed returned 0x%04x", ret < 0 ? -ret : ret);
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
if (ret == MBEDTLS_ERR_X509_CERT_VERIFY_FAILED) {
Log_e("Unable to verify the server's certificate");
}
+#endif
goto error;
}
}
@@ -284,9 +306,11 @@ void HAL_TLS_Disconnect(uintptr_t handle)
} while (ret == MBEDTLS_ERR_SSL_WANT_READ || ret == MBEDTLS_ERR_SSL_WANT_WRITE);
mbedtls_net_free(&(pParams->socket_fd));
+#if defined(MBEDTLS_X509_CRT_PARSE_C)
mbedtls_x509_crt_free(&(pParams->client_cert));
mbedtls_x509_crt_free(&(pParams->ca_cert));
mbedtls_pk_free(&(pParams->private_key));
+#endif
mbedtls_ssl_free(&(pParams->ssl));
mbedtls_ssl_config_free(&(pParams->ssl_conf));
mbedtls_ctr_drbg_free(&(pParams->ctr_drbg));
diff --git a/components/connectivity/qcloud-iot-hub-sdk/port/TencentOS_tiny/HAL_AT_UART_tencentos_tiny.c b/components/connectivity/qcloud-iot-hub-sdk/port/TencentOS_tiny/HAL_AT_UART_tencentos_tiny.c
index 70180de4..5a48d3c5 100644
--- a/components/connectivity/qcloud-iot-hub-sdk/port/TencentOS_tiny/HAL_AT_UART_tencentos_tiny.c
+++ b/components/connectivity/qcloud-iot-hub-sdk/port/TencentOS_tiny/HAL_AT_UART_tencentos_tiny.c
@@ -15,21 +15,19 @@
* limitations under the License.
*
*/
-#include "qcloud_iot_import.h"
#include "qcloud_iot_export.h"
+#include "qcloud_iot_import.h"
#ifdef AT_TCP_ENABLED
+#include
#include
#include
-#include
#include
-#include "utils_ringbuff.h"
#include "at_client.h"
-
-
#include "stm32l4xx_hal.h"
+#include "utils_ringbuff.h"
#define HAL_AT_UART_IRQHandler USART1_IRQHandler
extern UART_HandleTypeDef huart1;
diff --git a/examples/qcloud_iot_explorer_sdk_data_template/data_template_sample.c b/examples/qcloud_iot_explorer_sdk_data_template/data_template_sample.c
index 45ec4344..b01b058a 100644
--- a/examples/qcloud_iot_explorer_sdk_data_template/data_template_sample.c
+++ b/examples/qcloud_iot_explorer_sdk_data_template/data_template_sample.c
@@ -437,7 +437,7 @@ int data_template_light_thread(void) {
return rc;
}
- void *client = IOT_Template_Construct(&init_params);
+ void *client = IOT_Template_Construct(&init_params, NULL);
if (client != NULL) {
Log_i("Cloud Device Construct Success");
} else {
diff --git a/examples/qcloud_iot_explorer_sdk_data_template/qcloud_iot_hub_sdk_explorer.c b/examples/qcloud_iot_explorer_sdk_data_template/entry.c
similarity index 93%
rename from examples/qcloud_iot_explorer_sdk_data_template/qcloud_iot_hub_sdk_explorer.c
rename to examples/qcloud_iot_explorer_sdk_data_template/entry.c
index 533a7a72..8a654434 100644
--- a/examples/qcloud_iot_explorer_sdk_data_template/qcloud_iot_hub_sdk_explorer.c
+++ b/examples/qcloud_iot_explorer_sdk_data_template/entry.c
@@ -39,7 +39,7 @@ void application_entry(void *arg)
data_template_light_thread();
while (1) {
- printf("This is a tencent cloud sdk data template demo!\r\n");
+ printf("This is a qcloud explorer sdk data template demo!\r\n");
tos_task_delay(1000);
}
}
diff --git a/examples/qcloud_iot_explorer_sdk_ota/entry.c b/examples/qcloud_iot_explorer_sdk_ota/entry.c
new file mode 100644
index 00000000..a3d29c44
--- /dev/null
+++ b/examples/qcloud_iot_explorer_sdk_ota/entry.c
@@ -0,0 +1,46 @@
+#include "tos_k.h"
+
+/* 用户根据自己的底层通信链路来配置此宏
+ * 如果是基于以太网lwip的链路,这里应该定义 USE_LWIP
+ * 如果是基于模组的通信链路,这里应该定义相应的模组宏,如使用ESP8266则定义 USE_ESP8266
+ * */
+#define USE_ESP8266
+
+#ifdef USE_LWIP
+#include "lwip/api.h"
+#include "lwip/sockets.h"
+#include "lwip/err.h"
+#include "lwip/sys.h"
+#endif
+
+#ifdef USE_ESP8266
+#include "esp8266.h"
+#endif
+
+void application_entry(void *arg)
+{
+#ifdef USE_LWIP
+ dns_init();
+ MX_LWIP_Init();
+#endif
+
+#ifdef USE_ESP8266
+ extern int esp8266_sal_init(hal_uart_port_t uart_port);
+ extern int esp8266_join_ap(const char *ssid, const char *pwd);
+ esp8266_sal_init(HAL_UART_PORT_0);
+ esp8266_join_ap("SheldonDai", "srnr6x9xbhmb0");
+#endif
+
+#ifdef USE_NB_BC35
+ extern int bc35_28_95_sal_init(hal_uart_port_t uart_port);
+ bc35_28_95_sal_init(HAL_UART_PORT_0);
+#endif
+
+ ota_thread();
+
+ while (1) {
+ printf("This is a qcloud explorer sdk ota demo!\r\n");
+ tos_task_delay(1000);
+ }
+}
+
diff --git a/examples/qcloud_iot_explorer_sdk_ota/ota_mqtt_sample.c b/examples/qcloud_iot_explorer_sdk_ota/ota_mqtt_sample.c
new file mode 100644
index 00000000..7f15b4d3
--- /dev/null
+++ b/examples/qcloud_iot_explorer_sdk_ota/ota_mqtt_sample.c
@@ -0,0 +1,522 @@
+/*
+ * Tencent is pleased to support the open source community by making IoT Hub available.
+ * Copyright (C) 2016 THL A29 Limited, a Tencent company. All rights reserved.
+
+ * Licensed under the MIT License (the "License"); you may not use this file except in
+ * compliance with the License. You may obtain a copy of the License at
+ * http://opensource.org/licenses/MIT
+
+ * Unless required by applicable law or agreed to in writing, software distributed under the License is
+ * distributed on an "AS IS" basis, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND,
+ * either express or implied. See the License for the specific language governing permissions and
+ * limitations under the License.
+ *
+ */
+
+#include
+#include
+#include
+
+#include "qcloud_iot_export.h"
+#include "qcloud_iot_import.h"
+#include "lite-utils.h"
+
+
+#ifdef AUTH_MODE_CERT
+static char sg_cert_file[PATH_MAX + 1]; // full path of device cert file
+static char sg_key_file[PATH_MAX + 1]; // full path of device key file
+#endif
+
+
+static DeviceInfo sg_devInfo;
+
+
+#define OTA_BUF_LEN (5000)
+
+static bool sg_pub_ack = false;
+static int sg_packet_id = 0;
+
+static void event_handler(void *pclient, void *handle_context, MQTTEventMsg *msg)
+{
+ uintptr_t packet_id = (uintptr_t)msg->msg;
+
+ switch (msg->event_type) {
+ case MQTT_EVENT_UNDEF:
+ Log_i("undefined event occur.");
+ break;
+
+ case MQTT_EVENT_DISCONNECT:
+ Log_i("MQTT disconnect.");
+ break;
+
+ case MQTT_EVENT_RECONNECT:
+ Log_i("MQTT reconnect.");
+ break;
+
+ case MQTT_EVENT_SUBCRIBE_SUCCESS:
+ Log_i("subscribe success, packet-id=%u", (unsigned int)packet_id);
+ break;
+
+ case MQTT_EVENT_SUBCRIBE_TIMEOUT:
+ Log_i("subscribe wait ack timeout, packet-id=%u", (unsigned int)packet_id);
+ break;
+
+ case MQTT_EVENT_SUBCRIBE_NACK:
+ Log_i("subscribe nack, packet-id=%u", (unsigned int)packet_id);
+ break;
+
+ case MQTT_EVENT_PUBLISH_SUCCESS:
+ Log_i("publish success, packet-id=%u", (unsigned int)packet_id);
+ if (sg_packet_id == packet_id)
+ sg_pub_ack = true;
+ break;
+
+ case MQTT_EVENT_PUBLISH_TIMEOUT:
+ Log_i("publish timeout, packet-id=%u", (unsigned int)packet_id);
+ break;
+
+ case MQTT_EVENT_PUBLISH_NACK:
+ Log_i("publish nack, packet-id=%u", (unsigned int)packet_id);
+ break;
+ default:
+ Log_i("Should NOT arrive here.");
+ break;
+ }
+}
+
+/* demo of firmware info management in device side for resuming download from break point */
+#define VERSION_FILE_PATH "./local_fw_info.json"
+#define KEY_VER "version"
+#define KEY_MD5 "md5"
+#define KEY_SIZE "downloadSize"
+#define KEY_STATE "state"
+#define KEY_PREVER "running_version"
+static char * get_local_fw_version(char **ver, char **md5, char **size)
+{
+#define INFO_FILE_MAX_LEN 256
+
+ FILE *fp;
+ int len;
+ int rlen;
+ char *preVer;
+ char *reportVer = NULL;
+
+ fp = fopen(VERSION_FILE_PATH, "r");
+ if (NULL == fp) {
+ Log_e("open file %s failed", VERSION_FILE_PATH);
+ goto exit;
+ }
+
+ fseek(fp, 0L, SEEK_END);
+ len = ftell(fp);
+ if (len > INFO_FILE_MAX_LEN) {
+ Log_e("%s is too big, pls check", VERSION_FILE_PATH);
+ goto exit;
+ }
+
+ char *JsonDoc = (char *)HAL_Malloc(len + 10);
+ if (NULL == JsonDoc) {
+ Log_e("malloc buffer for json file read fail");
+ goto exit;
+ }
+
+ rewind(fp);
+ rlen = fread(JsonDoc, 1, len, fp);
+
+ if (len != rlen) {
+ Log_e("read data len (%d) less than needed (%d), %s", rlen, len, JsonDoc);
+ }
+
+ *ver = LITE_json_value_of(KEY_VER, JsonDoc);
+ *md5 = LITE_json_value_of(KEY_MD5, JsonDoc);
+ *size = LITE_json_value_of(KEY_SIZE, JsonDoc);
+ preVer = LITE_json_value_of(KEY_PREVER, JsonDoc);
+
+ if ((NULL != *ver) && (NULL != preVer) && (0 == strcmp(*ver, preVer))) {
+ reportVer = *ver;
+ HAL_Free(preVer);
+ } else {
+ reportVer = preVer;
+ }
+
+exit:
+
+ if (NULL != fp) {
+ fclose(fp);
+ }
+
+ return reportVer;
+#undef INFO_FILE_MAX_LEN
+}
+
+/* update local firmware info for resuming download from break point */
+static int update_local_fw_info(const char *version, const char *preVer, const char *md5, uint32_t downloadedSize)
+{
+#define INFO_FILE_MAX_LEN 256
+
+ FILE *fp;
+ int wlen;
+ int ret = QCLOUD_RET_SUCCESS;
+ char dataBuff[INFO_FILE_MAX_LEN];
+
+ memset(dataBuff, 0, INFO_FILE_MAX_LEN);
+ HAL_Snprintf(dataBuff, INFO_FILE_MAX_LEN, "{\"%s\":\"%s\", \"%s\":\"%s\",\"%s\":%d,\"%s\":\"%s\"}", \
+ KEY_VER, version, KEY_MD5, md5, KEY_SIZE, downloadedSize, \
+ KEY_PREVER, (NULL == preVer) ? "1.0.0" : preVer);
+
+ fp = fopen(VERSION_FILE_PATH, "w");
+ if (NULL == fp) {
+ Log_e("open file %s failed", VERSION_FILE_PATH);
+ ret = QCLOUD_ERR_FAILURE;
+ goto exit;
+ }
+
+ wlen = fwrite(dataBuff, 1, strlen(dataBuff), fp);
+ if (wlen != strlen(dataBuff)) {
+ Log_e("save version to file err");
+ ret = QCLOUD_ERR_FAILURE;
+ }
+
+exit:
+
+ if (NULL != fp) {
+ fclose(fp);
+ }
+
+ return ret;
+#undef INFO_FILE_MAX_LEN
+}
+
+/* get local firmware offset for resuming download from break point */
+static int getFwOffset(void *h_ota, char *local_ver, char *local_md5, char *local_size, uint32_t *offset, uint32_t *size_file)
+{
+ char version[128], md5sum[33];
+ uint32_t local_len;
+ int Ret;
+
+ Ret = IOT_OTA_Ioctl(h_ota, IOT_OTAG_VERSION, version, 128);
+ Ret |= IOT_OTA_Ioctl(h_ota, IOT_OTAG_MD5SUM, md5sum, 33);
+ Ret |= IOT_OTA_Ioctl(h_ota, IOT_OTAG_FILE_SIZE, size_file, 4);
+
+ local_len = (NULL == local_size) ? 0 : atoi(local_size);
+
+
+ if ((NULL == local_ver) || (NULL == local_md5) || (NULL == local_size)) {
+ *offset = 0;
+ } else if ((0 != strcmp(local_ver, version)) || (0 != strcmp(local_md5, md5sum)) || (local_len > *size_file)) {
+ *offset = 0;
+ } else {
+ *offset = local_len;
+ }
+
+ return Ret;
+}
+
+/* calculate left MD5 for resuming download from break point */
+static int cal_exist_fw_md5(void *h_ota, FILE *fp, size_t size)
+{
+#define BUFF_LEN 1024
+
+ char buff[BUFF_LEN];
+ size_t rlen;
+ int Ret = QCLOUD_RET_SUCCESS;
+
+ while ((size > 0) && (!feof(fp))) {
+ rlen = (size > BUFF_LEN) ? BUFF_LEN : size;
+ if (rlen != fread(buff, 1, rlen, fp)) {
+ Log_e("read data len not expected");
+ Ret = QCLOUD_ERR_FAILURE;
+ break;
+ }
+ IOT_OTA_UpdateClientMd5(h_ota, buff, rlen);
+ size -= rlen;
+ }
+ return Ret;
+#undef BUFF_LEN
+}
+
+static int _setup_connect_init_params(MQTTInitParams* initParams)
+{
+ int ret;
+
+ ret = HAL_GetDevInfo((void *)&sg_devInfo);
+ if (QCLOUD_RET_SUCCESS != ret) {
+ return ret;
+ }
+
+ initParams->device_name = sg_devInfo.device_name;
+ initParams->product_id = sg_devInfo.product_id;
+
+#ifdef AUTH_MODE_CERT
+ char certs_dir[PATH_MAX + 1] = "certs";
+ char current_path[PATH_MAX + 1];
+ char *cwd = getcwd(current_path, sizeof(current_path));
+ if (cwd == NULL) {
+ Log_e("getcwd return NULL");
+ return QCLOUD_ERR_FAILURE;
+ }
+ sprintf(sg_cert_file, "%s/%s/%s", current_path, certs_dir, sg_devInfo.dev_cert_file_name);
+ sprintf(sg_key_file, "%s/%s/%s", current_path, certs_dir, sg_devInfo.dev_key_file_name);
+
+ initParams->cert_file = sg_cert_file;
+ initParams->key_file = sg_key_file;
+#else
+ initParams->device_secret = sg_devInfo.device_secret;
+#endif
+
+
+ initParams->command_timeout = QCLOUD_IOT_MQTT_COMMAND_TIMEOUT;
+ initParams->keep_alive_interval_ms = QCLOUD_IOT_MQTT_KEEP_ALIVE_INTERNAL;
+ initParams->auto_connect_enable = 1;
+ initParams->event_handle.h_fp = event_handler;
+
+ return QCLOUD_RET_SUCCESS;
+}
+
+int ota_thread(int argc, char **argv)
+{
+ IOT_Log_Set_Level(eLOG_DEBUG);
+ int rc;
+ uint32_t firmware_valid;
+ static char version[128], md5sum[33];
+ uint32_t len, size_downloaded, size_file;
+
+ int ota_over = 0;
+ bool upgrade_fetch_success = true;
+ static char buf_ota[OTA_BUF_LEN];
+ FILE *fp = NULL;
+ uint32_t offset = 0;
+
+
+ MQTTInitParams init_params = DEFAULT_MQTTINIT_PARAMS;
+ rc = _setup_connect_init_params(&init_params);
+ if (rc != QCLOUD_RET_SUCCESS) {
+ Log_e("init params err,rc=%d", rc);
+ return rc;
+ }
+
+ void *client = IOT_MQTT_Construct(&init_params);
+ if (client != NULL) {
+ Log_i("Cloud Device Construct Success");
+ } else {
+ Log_e("Cloud Device Construct Failed");
+ return QCLOUD_ERR_FAILURE;
+ }
+
+ void *h_ota = IOT_OTA_Init(sg_devInfo.product_id, sg_devInfo.device_name, client);
+ if (NULL == h_ota) {
+ Log_e("initialize OTA failed");
+ return QCLOUD_ERR_FAILURE;
+ }
+
+ IOT_MQTT_Yield(client, 1000); //make sure subscribe success
+
+ char *local_ver = NULL, *local_md5 = NULL, *local_size = NULL, *reportVer = NULL;
+ reportVer = get_local_fw_version(&local_ver, &local_md5, &local_size);
+ Log_d("local_ver:%s local_md5:%s, local_size:%s", local_ver, local_md5, local_size);
+
+ /* Must report version first */
+ if (0 > IOT_OTA_ReportVersion(h_ota, (NULL == reportVer) ? "1.0.0" : reportVer)) {
+ Log_e("report OTA version failed");
+ goto exit;
+ }
+
+ do {
+ Log_i("wait for ota upgrade command...");
+
+ IOT_MQTT_Yield(client, 200);
+
+ if (IOT_OTA_IsFetching(h_ota)) {
+
+ /*check pre-download finished or not*/
+ /*if version & MD5 is the same,then pre-download not finished,get breakpoint continue download.otherwise the version is new*/
+ rc = getFwOffset(h_ota, local_ver, local_md5, local_size, &offset, &size_file);
+ if (QCLOUD_RET_SUCCESS != rc) {
+ Log_e("get fw offset err,rc:%d", rc);
+ upgrade_fetch_success = false;
+ break;
+ }
+
+ //finish download but not report state
+ if(offset == size_file) {
+ Log_d("download success last time without report!");
+ upgrade_fetch_success = true;
+
+ /* get fw information */
+ IOT_OTA_Ioctl(h_ota, IOT_OTAG_MD5SUM, md5sum, 33);
+ IOT_OTA_Ioctl(h_ota, IOT_OTAG_VERSION, version, 128);
+ size_downloaded = size_file;
+ break;
+ }
+
+ /*start http connect*/
+ rc = IOT_OTA_StartDownload(h_ota, offset, size_file);
+ if (QCLOUD_RET_SUCCESS != rc) {
+ Log_e("OTA download start err,rc:%d", rc);
+ upgrade_fetch_success = false;
+ break;
+ }
+
+ /*cal file md5*/
+ //Log_d("Get offset:%d(%x)", offset, offset);
+ if (offset > 0) {
+ if (NULL == (fp = fopen("ota.bin", "ab+"))) {
+ Log_e("open file failed");
+ upgrade_fetch_success = false;
+ break;
+ }
+
+ if (QCLOUD_RET_SUCCESS != cal_exist_fw_md5(h_ota, fp, offset)) {
+ Log_e("cal exist fw md5 failed");
+ upgrade_fetch_success = false;
+ break;
+ }
+
+ /*set offset*/
+ fseek(fp, offset, SEEK_SET);
+ } else {
+ if (NULL == (fp = fopen("ota.bin", "wb+"))) {
+ Log_e("open file failed");
+ upgrade_fetch_success = false;
+ break;
+ }
+ }
+
+
+ do {
+ len = IOT_OTA_FetchYield(h_ota, buf_ota, OTA_BUF_LEN, 1);
+ if (len > 0) {
+ if (1 != fwrite(buf_ota, len, 1, fp)) {
+ Log_e("write data to file failed");
+ upgrade_fetch_success = false;
+ break;
+ }
+ } else if (len < 0) {
+ Log_e("download fail rc=%d", len);
+ upgrade_fetch_success = false;
+ break;
+ }
+ fflush(fp);
+
+ /* get OTA information and update local info */
+ IOT_OTA_Ioctl(h_ota, IOT_OTAG_FETCHED_SIZE, &size_downloaded, 4);
+ IOT_OTA_Ioctl(h_ota, IOT_OTAG_FILE_SIZE, &size_file, 4);
+ IOT_OTA_Ioctl(h_ota, IOT_OTAG_MD5SUM, md5sum, 33);
+ IOT_OTA_Ioctl(h_ota, IOT_OTAG_VERSION, version, 128);
+ rc = update_local_fw_info(version, reportVer, md5sum, size_downloaded);
+ if (QCLOUD_RET_SUCCESS != rc) {
+ Log_e("update local fw info err,rc:%d", rc);
+ }
+
+ IOT_MQTT_Yield(client, 100);
+
+ } while (!IOT_OTA_IsFetchFinish(h_ota));
+
+ fclose(fp);
+ fp = NULL;
+
+ /* Must check MD5 match or not */
+ if (upgrade_fetch_success) {
+ IOT_OTA_Ioctl(h_ota, IOT_OTAG_CHECK_FIRMWARE, &firmware_valid, 4);
+ if (0 == firmware_valid) {
+ Log_e("The firmware is invalid");
+ upgrade_fetch_success = false;
+ rc = update_local_fw_info(NULL, reportVer, NULL, 0);
+ if (QCLOUD_RET_SUCCESS != rc) {
+ Log_e("update local fw info err,rc:%d", rc);
+ }
+ } else {
+ Log_i("The firmware is valid");
+ upgrade_fetch_success = true;
+ }
+ }
+
+ ota_over = 1;
+ }
+
+ HAL_SleepMs(2000);
+ } while (!ota_over);
+
+
+ if (upgrade_fetch_success) {
+ /* begin execute OTA files, should report upgrade begin */
+ sg_packet_id = IOT_OTA_ReportUpgradeBegin(h_ota);
+ if (0 > sg_packet_id) {
+ Log_e("report OTA begin failed error:%d", sg_packet_id);
+ return QCLOUD_ERR_FAILURE;
+ }
+ while (!sg_pub_ack) {
+ HAL_SleepMs(1000);
+ IOT_MQTT_Yield(client, 200);
+ }
+ sg_pub_ack = false;
+
+ //* add your own upgrade logic here*//
+ //* fw_upgrade.....
+
+ if (QCLOUD_RET_SUCCESS == rc) {
+ /* if upgrade success */
+ /* after execute OTA files, should report upgrade result */
+ sg_packet_id = IOT_OTA_ReportUpgradeSuccess(h_ota, NULL);
+ if (0 > sg_packet_id) {
+ Log_e("report OTA result failed error:%d", sg_packet_id);
+ return QCLOUD_ERR_FAILURE;
+ }
+ while (!sg_pub_ack) {
+ HAL_SleepMs(1000);
+ IOT_MQTT_Yield(client, 200);
+ }
+ rc = update_local_fw_info(version, version, md5sum, size_downloaded); // just for example, add your own logic
+ sg_pub_ack = false;
+
+ } else {
+ /* if upgrade fail */
+ sg_packet_id = IOT_OTA_ReportUpgradeFail(h_ota, NULL);
+ if (0 > sg_packet_id) {
+ Log_e("report OTA result failed error:%d", sg_packet_id);
+ return QCLOUD_ERR_FAILURE;
+ }
+ while (!sg_pub_ack) {
+ HAL_SleepMs(1000);
+ IOT_MQTT_Yield(client, 200);
+ }
+ rc = update_local_fw_info(NULL, reportVer, NULL, 0); // just for example, add your own logic
+ sg_pub_ack = false;
+
+ }
+ }
+
+exit:
+
+ if (NULL != fp) {
+ fclose(fp);
+ fp = NULL;
+ }
+
+ if (NULL != local_ver) {
+ reportVer = (reportVer == local_ver) ? NULL : reportVer;
+ HAL_Free(local_ver);
+ local_ver = NULL;
+ }
+
+ if (NULL != local_md5) {
+ HAL_Free(local_md5);
+ local_md5 = NULL;
+ }
+
+ if (NULL != local_size) {
+ HAL_Free(local_size);
+ local_size = NULL;
+ }
+
+ if (NULL != reportVer) {
+ HAL_Free(reportVer);
+ reportVer = NULL;
+ }
+
+ IOT_OTA_Destroy(h_ota);
+
+ IOT_MQTT_Destroy(&client);
+
+ return 0;
+}