diff --git a/board/Fire_STM32F429/KEIL/mqttclient/TencentOS_tiny.uvprojx b/board/Fire_STM32F429/KEIL/mqttclient/TencentOS_tiny.uvprojx index f25ee76f..0ab638ee 100644 --- a/board/Fire_STM32F429/KEIL/mqttclient/TencentOS_tiny.uvprojx +++ b/board/Fire_STM32F429/KEIL/mqttclient/TencentOS_tiny.uvprojx @@ -16,7 +16,7 @@ STM32F429IGTx STMicroelectronics - Keil.STM32F4xx_DFP.2.9.0 + Keil.STM32F4xx_DFP.2.13.0 http://www.keil.com/pack IRAM(0x20000000-0x2002FFFF) IRAM2(0x10000000-0x1000FFFF) IROM(0x8000000-0x80FFFFF) CLOCK(25000000) FPU2 CPUTYPE("Cortex-M4") @@ -338,7 +338,7 @@ USE_HAL_DRIVER,STM32F429xx,MBEDTLS_CONFIG_FILE=<mbedtls_config.h>, - ..\..\BSP\Inc;..\..\..\..\platform\vendor_bsp\st\STM32F4xx_HAL_Driver\Inc;..\..\..\..\platform\vendor_bsp\st\STM32F4xx_HAL_Driver\Inc\Legacy;..\..\..\..\platform\vendor_bsp\st\CMSIS\Device\ST\STM32F4xx\Include;..\..\..\..\platform\vendor_bsp\st\CMSIS\Include;..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\TOS-CONFIG;..\..\..\..\kernel\core\include;..\..\..\..\kernel\pm\include;..\..\..\..\osal\cmsis_os;..\..\..\..\net\lwip;..\..\..\..\net\lwip\3rdparty\src\include;..\..\..\..\net\lwip\3rdparty\src\include\compat;..\..\..\..\net\lwip\3rdparty\src\include\lwip;..\..\..\..\net\lwip\3rdparty\src\include\netif;..\..\..\..\net\lwip\3rdparty\src\include\lwip\apps;..\..\..\..\net\lwip\3rdparty\src\include\lwip\priv;..\..\..\..\net\lwip\3rdparty\src\include\lwip\prot;..\..\..\..\net\lwip\port\include\arch;..\..\..\..\net\lwip\port\include;..\..\..\..\components\connectivity\mqttclient\common;..\..\..\..\components\connectivity\mqttclient\common\log;..\..\..\..\components\connectivity\mqttclient\mqtt;..\..\..\..\components\connectivity\mqttclient\mqttclient;..\..\..\..\components\connectivity\mqttclient\network;..\..\..\..\components\connectivity\mqttclient\platform\TencentOS-tiny;..\..\..\..\components\connectivity\mqttclient\common\mbedtls\configs;..\..\..\..\components\connectivity\mqttclient\common\mbedtls\wrapper;..\..\..\..\components\security\mbedtls\3rdparty\include;..\..\..\..\components\security\mbedtls\3rdparty\include\mbedtls + ..\..\BSP\Inc;..\..\..\..\platform\vendor_bsp\st\STM32F4xx_HAL_Driver\Inc;..\..\..\..\platform\vendor_bsp\st\STM32F4xx_HAL_Driver\Inc\Legacy;..\..\..\..\platform\vendor_bsp\st\CMSIS\Device\ST\STM32F4xx\Include;..\..\..\..\platform\vendor_bsp\st\CMSIS\Include;..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\TOS-CONFIG;..\..\..\..\kernel\core\include;..\..\..\..\kernel\pm\include;..\..\..\..\osal\cmsis_os;..\..\..\..\net\lwip;..\..\..\..\net\lwip\3rdparty\src\include;..\..\..\..\net\lwip\3rdparty\src\include\compat;..\..\..\..\net\lwip\3rdparty\src\include\lwip;..\..\..\..\net\lwip\3rdparty\src\include\netif;..\..\..\..\net\lwip\3rdparty\src\include\lwip\apps;..\..\..\..\net\lwip\3rdparty\src\include\lwip\priv;..\..\..\..\net\lwip\3rdparty\src\include\lwip\prot;..\..\..\..\net\lwip\port\include\arch;..\..\..\..\net\lwip\port\include;..\..\..\..\components\connectivity\mqttclient\common;..\..\..\..\components\connectivity\mqttclient\common\log;..\..\..\..\components\connectivity\mqttclient\mqtt;..\..\..\..\components\connectivity\mqttclient\mqttclient;..\..\..\..\components\connectivity\mqttclient\network;..\..\..\..\components\connectivity\mqttclient\network\mbedtls\configs;..\..\..\..\components\connectivity\mqttclient\network\mbedtls\wrapper;..\..\..\..\components\connectivity\mqttclient\platform\TencentOS-tiny;..\..\..\..\components\security\mbedtls\3rdparty\include;..\..\..\..\components\security\mbedtls\3rdparty\include\mbedtls @@ -1327,35 +1327,30 @@ 1 ..\..\..\..\components\connectivity\mqttclient\common\log\arch\tencentos-tiny\arch.c - - config.h - 5 - ..\..\..\..\components\connectivity\mqttclient\common\log\config.h - mqttclient/common - - list.c - 1 - ..\..\..\..\components\connectivity\mqttclient\common\list.c - random.c 1 ..\..\..\..\components\connectivity\mqttclient\common\random.c - log.h - 5 - ..\..\..\..\components\connectivity\mqttclient\common\log.h + mqtt_list.c + 1 + ..\..\..\..\components\connectivity\mqttclient\common\mqtt_list.c - error.h + mqtt_log.h 5 - ..\..\..\..\components\connectivity\mqttclient\common\error.h + ..\..\..\..\components\connectivity\mqttclient\common\mqtt_log.h + + + mqtt_error.h + 5 + ..\..\..\..\components\connectivity\mqttclient\common\mqtt_error.h @@ -1367,6 +1362,16 @@ 1 ..\..\..\..\components\connectivity\mqttclient\network\network.c + + nettype_tcp.c + 1 + ..\..\..\..\components\connectivity\mqttclient\network\nettype_tcp.c + + + nettype_tls.c + 1 + ..\..\..\..\components\connectivity\mqttclient\network\nettype_tls.c + @@ -1387,16 +1392,6 @@ 1 ..\..\..\..\components\connectivity\mqttclient\platform\TencentOS-tiny\platform_net_socket.c - - platform_nettype_tcp.c - 1 - ..\..\..\..\components\connectivity\mqttclient\platform\TencentOS-tiny\platform_nettype_tcp.c - - - platform_nettype_tls.c - 1 - ..\..\..\..\components\connectivity\mqttclient\platform\TencentOS-tiny\platform_nettype_tls.c - platform_thread.c 1 @@ -1415,17 +1410,17 @@ entropy_hardware_alt.c 1 - ..\..\..\..\components\connectivity\mqttclient\common\mbedtls\wrapper\entropy_hardware_alt.c + ..\..\..\..\components\connectivity\mqttclient\network\mbedtls\wrapper\entropy_hardware_alt.c net_sockets_alt.c 1 - ..\..\..\..\components\connectivity\mqttclient\common\mbedtls\wrapper\net_sockets_alt.c + ..\..\..\..\components\connectivity\mqttclient\network\mbedtls\wrapper\net_sockets_alt.c timing_alt.c 1 - ..\..\..\..\components\connectivity\mqttclient\common\mbedtls\wrapper\timing_alt.c + ..\..\..\..\components\connectivity\mqttclient\network\mbedtls\wrapper\timing_alt.c diff --git a/board/Fire_STM32F429/KEIL/mqttclient_iothub/TOS-CONFIG/mqtt_config.h b/board/Fire_STM32F429/KEIL/mqttclient_iothub/TOS-CONFIG/mqtt_config.h index 837ce94e..9cc0f35f 100644 --- a/board/Fire_STM32F429/KEIL/mqttclient_iothub/TOS-CONFIG/mqtt_config.h +++ b/board/Fire_STM32F429/KEIL/mqttclient_iothub/TOS-CONFIG/mqtt_config.h @@ -1,40 +1,39 @@ /* * @Author: jiejie * @Github: https://github.com/jiejieTop - * @Date: 2019-12-15 00:42:16 - * @LastEditTime: 2020-02-25 09:25:35 + * @LastEditTime: 2020-06-17 19:31:41 * @Description: the code belongs to jiejie, please keep the author information and source code according to the license. */ #ifndef _MQTT_CONFIG_H_ #define _MQTT_CONFIG_H_ -#define LOG_IS_SALOF +#define MQTT_LOG_IS_SALOF -#define LOG_LEVEL DEBUG_LEVEL //WARN_LEVEL DEBUG_LEVEL +#define MQTT_LOG_LEVEL MQTT_LOG_DEBUG_LEVEL //MQTT_LOG_WARN_LEVEL MQTT_LOG_DEBUG_LEVEL -#ifdef LOG_IS_SALOF - #define USE_LOG (1U) - #define USE_SALOF (1U) - #define SALOF_OS USE_TENCENTOS - #define USE_IDLE_HOOK (0U) - #define LOG_COLOR (0U) - #define LOG_TS (0U) - #define LOG_TAR (0U) - #define SALOF_BUFF_SIZE (512U) - #define SALOF_FIFO_SIZE (1024U) - #define SALOF_TASK_STACK_SIZE (1024U) - #define SALOF_TASK_TICK (50U) +#ifdef MQTT_LOG_IS_SALOF + #define SALOF_USING_LOG (1U) + #define SALOF_USING_SALOF (1U) + #define SALOF_LOG_LEVEL MQTT_LOG_LEVEL + #define SALOF_OS SALOF_USING_TENCENTOS + #define SALOF_USING_IDLE_HOOK (0U) + #define SALOF_LOG_COLOR (1U) + #define SALOF_LOG_TS (0U) + #define SALOF_LOG_TAR (0U) + #define SALOF_BUFF_SIZE 512 + #define SALOF_FIFO_SIZE 4096 + #define SALOF_TASK_STACK_SIZE 1024 + #define SALOF_TASK_TICK 50 #endif - #define MQTT_MAX_PACKET_ID (0xFFFF - 1) #define MQTT_TOPIC_LEN_MAX 64 #define MQTT_ACK_HANDLER_NUM_MAX 64 #define MQTT_DEFAULT_BUF_SIZE 1024 -#define MQTT_DEFAULT_CMD_TIMEOUT 4000 +#define MQTT_DEFAULT_CMD_TIMEOUT 5000 #define MQTT_MAX_CMD_TIMEOUT 20000 #define MQTT_MIN_CMD_TIMEOUT 1000 -#define MQTT_KEEP_ALIVE_INTERVAL 100 // unit: second +#define MQTT_KEEP_ALIVE_INTERVAL 50 // unit: second #define MQTT_VERSION 4 // 4 is mqtt 3.1.1 #define MQTT_RECONNECT_DEFAULT_DURATION 1000 #define MQTT_THREAD_STACK_SIZE 2048 @@ -42,6 +41,6 @@ #define MQTT_THREAD_TICK 50 -//#define MQTT_NETWORK_TYPE_TLS +#define MQTT_NETWORK_TYPE_NO_TLS #endif /* _MQTT_CONFIG_H_ */ diff --git a/board/Fire_STM32F429/KEIL/mqttclient_iothub/TencentOS_tiny.uvprojx b/board/Fire_STM32F429/KEIL/mqttclient_iothub/TencentOS_tiny.uvprojx index 6c842fa5..cbf793ec 100644 --- a/board/Fire_STM32F429/KEIL/mqttclient_iothub/TencentOS_tiny.uvprojx +++ b/board/Fire_STM32F429/KEIL/mqttclient_iothub/TencentOS_tiny.uvprojx @@ -16,7 +16,7 @@ STM32F429IGTx STMicroelectronics - Keil.STM32F4xx_DFP.2.9.0 + Keil.STM32F4xx_DFP.2.13.0 http://www.keil.com/pack IRAM(0x20000000-0x2002FFFF) IRAM2(0x10000000-0x1000FFFF) IROM(0x8000000-0x80FFFFF) CLOCK(25000000) FPU2 CPUTYPE("Cortex-M4") @@ -338,7 +338,7 @@ USE_HAL_DRIVER,STM32F429xx,MBEDTLS_CONFIG_FILE=<mbedtls_config.h>, - ..\..\BSP\Inc;..\..\..\..\platform\vendor_bsp\st\STM32F4xx_HAL_Driver\Inc;..\..\..\..\platform\vendor_bsp\st\STM32F4xx_HAL_Driver\Inc\Legacy;..\..\..\..\platform\vendor_bsp\st\CMSIS\Device\ST\STM32F4xx\Include;..\..\..\..\platform\vendor_bsp\st\CMSIS\Include;..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc;..\..\..\..\arch\arm\arm-v7m\common\include;.\TOS-CONFIG;..\..\..\..\kernel\core\include;..\..\..\..\kernel\pm\include;..\..\..\..\osal\cmsis_os;..\..\..\..\net\lwip;..\..\..\..\net\lwip\3rdparty\src\include;..\..\..\..\net\lwip\3rdparty\src\include\compat;..\..\..\..\net\lwip\3rdparty\src\include\lwip;..\..\..\..\net\lwip\3rdparty\src\include\netif;..\..\..\..\net\lwip\3rdparty\src\include\lwip\apps;..\..\..\..\net\lwip\3rdparty\src\include\lwip\priv;..\..\..\..\net\lwip\3rdparty\src\include\lwip\prot;..\..\..\..\net\lwip\port\include\arch;..\..\..\..\net\lwip\port\include;..\..\..\..\components\connectivity\mqttclient\common;..\..\..\..\components\connectivity\mqttclient\common\log;..\..\..\..\components\connectivity\mqttclient\mqtt;..\..\..\..\components\connectivity\mqttclient\mqttclient;..\..\..\..\components\connectivity\mqttclient\network;..\..\..\..\components\connectivity\mqttclient\platform\TencentOS-tiny;..\..\..\..\components\connectivity\mqttclient\common\mbedtls\wrapper;..\..\..\..\components\security\mbedtls\3rdparty\include;..\..\..\..\components\security\mbedtls\3rdparty\include\mbedtls + ..\..\BSP\Inc;..\..\..\..\platform\vendor_bsp\st\STM32F4xx_HAL_Driver\Inc;..\..\..\..\platform\vendor_bsp\st\STM32F4xx_HAL_Driver\Inc\Legacy;..\..\..\..\platform\vendor_bsp\st\CMSIS\Device\ST\STM32F4xx\Include;..\..\..\..\platform\vendor_bsp\st\CMSIS\Include;..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc;..\..\..\..\arch\arm\arm-v7m\common\include;.\TOS-CONFIG;..\..\..\..\kernel\core\include;..\..\..\..\kernel\pm\include;..\..\..\..\osal\cmsis_os;..\..\..\..\net\lwip;..\..\..\..\net\lwip\3rdparty\src\include;..\..\..\..\net\lwip\3rdparty\src\include\compat;..\..\..\..\net\lwip\3rdparty\src\include\lwip;..\..\..\..\net\lwip\3rdparty\src\include\netif;..\..\..\..\net\lwip\3rdparty\src\include\lwip\apps;..\..\..\..\net\lwip\3rdparty\src\include\lwip\priv;..\..\..\..\net\lwip\3rdparty\src\include\lwip\prot;..\..\..\..\net\lwip\port\include\arch;..\..\..\..\net\lwip\port\include;..\..\..\..\components\connectivity\mqttclient\common;..\..\..\..\components\connectivity\mqttclient\common\log;..\..\..\..\components\connectivity\mqttclient\mqtt;..\..\..\..\components\connectivity\mqttclient\mqttclient;..\..\..\..\components\connectivity\mqttclient\network;..\..\..\..\components\connectivity\mqttclient\platform\TencentOS-tiny;..\..\..\..\components\connectivity\mqttclient\network\mbedtls\wrapper;..\..\..\..\components\security\mbedtls\3rdparty\include;..\..\..\..\components\security\mbedtls\3rdparty\include\mbedtls @@ -1322,35 +1322,30 @@ 1 ..\..\..\..\components\connectivity\mqttclient\common\log\arch\tencentos-tiny\arch.c - - config.h - 5 - ..\..\..\..\components\connectivity\mqttclient\common\log\config.h - mqttclient/common - - list.c - 1 - ..\..\..\..\components\connectivity\mqttclient\common\list.c - random.c 1 ..\..\..\..\components\connectivity\mqttclient\common\random.c - log.h - 5 - ..\..\..\..\components\connectivity\mqttclient\common\log.h + mqtt_list.c + 1 + ..\..\..\..\components\connectivity\mqttclient\common\mqtt_list.c - error.h + mqtt_error.h 5 - ..\..\..\..\components\connectivity\mqttclient\common\error.h + ..\..\..\..\components\connectivity\mqttclient\common\mqtt_error.h + + + mqtt_log.h + 5 + ..\..\..\..\components\connectivity\mqttclient\common\mqtt_log.h @@ -1362,6 +1357,16 @@ 1 ..\..\..\..\components\connectivity\mqttclient\network\network.c + + nettype_tcp.c + 1 + ..\..\..\..\components\connectivity\mqttclient\network\nettype_tcp.c + + + nettype_tls.c + 1 + ..\..\..\..\components\connectivity\mqttclient\network\nettype_tls.c + @@ -1382,16 +1387,6 @@ 1 ..\..\..\..\components\connectivity\mqttclient\platform\TencentOS-tiny\platform_net_socket.c - - platform_nettype_tcp.c - 1 - ..\..\..\..\components\connectivity\mqttclient\platform\TencentOS-tiny\platform_nettype_tcp.c - - - platform_nettype_tls.c - 1 - ..\..\..\..\components\connectivity\mqttclient\platform\TencentOS-tiny\platform_nettype_tls.c - platform_thread.c 1 @@ -1810,17 +1805,17 @@ entropy_hardware_alt.c 1 - ..\..\..\..\components\connectivity\mqttclient\common\mbedtls\wrapper\entropy_hardware_alt.c + ..\..\..\..\components\connectivity\mqttclient\network\mbedtls\wrapper\entropy_hardware_alt.c net_sockets_alt.c 1 - ..\..\..\..\components\connectivity\mqttclient\common\mbedtls\wrapper\net_sockets_alt.c + ..\..\..\..\components\connectivity\mqttclient\network\mbedtls\wrapper\net_sockets_alt.c timing_alt.c 1 - ..\..\..\..\components\connectivity\mqttclient\common\mbedtls\wrapper\timing_alt.c + ..\..\..\..\components\connectivity\mqttclient\network\mbedtls\wrapper\timing_alt.c diff --git a/board/Fire_STM32F429/TOS-CONFIG/mqtt_config.h b/board/Fire_STM32F429/TOS-CONFIG/mqtt_config.h index e99e7ce6..573d9212 100644 --- a/board/Fire_STM32F429/TOS-CONFIG/mqtt_config.h +++ b/board/Fire_STM32F429/TOS-CONFIG/mqtt_config.h @@ -1,40 +1,39 @@ /* * @Author: jiejie * @Github: https://github.com/jiejieTop - * @Date: 2019-12-15 00:42:16 - * @LastEditTime: 2020-02-25 09:25:35 + * @LastEditTime: 2020-06-17 19:31:41 * @Description: the code belongs to jiejie, please keep the author information and source code according to the license. */ #ifndef _MQTT_CONFIG_H_ #define _MQTT_CONFIG_H_ -#define LOG_IS_SALOF +#define MQTT_LOG_IS_SALOF -#define LOG_LEVEL DEBUG_LEVEL //WARN_LEVEL DEBUG_LEVEL +#define MQTT_LOG_LEVEL MQTT_LOG_DEBUG_LEVEL //MQTT_LOG_WARN_LEVEL MQTT_LOG_DEBUG_LEVEL -#ifdef LOG_IS_SALOF - #define USE_LOG (1U) - #define USE_SALOF (1U) - #define SALOF_OS USE_TENCENTOS - #define USE_IDLE_HOOK (0U) - #define LOG_COLOR (0U) - #define LOG_TS (0U) - #define LOG_TAR (0U) - #define SALOF_BUFF_SIZE (512U) - #define SALOF_FIFO_SIZE (1024U) - #define SALOF_TASK_STACK_SIZE (1024U) - #define SALOF_TASK_TICK (50U) +#ifdef MQTT_LOG_IS_SALOF + #define SALOF_USING_LOG (1U) + #define SALOF_USING_SALOF (1U) + #define SALOF_LOG_LEVEL MQTT_LOG_LEVEL + #define SALOF_OS SALOF_USING_TENCENTOS + #define SALOF_USING_IDLE_HOOK (0U) + #define SALOF_LOG_COLOR (1U) + #define SALOF_LOG_TS (0U) + #define SALOF_LOG_TAR (0U) + #define SALOF_BUFF_SIZE 512 + #define SALOF_FIFO_SIZE 4096 + #define SALOF_TASK_STACK_SIZE 1024 + #define SALOF_TASK_TICK 50 #endif - #define MQTT_MAX_PACKET_ID (0xFFFF - 1) #define MQTT_TOPIC_LEN_MAX 64 #define MQTT_ACK_HANDLER_NUM_MAX 64 #define MQTT_DEFAULT_BUF_SIZE 1024 -#define MQTT_DEFAULT_CMD_TIMEOUT 4000 +#define MQTT_DEFAULT_CMD_TIMEOUT 5000 #define MQTT_MAX_CMD_TIMEOUT 20000 #define MQTT_MIN_CMD_TIMEOUT 1000 -#define MQTT_KEEP_ALIVE_INTERVAL 100 // unit: second +#define MQTT_KEEP_ALIVE_INTERVAL 50 // unit: second #define MQTT_VERSION 4 // 4 is mqtt 3.1.1 #define MQTT_RECONNECT_DEFAULT_DURATION 1000 #define MQTT_THREAD_STACK_SIZE 2048 @@ -42,6 +41,6 @@ #define MQTT_THREAD_TICK 50 -#define MQTT_NETWORK_TYPE_TLS +// #define MQTT_NETWORK_TYPE_NO_TLS #endif /* _MQTT_CONFIG_H_ */