diff --git a/board/NUCLEO_STM32L496ZG/BSP/Src/stm32l4xx_it.c b/board/NUCLEO_STM32L496ZG/BSP/Src/stm32l4xx_it.c
index 0728963b..f096877a 100644
--- a/board/NUCLEO_STM32L496ZG/BSP/Src/stm32l4xx_it.c
+++ b/board/NUCLEO_STM32L496ZG/BSP/Src/stm32l4xx_it.c
@@ -22,7 +22,7 @@
#include "main.h"
#include "stm32l4xx_it.h"
#include "tos_k.h"
-#include "tos_at.h"
+//#include "tos_at.h"
/* Private includes ----------------------------------------------------------*/
/* USER CODE BEGIN Includes */
/* USER CODE END Includes */
@@ -258,7 +258,7 @@ void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
extern uint8_t data;
if (huart->Instance == USART2) {
HAL_UART_Receive_IT(&huart2, &data, 1);
- tos_at_uart_input_byte(data);
+ //tos_at_uart_input_byte(data);
}
}
/* USER CODE END 1 */
diff --git a/board/NUCLEO_STM32L496ZG/BSP/Src/stm32l4xx_it_mqtt.c b/board/NUCLEO_STM32L496ZG/BSP/Src/stm32l4xx_it_mqtt.c
new file mode 100644
index 00000000..0728963b
--- /dev/null
+++ b/board/NUCLEO_STM32L496ZG/BSP/Src/stm32l4xx_it_mqtt.c
@@ -0,0 +1,265 @@
+/* USER CODE BEGIN Header */
+/**
+ ******************************************************************************
+ * @file stm32l4xx_it.c
+ * @brief Interrupt Service Routines.
+ ******************************************************************************
+ * @attention
+ *
+ *
© Copyright (c) 2019 STMicroelectronics.
+ * All rights reserved.
+ *
+ * This software component is licensed by ST under BSD 3-Clause license,
+ * the "License"; You may not use this file except in compliance with the
+ * License. You may obtain a copy of the License at:
+ * opensource.org/licenses/BSD-3-Clause
+ *
+ ******************************************************************************
+ */
+/* USER CODE END Header */
+
+/* Includes ------------------------------------------------------------------*/
+#include "main.h"
+#include "stm32l4xx_it.h"
+#include "tos_k.h"
+#include "tos_at.h"
+/* Private includes ----------------------------------------------------------*/
+/* USER CODE BEGIN Includes */
+/* USER CODE END Includes */
+
+/* Private typedef -----------------------------------------------------------*/
+/* USER CODE BEGIN TD */
+
+/* USER CODE END TD */
+
+/* Private define ------------------------------------------------------------*/
+/* USER CODE BEGIN PD */
+
+/* USER CODE END PD */
+
+/* Private macro -------------------------------------------------------------*/
+/* USER CODE BEGIN PM */
+
+/* USER CODE END PM */
+
+/* Private variables ---------------------------------------------------------*/
+/* USER CODE BEGIN PV */
+
+/* USER CODE END PV */
+
+/* Private function prototypes -----------------------------------------------*/
+/* USER CODE BEGIN PFP */
+
+/* USER CODE END PFP */
+
+/* Private user code ---------------------------------------------------------*/
+/* USER CODE BEGIN 0 */
+
+/* USER CODE END 0 */
+
+/* External variables --------------------------------------------------------*/
+extern UART_HandleTypeDef hlpuart1;
+extern UART_HandleTypeDef huart2;
+extern UART_HandleTypeDef huart3;
+/* USER CODE BEGIN EV */
+
+/* USER CODE END EV */
+
+/******************************************************************************/
+/* Cortex-M4 Processor Interruption and Exception Handlers */
+/******************************************************************************/
+/**
+ * @brief This function handles Non maskable interrupt.
+ */
+void NMI_Handler(void)
+{
+ /* USER CODE BEGIN NonMaskableInt_IRQn 0 */
+
+ /* USER CODE END NonMaskableInt_IRQn 0 */
+ /* USER CODE BEGIN NonMaskableInt_IRQn 1 */
+
+ /* USER CODE END NonMaskableInt_IRQn 1 */
+}
+
+/**
+ * @brief This function handles Hard fault interrupt.
+ */
+void HardFault_Handler(void)
+{
+ /* USER CODE BEGIN HardFault_IRQn 0 */
+
+ /* USER CODE END HardFault_IRQn 0 */
+ while (1)
+ {
+ /* USER CODE BEGIN W1_HardFault_IRQn 0 */
+ /* USER CODE END W1_HardFault_IRQn 0 */
+ }
+}
+
+/**
+ * @brief This function handles Memory management fault.
+ */
+void MemManage_Handler(void)
+{
+ /* USER CODE BEGIN MemoryManagement_IRQn 0 */
+
+ /* USER CODE END MemoryManagement_IRQn 0 */
+ while (1)
+ {
+ /* USER CODE BEGIN W1_MemoryManagement_IRQn 0 */
+ /* USER CODE END W1_MemoryManagement_IRQn 0 */
+ }
+}
+
+/**
+ * @brief This function handles Prefetch fault, memory access fault.
+ */
+void BusFault_Handler(void)
+{
+ /* USER CODE BEGIN BusFault_IRQn 0 */
+
+ /* USER CODE END BusFault_IRQn 0 */
+ while (1)
+ {
+ /* USER CODE BEGIN W1_BusFault_IRQn 0 */
+ /* USER CODE END W1_BusFault_IRQn 0 */
+ }
+}
+
+/**
+ * @brief This function handles Undefined instruction or illegal state.
+ */
+void UsageFault_Handler(void)
+{
+ /* USER CODE BEGIN UsageFault_IRQn 0 */
+
+ /* USER CODE END UsageFault_IRQn 0 */
+ while (1)
+ {
+ /* USER CODE BEGIN W1_UsageFault_IRQn 0 */
+ /* USER CODE END W1_UsageFault_IRQn 0 */
+ }
+}
+
+/**
+ * @brief This function handles System service call via SWI instruction.
+ */
+void SVC_Handler(void)
+{
+ /* USER CODE BEGIN SVCall_IRQn 0 */
+
+ /* USER CODE END SVCall_IRQn 0 */
+ /* USER CODE BEGIN SVCall_IRQn 1 */
+
+ /* USER CODE END SVCall_IRQn 1 */
+}
+
+/**
+ * @brief This function handles Debug monitor.
+ */
+void DebugMon_Handler(void)
+{
+ /* USER CODE BEGIN DebugMonitor_IRQn 0 */
+
+ /* USER CODE END DebugMonitor_IRQn 0 */
+ /* USER CODE BEGIN DebugMonitor_IRQn 1 */
+
+ /* USER CODE END DebugMonitor_IRQn 1 */
+}
+
+/**
+ * @brief This function handles Pendable request for system service.
+ */
+__weak void PendSV_Handler(void)
+{
+ /* USER CODE BEGIN PendSV_IRQn 0 */
+
+ /* USER CODE END PendSV_IRQn 0 */
+ /* USER CODE BEGIN PendSV_IRQn 1 */
+
+ /* USER CODE END PendSV_IRQn 1 */
+}
+
+/**
+ * @brief This function handles System tick timer.
+ */
+void SysTick_Handler(void)
+{
+ /* USER CODE BEGIN SysTick_IRQn 0 */
+
+ /* USER CODE END SysTick_IRQn 0 */
+ HAL_IncTick();
+ if (tos_knl_is_running())
+ {
+ tos_knl_irq_enter();
+ tos_tick_handler();
+ tos_knl_irq_leave();
+ }
+ //HAL_SYSTICK_IRQHandler();
+ /* USER CODE BEGIN SysTick_IRQn 1 */
+
+ /* USER CODE END SysTick_IRQn 1 */
+}
+
+/******************************************************************************/
+/* STM32L4xx Peripheral Interrupt Handlers */
+/* Add here the Interrupt Handlers for the used peripherals. */
+/* For the available peripheral interrupt handler names, */
+/* please refer to the startup file (startup_stm32l4xx.s). */
+/******************************************************************************/
+
+/**
+ * @brief This function handles USART2 global interrupt.
+ */
+void USART2_IRQHandler(void)
+{
+ /* USER CODE BEGIN USART2_IRQn 0 */
+
+ /* USER CODE END USART2_IRQn 0 */
+ HAL_UART_IRQHandler(&huart2);
+ /* USER CODE BEGIN USART2_IRQn 1 */
+
+ /* USER CODE END USART2_IRQn 1 */
+}
+
+/**
+ * @brief This function handles USART3 global interrupt.
+ */
+void USART3_IRQHandler(void)
+{
+ /* USER CODE BEGIN USART3_IRQn 0 */
+
+ /* USER CODE END USART3_IRQn 0 */
+ HAL_UART_IRQHandler(&huart3);
+ /* USER CODE BEGIN USART3_IRQn 1 */
+
+ /* USER CODE END USART3_IRQn 1 */
+}
+
+/**
+ * @brief This function handles LPUART1 global interrupt.
+ */
+void LPUART1_IRQHandler(void)
+{
+ /* USER CODE BEGIN LPUART1_IRQn 0 */
+
+ /* USER CODE END LPUART1_IRQn 0 */
+ tos_knl_irq_enter();
+ HAL_UART_IRQHandler(&hlpuart1);
+ tos_knl_irq_leave();
+ /* USER CODE BEGIN LPUART1_IRQn 1 */
+
+ /* USER CODE END LPUART1_IRQn 1 */
+}
+
+/* USER CODE BEGIN 1 */
+void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart)
+{
+ extern uint8_t data;
+ if (huart->Instance == USART2) {
+ HAL_UART_Receive_IT(&huart2, &data, 1);
+ tos_at_uart_input_byte(data);
+ }
+}
+/* USER CODE END 1 */
+/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
diff --git a/board/NUCLEO_STM32L496ZG/KEIL/aliyun_iotkit_csdk_mqtt/TencentOS_tiny.uvoptx b/board/NUCLEO_STM32L496ZG/KEIL/aliyun_iotkit_csdk_mqtt/TencentOS_tiny.uvoptx
index 405d34bc..a6051e4c 100644
--- a/board/NUCLEO_STM32L496ZG/KEIL/aliyun_iotkit_csdk_mqtt/TencentOS_tiny.uvoptx
+++ b/board/NUCLEO_STM32L496ZG/KEIL/aliyun_iotkit_csdk_mqtt/TencentOS_tiny.uvoptx
@@ -341,8 +341,8 @@
0
0
0
- ..\..\BSP\Src\stm32l4xx_it.c
- stm32l4xx_it.c
+ ..\..\BSP\Src\stm32l4xx_it_mqtt.c
+ stm32l4xx_it_mqtt.c
0
0
@@ -1553,7 +1553,7 @@
- mbedtls
+ mebdtls
0
0
0
diff --git a/board/NUCLEO_STM32L496ZG/KEIL/aliyun_iotkit_csdk_mqtt/TencentOS_tiny.uvprojx b/board/NUCLEO_STM32L496ZG/KEIL/aliyun_iotkit_csdk_mqtt/TencentOS_tiny.uvprojx
index 388f7706..9a1356a6 100644
--- a/board/NUCLEO_STM32L496ZG/KEIL/aliyun_iotkit_csdk_mqtt/TencentOS_tiny.uvprojx
+++ b/board/NUCLEO_STM32L496ZG/KEIL/aliyun_iotkit_csdk_mqtt/TencentOS_tiny.uvprojx
@@ -10,14 +10,14 @@
TencentOS_tiny
0x4
ARM-ADS
- 5060750::V5.06 update 6 (build 750)::ARMCC
+ 5060750::V5.06 update 6 (build 750)::.\ARMCC
0
STM32L496ZGTx
STMicroelectronics
- Keil.STM32L4xx_DFP.2.0.0
- http://www.keil.com/pack
+ Keil.STM32L4xx_DFP.2.4.0
+ http://www.keil.com/pack/
IRAM(0x20000000,0x00040000) IRAM2(0x10000000,0x00010000) IROM(0x08000000,0x00100000) CPUTYPE("Cortex-M4") FPU2 CLOCK(12000000) ELITTLE
@@ -185,6 +185,7 @@
0
2
0
+ 0
1
0
8
@@ -338,7 +339,7 @@
USE_HAL_DRIVER,STM32L496xx,PLATFORM_HAS_STDINT,INFRA_COMPAT,INFRA_LOG,INFRA_TIMER,INFRA_REPORT,INFRA_NET,INFRA_STRING,INFRA_SHA256,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;..\..\TOS-CONFIG;..\..\..\..\platform\arch\arm\cortex-m4\keil;..\..\..\..\kernel\pm\include;..\..\..\..\osal\cmsis_os;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc;..\..\BSP\Hardware\DHT11;..\..\BSP\Hardware\BH1750;..\..\BSP\Hardware\OLED;..\..\..\..\examples\helloworld;..\..\..\..\net\at\include;..\..\..\..\kernel\hal\include;..\..\..\..\net\sal_module_wrapper;..\..\..\..\examples\mqtt;..\..\..\..\devices\bc35_28_95;..\..\..\..\devices\esp8266;..\..\..\..\devices\m26;..\..\..\..\components\connectivity\iotkit-embedded-3.0.1\3rdparty\src\infra;..\..\..\..\components\connectivity\iotkit-embedded-3.0.1\3rdparty\src\dev_sign;..\..\..\..\components\connectivity\iotkit-embedded-3.0.1\3rdparty\src\mqtt;..\..\..\..\components\connectivity\iotkit-embedded-3.0.1\3rdparty\wrappers;..\..\..\..\components\security\mbedtls\3rdparty\include;..\..\..\..\components\security\mbedtls\wrapper\include
+ ..\..\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;..\..\TOS_CONFIG;..\..\..\..\platform\arch\arm\cortex-m4\keil;..\..\..\..\kernel\pm\include;..\..\..\..\osal\cmsis_os;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc;..\..\BSP\Hardware\DHT11;..\..\BSP\Hardware\BH1750;..\..\BSP\Hardware\OLED;..\..\..\..\examples\helloworld;..\..\..\..\net\at\include;..\..\..\..\kernel\hal\include;..\..\..\..\net\sal_module_wrapper;..\..\..\..\examples\mqtt;..\..\..\..\devices\bc35_28_95;..\..\..\..\devices\esp8266;..\..\..\..\devices\m26;..\..\..\..\components\connectivity\iotkit-embedded-3.0.1\3rdparty\src\infra;..\..\..\..\components\connectivity\iotkit-embedded-3.0.1\3rdparty\src\dev_sign;..\..\..\..\components\connectivity\iotkit-embedded-3.0.1\3rdparty\src\mqtt;..\..\..\..\components\connectivity\iotkit-embedded-3.0.1\3rdparty\wrappers;..\..\..\..\components\security\mbedtls\3rdparty\include;..\..\..\..\components\security\mbedtls\wrapper\include
@@ -351,7 +352,7 @@
0
0
0
- 0
+ 4
@@ -418,9 +419,9 @@
..\..\BSP\Src\usart.c
- stm32l4xx_it.c
+ stm32l4xx_it_mqtt.c
1
- ..\..\BSP\Src\stm32l4xx_it.c
+ ..\..\BSP\Src\stm32l4xx_it_mqtt.c
@@ -950,76 +951,7 @@
- mbedtls
-
-
- 0
- 0
- 0
- 0
- 0
- 0
- 2
- 2
- 2
- 2
- 11
-
-
- 1
-
-
-
- 2
- 0
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 0
- 2
- 2
- 2
- 2
- 2
- 0
- 0
- 2
- 2
- 2
- 2
- 2
-
-
-
-
-
-
-
-
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
- 2
-
-
-
-
-
-
-
-
-
+ mebdtls
aes.c
@@ -1453,4 +1385,19 @@
+
+
+
+ <Project Info>
+
+
+
+
+
+ 0
+ 1
+
+
+
+
diff --git a/board/NUCLEO_STM32L496ZG/KEIL/hello_world/TencentOS_tiny.uvoptx b/board/NUCLEO_STM32L496ZG/KEIL/hello_world/TencentOS_tiny.uvoptx
index 10118f1f..0e380e21 100644
--- a/board/NUCLEO_STM32L496ZG/KEIL/hello_world/TencentOS_tiny.uvoptx
+++ b/board/NUCLEO_STM32L496ZG/KEIL/hello_world/TencentOS_tiny.uvoptx
@@ -227,7 +227,7 @@
Application/MDK-ARM
- 1
+ 0
0
0
0
@@ -247,7 +247,7 @@
Application/User
- 0
+ 1
0
0
0
@@ -575,7 +575,7 @@
Drivers/CMSIS
- 1
+ 0
0
0
0
@@ -595,7 +595,7 @@
tos/arch
- 1
+ 0
0
0
0
@@ -639,7 +639,7 @@
tos/kernel
- 1
+ 0
0
0
0
@@ -935,7 +935,7 @@
tos/cmsis_os
- 1
+ 0
0
0
0
@@ -955,7 +955,7 @@
examples
- 1
+ 0
0
0
0
diff --git a/board/NUCLEO_STM32L496ZG/KEIL/hello_world/TencentOS_tiny.uvprojx b/board/NUCLEO_STM32L496ZG/KEIL/hello_world/TencentOS_tiny.uvprojx
index b7018163..061d5924 100644
--- a/board/NUCLEO_STM32L496ZG/KEIL/hello_world/TencentOS_tiny.uvprojx
+++ b/board/NUCLEO_STM32L496ZG/KEIL/hello_world/TencentOS_tiny.uvprojx
@@ -10,14 +10,14 @@
TencentOS_tiny
0x4
ARM-ADS
- 5060750::V5.06 update 6 (build 750)::ARMCC
+ 5060750::V5.06 update 6 (build 750)::.\ARMCC
0
STM32L496ZGTx
STMicroelectronics
- Keil.STM32L4xx_DFP.2.2.0
- http://www.keil.com/pack
+ Keil.STM32L4xx_DFP.2.4.0
+ http://www.keil.com/pack/
IRAM(0x20000000-0x2004FFFF) IROM(0x8000000-0x80FFFFF) CLOCK(8000000) FPU2 CPUTYPE("Cortex-M4")
@@ -185,6 +185,7 @@
0
2
0
+ 0
0
0
8
@@ -338,7 +339,7 @@
USE_HAL_DRIVER,STM32L496xx
- ..\..\BSP\Inc;..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Inc;..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Inc\Legacy;..\..\..\..\platform\vendor_bsp\st\CMSIS\Device\ST\STM32L4xx\Include;..\..\..\..\platform\vendor_bsp\st\CMSIS\Include;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc;..\..\..\..\kernel\core\include;..\..\..\..\kernel\pm\include;..\..\..\..\osal\cmsis_os;..\..\..\..\examples\hello_world;..\..\TOS_CONFIG
+ ..\..\BSP\Inc;..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Inc;..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Inc\Legacy;..\..\..\..\platform\vendor_bsp\st\CMSIS\Device\ST\STM32L4xx\Include;..\..\..\..\platform\vendor_bsp\st\CMSIS\Include;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc;..\..\..\..\kernel\core\include;..\..\..\..\kernel\pm\include;..\..\..\..\osal\cmsis_os;..\..\..\..\examples\hello_world;..\..\TOS_CONFIG;..\..\..\..\net\at\include;..\..\..\..\kernel\hal\include
@@ -351,7 +352,7 @@
0
0
0
- 0
+ 4
@@ -724,4 +725,19 @@
+
+
+
+ <Project Info>
+
+
+
+
+
+ 0
+ 1
+
+
+
+
diff --git a/board/NUCLEO_STM32L496ZG/TOS-CONFIG/tos_config.h b/board/NUCLEO_STM32L496ZG/TOS_CONFIG/tos_config.h
similarity index 100%
rename from board/NUCLEO_STM32L496ZG/TOS-CONFIG/tos_config.h
rename to board/NUCLEO_STM32L496ZG/TOS_CONFIG/tos_config.h