diff --git a/board/NUCLEO_STM32L073RZ/BSP/Inc/main.h b/board/NUCLEO_STM32L073RZ/BSP/Inc/main.h index e91da9d5..f00b30e9 100644 --- a/board/NUCLEO_STM32L073RZ/BSP/Inc/main.h +++ b/board/NUCLEO_STM32L073RZ/BSP/Inc/main.h @@ -58,10 +58,20 @@ void Error_Handler(void); /* USER CODE END EFP */ /* Private defines -----------------------------------------------------------*/ -#define KEY_Pin GPIO_PIN_13 -#define KEY_GPIO_Port GPIOC -#define LED_Pin GPIO_PIN_5 -#define LED_GPIO_Port GPIOA +#define KEY1_Pin GPIO_PIN_13 +#define KEY1_GPIO_Port GPIOC +#define MCO_Pin GPIO_PIN_0 +#define MCO_GPIO_Port GPIOH +#define USART_TX_Pin GPIO_PIN_2 +#define USART_TX_GPIO_Port GPIOA +#define USART_RX_Pin GPIO_PIN_3 +#define USART_RX_GPIO_Port GPIOA +#define LD2_Pin GPIO_PIN_5 +#define LD2_GPIO_Port GPIOA +#define TMS_Pin GPIO_PIN_13 +#define TMS_GPIO_Port GPIOA +#define TCK_Pin GPIO_PIN_14 +#define TCK_GPIO_Port GPIOA /* USER CODE BEGIN Private defines */ /* USER CODE END Private defines */ diff --git a/board/NUCLEO_STM32L073RZ/BSP/Inc/stm32l0xx_it.h b/board/NUCLEO_STM32L073RZ/BSP/Inc/stm32l0xx_it.h index 78b497c8..2156c46d 100644 --- a/board/NUCLEO_STM32L073RZ/BSP/Inc/stm32l0xx_it.h +++ b/board/NUCLEO_STM32L073RZ/BSP/Inc/stm32l0xx_it.h @@ -52,6 +52,8 @@ void HardFault_Handler(void); void SVC_Handler(void); void PendSV_Handler(void); void SysTick_Handler(void); +void USART1_IRQHandler(void); +void USART2_IRQHandler(void); /* USER CODE BEGIN EFP */ /* USER CODE END EFP */ diff --git a/board/NUCLEO_STM32L073RZ/BSP/Inc/usart.h b/board/NUCLEO_STM32L073RZ/BSP/Inc/usart.h index 6d0a9c58..011f71cf 100644 --- a/board/NUCLEO_STM32L073RZ/BSP/Inc/usart.h +++ b/board/NUCLEO_STM32L073RZ/BSP/Inc/usart.h @@ -30,12 +30,14 @@ /* USER CODE END Includes */ +extern UART_HandleTypeDef huart1; extern UART_HandleTypeDef huart2; /* USER CODE BEGIN Private defines */ /* USER CODE END Private defines */ +void MX_USART1_UART_Init(void); void MX_USART2_UART_Init(void); /* USER CODE BEGIN Prototypes */ diff --git a/board/NUCLEO_STM32L073RZ/BSP/Src/gpio.c b/board/NUCLEO_STM32L073RZ/BSP/Src/gpio.c index 3e5b7a99..3d1468a4 100644 --- a/board/NUCLEO_STM32L073RZ/BSP/Src/gpio.c +++ b/board/NUCLEO_STM32L073RZ/BSP/Src/gpio.c @@ -48,20 +48,20 @@ void MX_GPIO_Init(void) __HAL_RCC_GPIOA_CLK_ENABLE(); /*Configure GPIO pin Output Level */ - HAL_GPIO_WritePin(LED_GPIO_Port, LED_Pin, GPIO_PIN_RESET); + HAL_GPIO_WritePin(LD2_GPIO_Port, LD2_Pin, GPIO_PIN_RESET); /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = KEY_Pin; - GPIO_InitStruct.Mode = GPIO_MODE_IT_RISING; + GPIO_InitStruct.Pin = KEY1_Pin; + GPIO_InitStruct.Mode = GPIO_MODE_IT_FALLING; GPIO_InitStruct.Pull = GPIO_NOPULL; - HAL_GPIO_Init(KEY_GPIO_Port, &GPIO_InitStruct); + HAL_GPIO_Init(KEY1_GPIO_Port, &GPIO_InitStruct); /*Configure GPIO pin : PtPin */ - GPIO_InitStruct.Pin = LED_Pin; + GPIO_InitStruct.Pin = LD2_Pin; GPIO_InitStruct.Mode = GPIO_MODE_OUTPUT_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_LOW; - HAL_GPIO_Init(LED_GPIO_Port, &GPIO_InitStruct); + HAL_GPIO_Init(LD2_GPIO_Port, &GPIO_InitStruct); } diff --git a/board/NUCLEO_STM32L073RZ/BSP/Src/mcu_init.c b/board/NUCLEO_STM32L073RZ/BSP/Src/mcu_init.c index 0ea99e33..b1222b5c 100644 --- a/board/NUCLEO_STM32L073RZ/BSP/Src/mcu_init.c +++ b/board/NUCLEO_STM32L073RZ/BSP/Src/mcu_init.c @@ -32,6 +32,7 @@ void board_init(void) HAL_Init(); SystemClock_Config(); MX_GPIO_Init(); + //MX_USART1_UART_Init(); MX_USART2_UART_Init(); } diff --git a/board/NUCLEO_STM32L073RZ/BSP/Src/stm32l0xx_it.c b/board/NUCLEO_STM32L073RZ/BSP/Src/stm32l0xx_it.c index 8eaab39e..e23307be 100644 --- a/board/NUCLEO_STM32L073RZ/BSP/Src/stm32l0xx_it.c +++ b/board/NUCLEO_STM32L073RZ/BSP/Src/stm32l0xx_it.c @@ -57,7 +57,8 @@ /* USER CODE END 0 */ /* External variables --------------------------------------------------------*/ - +extern UART_HandleTypeDef huart1; +extern UART_HandleTypeDef huart2; /* USER CODE BEGIN EV */ /* USER CODE END EV */ @@ -146,6 +147,34 @@ void SysTick_Handler(void) /* please refer to the startup file (startup_stm32l0xx.s). */ /******************************************************************************/ +/** + * @brief This function handles USART1 global interrupt / USART1 wake-up interrupt through EXTI line 25. + */ +void USART1_IRQHandler(void) +{ + /* USER CODE BEGIN USART1_IRQn 0 */ + + /* USER CODE END USART1_IRQn 0 */ + HAL_UART_IRQHandler(&huart1); + /* USER CODE BEGIN USART1_IRQn 1 */ + + /* USER CODE END USART1_IRQn 1 */ +} + +/** + * @brief This function handles USART2 global interrupt / USART2 wake-up interrupt through EXTI line 26. + */ +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 */ +} + /* USER CODE BEGIN 1 */ /* USER CODE END 1 */ diff --git a/board/NUCLEO_STM32L073RZ/BSP/Src/stm32l0xx_it_lorawan.c b/board/NUCLEO_STM32L073RZ/BSP/Src/stm32l0xx_it_lorawan.c new file mode 100644 index 00000000..2e0146a7 --- /dev/null +++ b/board/NUCLEO_STM32L073RZ/BSP/Src/stm32l0xx_it_lorawan.c @@ -0,0 +1,189 @@ +/* USER CODE BEGIN Header */ +/** + ****************************************************************************** + * @file stm32l0xx_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 "stm32l0xx_it.h" +#include "tos.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 huart1; +extern UART_HandleTypeDef huart2; +/* USER CODE BEGIN EV */ + +/* USER CODE END EV */ + +/******************************************************************************/ +/* Cortex-M0+ 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 System service call via SWI instruction. + */ +void SVC_Handler(void) +{ + /* USER CODE BEGIN SVC_IRQn 0 */ + + /* USER CODE END SVC_IRQn 0 */ + /* USER CODE BEGIN SVC_IRQn 1 */ + + /* USER CODE END SVC_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(); + } + /* USER CODE BEGIN SysTick_IRQn 1 */ + + /* USER CODE END SysTick_IRQn 1 */ +} + +/******************************************************************************/ +/* STM32L0xx 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_stm32l0xx.s). */ +/******************************************************************************/ + +/** + * @brief This function handles USART1 global interrupt / USART1 wake-up interrupt through EXTI line 25. + */ +void USART1_IRQHandler(void) +{ + /* USER CODE BEGIN USART1_IRQn 0 */ + + /* USER CODE END USART1_IRQn 0 */ + HAL_UART_IRQHandler(&huart1); + /* USER CODE BEGIN USART1_IRQn 1 */ + + /* USER CODE END USART1_IRQn 1 */ +} + +/** + * @brief This function handles USART2 global interrupt / USART2 wake-up interrupt through EXTI line 26. + */ +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 */ +} + +/* USER CODE BEGIN 1 */ +void HAL_UART_RxCpltCallback(UART_HandleTypeDef *huart) +{ + extern uint8_t data; + if (huart->Instance == USART1) { + HAL_UART_Receive_IT(&huart1, &data, 1); + tos_at_uart_write_byte(data); + } +} +/* USER CODE END 1 */ +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/board/NUCLEO_STM32L073RZ/BSP/Src/usart.c b/board/NUCLEO_STM32L073RZ/BSP/Src/usart.c index 15c37487..7ee060bd 100644 --- a/board/NUCLEO_STM32L073RZ/BSP/Src/usart.c +++ b/board/NUCLEO_STM32L073RZ/BSP/Src/usart.c @@ -21,11 +21,33 @@ #include "usart.h" /* USER CODE BEGIN 0 */ - +uint8_t data; /* USER CODE END 0 */ +UART_HandleTypeDef huart1; UART_HandleTypeDef huart2; +/* USART1 init function */ + +void MX_USART1_UART_Init(void) +{ + + huart1.Instance = USART1; + huart1.Init.BaudRate = 9600; + huart1.Init.WordLength = UART_WORDLENGTH_8B; + huart1.Init.StopBits = UART_STOPBITS_1; + huart1.Init.Parity = UART_PARITY_NONE; + huart1.Init.Mode = UART_MODE_TX_RX; + huart1.Init.HwFlowCtl = UART_HWCONTROL_NONE; + huart1.Init.OverSampling = UART_OVERSAMPLING_16; + huart1.Init.OneBitSampling = UART_ONE_BIT_SAMPLE_DISABLE; + huart1.AdvancedInit.AdvFeatureInit = UART_ADVFEATURE_NO_INIT; + if (HAL_UART_Init(&huart1) != HAL_OK) + { + Error_Handler(); + } + HAL_UART_Receive_IT(&huart1, &data, 1); +} /* USART2 init function */ void MX_USART2_UART_Init(void) @@ -52,7 +74,34 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle) { GPIO_InitTypeDef GPIO_InitStruct = {0}; - if(uartHandle->Instance==USART2) + if(uartHandle->Instance==USART1) + { + /* USER CODE BEGIN USART1_MspInit 0 */ + + /* USER CODE END USART1_MspInit 0 */ + /* USART1 clock enable */ + __HAL_RCC_USART1_CLK_ENABLE(); + + __HAL_RCC_GPIOA_CLK_ENABLE(); + /**USART1 GPIO Configuration + PA9 ------> USART1_TX + PA10 ------> USART1_RX + */ + GPIO_InitStruct.Pin = GPIO_PIN_9|GPIO_PIN_10; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF4_USART1; + HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + + /* USART1 interrupt Init */ + HAL_NVIC_SetPriority(USART1_IRQn, 0, 0); + HAL_NVIC_EnableIRQ(USART1_IRQn); + /* USER CODE BEGIN USART1_MspInit 1 */ + + /* USER CODE END USART1_MspInit 1 */ + } + else if(uartHandle->Instance==USART2) { /* USER CODE BEGIN USART2_MspInit 0 */ @@ -65,13 +114,16 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle) PA2 ------> USART2_TX PA3 ------> USART2_RX */ - GPIO_InitStruct.Pin = GPIO_PIN_2|GPIO_PIN_3; + GPIO_InitStruct.Pin = USART_TX_Pin|USART_RX_Pin; GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; GPIO_InitStruct.Pull = GPIO_NOPULL; GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; GPIO_InitStruct.Alternate = GPIO_AF4_USART2; HAL_GPIO_Init(GPIOA, &GPIO_InitStruct); + /* USART2 interrupt Init */ + HAL_NVIC_SetPriority(USART2_IRQn, 0, 0); + HAL_NVIC_EnableIRQ(USART2_IRQn); /* USER CODE BEGIN USART2_MspInit 1 */ /* USER CODE END USART2_MspInit 1 */ @@ -81,7 +133,27 @@ void HAL_UART_MspInit(UART_HandleTypeDef* uartHandle) void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle) { - if(uartHandle->Instance==USART2) + if(uartHandle->Instance==USART1) + { + /* USER CODE BEGIN USART1_MspDeInit 0 */ + + /* USER CODE END USART1_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_USART1_CLK_DISABLE(); + + /**USART1 GPIO Configuration + PA9 ------> USART1_TX + PA10 ------> USART1_RX + */ + HAL_GPIO_DeInit(GPIOA, GPIO_PIN_9|GPIO_PIN_10); + + /* USART1 interrupt Deinit */ + HAL_NVIC_DisableIRQ(USART1_IRQn); + /* USER CODE BEGIN USART1_MspDeInit 1 */ + + /* USER CODE END USART1_MspDeInit 1 */ + } + else if(uartHandle->Instance==USART2) { /* USER CODE BEGIN USART2_MspDeInit 0 */ @@ -93,8 +165,10 @@ void HAL_UART_MspDeInit(UART_HandleTypeDef* uartHandle) PA2 ------> USART2_TX PA3 ------> USART2_RX */ - HAL_GPIO_DeInit(GPIOA, GPIO_PIN_2|GPIO_PIN_3); + HAL_GPIO_DeInit(GPIOA, USART_TX_Pin|USART_RX_Pin); + /* USART2 interrupt Deinit */ + HAL_NVIC_DisableIRQ(USART2_IRQn); /* USER CODE BEGIN USART2_MspDeInit 1 */ /* USER CODE END USART2_MspDeInit 1 */ diff --git a/board/NUCLEO_STM32L073RZ/KEIL/hello_world/TencentOS_tiny.uvoptx b/board/NUCLEO_STM32L073RZ/KEIL/hello_world/TencentOS_tiny.uvoptx index dbd04e23..c203a4e9 100644 --- a/board/NUCLEO_STM32L073RZ/KEIL/hello_world/TencentOS_tiny.uvoptx +++ b/board/NUCLEO_STM32L073RZ/KEIL/hello_world/TencentOS_tiny.uvoptx @@ -125,7 +125,7 @@ 0 ST-LINKIII-KEIL_SWO - -U-O142 -O2254 -S0 -C0 -N00("ARM CoreSight SW-DP") -D00(2BA01477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO7 -FD20000000 -FC800 -FN1 -STM32L0xx_192.FLM -FS08000000 -FL030000 -FP0($$Device:STM32L073RZTx$CMSIS\Flash\STM32L0xx_192.FLM) + -U066EFF515254667267072614 -O2254 -SF4000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP") -D00(0BC11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC800 -FN1 -FF0STM32L0xx_192.FLM -FS08000000 -FL030000 -FP0($$Device:STM32L073RZTx$CMSIS\Flash\STM32L0xx_192.FLM) @@ -203,7 +203,7 @@ Application/User - 0 + 1 0 0 0 @@ -250,8 +250,8 @@ 0 0 0 - ..\..\BSP\Src\stm32l0xx_it.c - stm32l0xx_it.c + ..\..\BSP\Src\usart.c + usart.c 0 0 @@ -262,8 +262,8 @@ 0 0 0 - ..\..\BSP\Src\usart.c - usart.c + ..\..\BSP\Src\mcu_init.c + mcu_init.c 0 0 @@ -274,8 +274,8 @@ 0 0 0 - ..\..\BSP\Src\mcu_init.c - mcu_init.c + ..\..\BSP\Src\stm32l0xx_it.c + stm32l0xx_it.c 0 0 diff --git a/board/NUCLEO_STM32L073RZ/KEIL/hello_world/TencentOS_tiny.uvprojx b/board/NUCLEO_STM32L073RZ/KEIL/hello_world/TencentOS_tiny.uvprojx index 25964341..c600b1ef 100644 --- a/board/NUCLEO_STM32L073RZ/KEIL/hello_world/TencentOS_tiny.uvprojx +++ b/board/NUCLEO_STM32L073RZ/KEIL/hello_world/TencentOS_tiny.uvprojx @@ -407,11 +407,6 @@ 1 ..\..\BSP\Src\stm32l0xx_hal_msp.c - - stm32l0xx_it.c - 1 - ..\..\BSP\Src\stm32l0xx_it.c - usart.c 1 @@ -422,6 +417,11 @@ 1 ..\..\BSP\Src\mcu_init.c + + stm32l0xx_it.c + 1 + ..\..\BSP\Src\stm32l0xx_it.c + diff --git a/board/NUCLEO_STM32L073RZ/KEIL/lorawan/TencentOS_tiny.uvoptx b/board/NUCLEO_STM32L073RZ/KEIL/lorawan/TencentOS_tiny.uvoptx new file mode 100644 index 00000000..7f620d48 --- /dev/null +++ b/board/NUCLEO_STM32L073RZ/KEIL/lorawan/TencentOS_tiny.uvoptx @@ -0,0 +1,904 @@ + + + + 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 + + 32000000 + + 1 + 1 + 0 + 1 + 0 + + + 1 + 65535 + 0 + 0 + 0 + + + 79 + 66 + 8 + + + + 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 + UL2CM3 + UL2CM3(-S0 -C0 -P0 -FD20000000 -FC1000 -FN1 -FF0STM32L0xx_192 -FS08000000 -FL030000 -FP0($$Device:STM32L073RZTx$CMSIS\Flash\STM32L0xx_192.FLM)) + + + 0 + ST-LINKIII-KEIL_SWO + -U066EFF515254667267072614 -O2254 -SF4000 -C0 -A0 -I0 -HNlocalhost -HP7184 -P1 -N00("ARM CoreSight SW-DP") -D00(0BC11477) -L00(0) -TO18 -TC10000000 -TP21 -TDS8007 -TDT0 -TDC1F -TIEFFFFFFFF -TIP8 -FO15 -FD20000000 -FC800 -FN1 -FF0STM32L0xx_192.FLM -FS08000000 -FL030000 -FP0($$Device:STM32L073RZTx$CMSIS\Flash\STM32L0xx_192.FLM) + + + + + 0 + + + 0 + 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 + + + + + + + + + + 1 + 1 + 0 + 2 + 10000000 + + + + + + Application/MDK-ARM + 0 + 0 + 0 + 0 + + 1 + 1 + 2 + 0 + 0 + 0 + startup_stm32l073xx.s + startup_stm32l073xx.s + 0 + 0 + + + + + Application/User + 1 + 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\stm32l0xx_hal_msp.c + stm32l0xx_hal_msp.c + 0 + 0 + + + 2 + 5 + 1 + 0 + 0 + 0 + ..\..\BSP\Src\usart.c + usart.c + 0 + 0 + + + 2 + 6 + 1 + 0 + 0 + 0 + ..\..\BSP\Src\mcu_init.c + mcu_init.c + 0 + 0 + + + 2 + 7 + 1 + 0 + 0 + 0 + ..\..\BSP\Src\stm32l0xx_it_lorawan.c + stm32l0xx_it_lorawan.c + 0 + 0 + + + + + Drivers/STM32L0xx_HAL_Driver + 0 + 0 + 0 + 0 + + 3 + 8 + 1 + 0 + 0 + 0 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_tim.c + stm32l0xx_hal_tim.c + 0 + 0 + + + 3 + 9 + 1 + 0 + 0 + 0 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_tim_ex.c + stm32l0xx_hal_tim_ex.c + 0 + 0 + + + 3 + 10 + 1 + 0 + 0 + 0 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_uart.c + stm32l0xx_hal_uart.c + 0 + 0 + + + 3 + 11 + 1 + 0 + 0 + 0 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_uart_ex.c + stm32l0xx_hal_uart_ex.c + 0 + 0 + + + 3 + 12 + 1 + 0 + 0 + 0 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal.c + stm32l0xx_hal.c + 0 + 0 + + + 3 + 13 + 1 + 0 + 0 + 0 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_i2c.c + stm32l0xx_hal_i2c.c + 0 + 0 + + + 3 + 14 + 1 + 0 + 0 + 0 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_i2c_ex.c + stm32l0xx_hal_i2c_ex.c + 0 + 0 + + + 3 + 15 + 1 + 0 + 0 + 0 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_rcc.c + stm32l0xx_hal_rcc.c + 0 + 0 + + + 3 + 16 + 1 + 0 + 0 + 0 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_rcc_ex.c + stm32l0xx_hal_rcc_ex.c + 0 + 0 + + + 3 + 17 + 1 + 0 + 0 + 0 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_flash_ramfunc.c + stm32l0xx_hal_flash_ramfunc.c + 0 + 0 + + + 3 + 18 + 1 + 0 + 0 + 0 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_flash.c + stm32l0xx_hal_flash.c + 0 + 0 + + + 3 + 19 + 1 + 0 + 0 + 0 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_flash_ex.c + stm32l0xx_hal_flash_ex.c + 0 + 0 + + + 3 + 20 + 1 + 0 + 0 + 0 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_gpio.c + stm32l0xx_hal_gpio.c + 0 + 0 + + + 3 + 21 + 1 + 0 + 0 + 0 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_dma.c + stm32l0xx_hal_dma.c + 0 + 0 + + + 3 + 22 + 1 + 0 + 0 + 0 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_pwr.c + stm32l0xx_hal_pwr.c + 0 + 0 + + + 3 + 23 + 1 + 0 + 0 + 0 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_pwr_ex.c + stm32l0xx_hal_pwr_ex.c + 0 + 0 + + + 3 + 24 + 1 + 0 + 0 + 0 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_cortex.c + stm32l0xx_hal_cortex.c + 0 + 0 + + + + + Drivers/CMSIS + 0 + 0 + 0 + 0 + + 4 + 25 + 1 + 0 + 0 + 0 + ..\..\BSP\Src\system_stm32l0xx.c + system_stm32l0xx.c + 0 + 0 + + + + + tos/arch + 0 + 0 + 0 + 0 + + 5 + 26 + 1 + 0 + 0 + 0 + ..\..\..\..\arch\arm\arm-v7m\common\tos_cpu.c + tos_cpu.c + 0 + 0 + + + 5 + 27 + 1 + 0 + 0 + 0 + ..\..\..\..\arch\arm\arm-v7m\cortex-m0+\armcc\port_c.c + port_c.c + 0 + 0 + + + 5 + 28 + 2 + 0 + 0 + 0 + ..\..\..\..\arch\arm\arm-v7m\cortex-m0+\armcc\port_s.S + port_s.S + 0 + 0 + + + + + tos/kernel + 0 + 0 + 0 + 0 + + 6 + 29 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_event.c + tos_event.c + 0 + 0 + + + 6 + 30 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_fifo.c + tos_fifo.c + 0 + 0 + + + 6 + 31 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_global.c + tos_global.c + 0 + 0 + + + 6 + 32 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_mmblk.c + tos_mmblk.c + 0 + 0 + + + 6 + 33 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_mmheap.c + tos_mmheap.c + 0 + 0 + + + 6 + 34 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_msg.c + tos_msg.c + 0 + 0 + + + 6 + 35 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_mutex.c + tos_mutex.c + 0 + 0 + + + 6 + 36 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_pend.c + tos_pend.c + 0 + 0 + + + 6 + 37 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_queue.c + tos_queue.c + 0 + 0 + + + 6 + 38 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_robin.c + tos_robin.c + 0 + 0 + + + 6 + 39 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_sched.c + tos_sched.c + 0 + 0 + + + 6 + 40 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_sem.c + tos_sem.c + 0 + 0 + + + 6 + 41 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_sys.c + tos_sys.c + 0 + 0 + + + 6 + 42 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_task.c + tos_task.c + 0 + 0 + + + 6 + 43 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_tick.c + tos_tick.c + 0 + 0 + + + 6 + 44 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_time.c + tos_time.c + 0 + 0 + + + 6 + 45 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_timer.c + tos_timer.c + 0 + 0 + + + + + tos/cmsis_os + 0 + 0 + 0 + 0 + + 7 + 46 + 1 + 0 + 0 + 0 + ..\..\..\..\osal\cmsis_os\cmsis_os.c + cmsis_os.c + 0 + 0 + + + + + examples + 1 + 0 + 0 + 0 + + 8 + 47 + 1 + 0 + 0 + 0 + ..\..\..\..\examples\LoRaWAN\lora_demo.c + lora_demo.c + 0 + 0 + + + + + devices + 0 + 0 + 0 + 0 + + 9 + 48 + 1 + 0 + 0 + 0 + ..\..\..\..\devices\rhf76_lora\RHF76.c + RHF76.c + 0 + 0 + + + + + hal + 0 + 0 + 0 + 0 + + 10 + 49 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\hal\st\stm32l0xx\src\tos_hal_uart.c + tos_hal_uart.c + 0 + 0 + + + + + at + 0 + 0 + 0 + 0 + + 11 + 50 + 1 + 0 + 0 + 0 + ..\..\..\..\net\at\src\tos_at.c + tos_at.c + 0 + 0 + + + 11 + 51 + 1 + 0 + 0 + 0 + ..\..\..\..\net\at\src\tos_at_utils.c + tos_at_utils.c + 0 + 0 + + + 11 + 52 + 1 + 0 + 0 + 0 + ..\..\..\..\net\lora_module_wrapper\lora_module_wrapper.c + lora_module_wrapper.c + 0 + 0 + + + + + ::CMSIS + 0 + 0 + 0 + 1 + + +
diff --git a/board/NUCLEO_STM32L073RZ/KEIL/lorawan/TencentOS_tiny.uvprojx b/board/NUCLEO_STM32L073RZ/KEIL/lorawan/TencentOS_tiny.uvprojx new file mode 100644 index 00000000..075b5e6d --- /dev/null +++ b/board/NUCLEO_STM32L073RZ/KEIL/lorawan/TencentOS_tiny.uvprojx @@ -0,0 +1,717 @@ + + + + 2.1 + +
### uVision Project, (C) Keil Software
+ + + + TencentOS_tiny + 0x4 + ARM-ADS + 5060750::V5.06 update 6 (build 750)::ARMCC + 0 + + + STM32L073RZTx + STMicroelectronics + Keil.STM32L0xx_DFP.2.0.0 + http://www.keil.com/pack/ + IRAM(0x20000000-0x20004FFF) IROM(0x8000000-0x802FFFF) CLOCK(8000000) CPUTYPE("Cortex-M0+") + + + + + + + + + + + + + + + $$Device:STM32L073RZTx$CMSIS\SVD\STM32L07x.svd + 0 + 0 + + + + + + + 0 + 0 + 0 + 0 + 1 + + TencentOS_tiny\ + TencentOS_tiny + 1 + 0 + 1 + 1 + 1 + + 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 + DARMCM1.DLL + -pCM0+ + SARMCM3.DLL + + TARMCM1.DLL + -pCM0+ + + + + 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-M0+" + + 0 + 0 + 0 + 1 + 1 + 0 + 0 + 0 + 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 + 0x5000 + + + 1 + 0x8000000 + 0x30000 + + + 0 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x0 + 0x0 + + + 1 + 0x8000000 + 0x30000 + + + 1 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x0 + 0x0 + + + 0 + 0x20000000 + 0x5000 + + + 0 + 0x0 + 0x0 + + + + + + 1 + 4 + 0 + 0 + 1 + 0 + 0 + 0 + 0 + 0 + 2 + 0 + 0 + 1 + 0 + 0 + 1 + 1 + 1 + 1 + 0 + 0 + 0 + + + USE_HAL_DRIVER,STM32L073xx,USE_HAL_DRIVER,STM32L073xx + + ..\..\BSP\Inc;../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Inc;../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Inc/Legacy;../../../../platform/vendor_bsp/st/CMSIS/Device/ST/STM32L0xx/Include;../../../../platform/vendor_bsp/st/CMSIS/Include;..\..\..\..\arch\arm\arm-v7m\common\include;..\..\..\..\arch\arm\arm-v7m\cortex-m0+\armcc;..\..\..\..\kernel\core\include;..\..\..\..\kernel\pm\include;..\..\..\..\kernel\hal\include;..\..\..\..\osal\cmsis_os;..\..\TOS_CONFIG;..\..\..\..\devices\rhf76_lora;..\..\..\..\net\at\include;..\..\..\..\net\lora_module_wrapper + + + + 1 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + 0 + + + + + + + + + 1 + 0 + 0 + 0 + 1 + 0 + 0x08000000 + 0x20000000 + + + + + + + + + + + + + Application/MDK-ARM + + + startup_stm32l073xx.s + 2 + startup_stm32l073xx.s + + + + + Application/User + + + gpio.c + 1 + ..\..\BSP\Src\gpio.c + + + main.c + 1 + ..\..\BSP\Src\main.c + + + stm32l0xx_hal_msp.c + 1 + ..\..\BSP\Src\stm32l0xx_hal_msp.c + + + usart.c + 1 + ..\..\BSP\Src\usart.c + + + mcu_init.c + 1 + ..\..\BSP\Src\mcu_init.c + + + stm32l0xx_it_lorawan.c + 1 + ..\..\BSP\Src\stm32l0xx_it_lorawan.c + + + + + Drivers/STM32L0xx_HAL_Driver + + + stm32l0xx_hal_tim.c + 1 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_tim.c + + + stm32l0xx_hal_tim_ex.c + 1 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_tim_ex.c + + + stm32l0xx_hal_uart.c + 1 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_uart.c + + + stm32l0xx_hal_uart_ex.c + 1 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_uart_ex.c + + + stm32l0xx_hal.c + 1 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal.c + + + stm32l0xx_hal_i2c.c + 1 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_i2c.c + + + stm32l0xx_hal_i2c_ex.c + 1 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_i2c_ex.c + + + stm32l0xx_hal_rcc.c + 1 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_rcc.c + + + stm32l0xx_hal_rcc_ex.c + 1 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_rcc_ex.c + + + stm32l0xx_hal_flash_ramfunc.c + 1 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_flash_ramfunc.c + + + stm32l0xx_hal_flash.c + 1 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_flash.c + + + stm32l0xx_hal_flash_ex.c + 1 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_flash_ex.c + + + stm32l0xx_hal_gpio.c + 1 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_gpio.c + + + stm32l0xx_hal_dma.c + 1 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_dma.c + + + stm32l0xx_hal_pwr.c + 1 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_pwr.c + + + stm32l0xx_hal_pwr_ex.c + 1 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_pwr_ex.c + + + stm32l0xx_hal_cortex.c + 1 + ../../../../platform/vendor_bsp/st/STM32L0xx_HAL_Driver/Src/stm32l0xx_hal_cortex.c + + + + + Drivers/CMSIS + + + system_stm32l0xx.c + 1 + ..\..\BSP\Src\system_stm32l0xx.c + + + + + tos/arch + + + tos_cpu.c + 1 + ..\..\..\..\arch\arm\arm-v7m\common\tos_cpu.c + + + port_c.c + 1 + ..\..\..\..\arch\arm\arm-v7m\cortex-m0+\armcc\port_c.c + + + port_s.S + 2 + ..\..\..\..\arch\arm\arm-v7m\cortex-m0+\armcc\port_s.S + + + + + tos/kernel + + + tos_event.c + 1 + ..\..\..\..\kernel\core\tos_event.c + + + tos_fifo.c + 1 + ..\..\..\..\kernel\core\tos_fifo.c + + + tos_global.c + 1 + ..\..\..\..\kernel\core\tos_global.c + + + tos_mmblk.c + 1 + ..\..\..\..\kernel\core\tos_mmblk.c + + + tos_mmheap.c + 1 + ..\..\..\..\kernel\core\tos_mmheap.c + + + tos_msg.c + 1 + ..\..\..\..\kernel\core\tos_msg.c + + + tos_mutex.c + 1 + ..\..\..\..\kernel\core\tos_mutex.c + + + tos_pend.c + 1 + ..\..\..\..\kernel\core\tos_pend.c + + + tos_queue.c + 1 + ..\..\..\..\kernel\core\tos_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 + + + + + tos/cmsis_os + + + cmsis_os.c + 1 + ..\..\..\..\osal\cmsis_os\cmsis_os.c + + + + + examples + + + lora_demo.c + 1 + ..\..\..\..\examples\LoRaWAN\lora_demo.c + + + + + devices + + + RHF76.c + 1 + ..\..\..\..\devices\rhf76_lora\RHF76.c + + + + + hal + + + tos_hal_uart.c + 1 + ..\..\..\..\platform\hal\st\stm32l0xx\src\tos_hal_uart.c + + + + + at + + + tos_at.c + 1 + ..\..\..\..\net\at\src\tos_at.c + + + tos_at_utils.c + 1 + ..\..\..\..\net\at\src\tos_at_utils.c + + + lora_module_wrapper.c + 1 + ..\..\..\..\net\lora_module_wrapper\lora_module_wrapper.c + + + + + ::CMSIS + + + + + + + + + + + + + + + + + + +
diff --git a/board/NUCLEO_STM32L073RZ/KEIL/lorawan/startup_stm32l073xx.s b/board/NUCLEO_STM32L073RZ/KEIL/lorawan/startup_stm32l073xx.s new file mode 100644 index 00000000..519b7233 --- /dev/null +++ b/board/NUCLEO_STM32L073RZ/KEIL/lorawan/startup_stm32l073xx.s @@ -0,0 +1,266 @@ +;******************** (C) COPYRIGHT 2016 STMicroelectronics ******************** +;* File Name : startup_stm32l073xx.s +;* Author : MCD Application Team +;* Description : STM32l073xx 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-M0+ processor is in Thread mode, +;* priority is Privileged, and the Stack is set to Main. +;******************************************************************************* +;* +;* 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 0x400 + + 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 0x200 + + 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 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD SVC_Handler ; SVCall Handler + DCD 0 ; Reserved + DCD 0 ; Reserved + DCD PendSV_Handler ; PendSV Handler + DCD SysTick_Handler ; SysTick Handler + + ; External Interrupts + DCD WWDG_IRQHandler ; Window Watchdog + DCD PVD_IRQHandler ; PVD through EXTI Line detect + DCD RTC_IRQHandler ; RTC through EXTI Line + DCD FLASH_IRQHandler ; FLASH + DCD RCC_CRS_IRQHandler ; RCC and CRS + DCD EXTI0_1_IRQHandler ; EXTI Line 0 and 1 + DCD EXTI2_3_IRQHandler ; EXTI Line 2 and 3 + DCD EXTI4_15_IRQHandler ; EXTI Line 4 to 15 + DCD TSC_IRQHandler ; TSC + DCD DMA1_Channel1_IRQHandler ; DMA1 Channel 1 + DCD DMA1_Channel2_3_IRQHandler ; DMA1 Channel 2 and Channel 3 + DCD DMA1_Channel4_5_6_7_IRQHandler ; DMA1 Channel 4, Channel 5, Channel 6 and Channel 7 + DCD ADC1_COMP_IRQHandler ; ADC1, COMP1 and COMP2 + DCD LPTIM1_IRQHandler ; LPTIM1 + DCD USART4_5_IRQHandler ; USART4 and USART5 + DCD TIM2_IRQHandler ; TIM2 + DCD TIM3_IRQHandler ; TIM3 + DCD TIM6_DAC_IRQHandler ; TIM6 and DAC + DCD TIM7_IRQHandler ; TIM7 + DCD 0 ; Reserved + DCD TIM21_IRQHandler ; TIM21 + DCD I2C3_IRQHandler ; I2C3 + DCD TIM22_IRQHandler ; TIM22 + DCD I2C1_IRQHandler ; I2C1 + DCD I2C2_IRQHandler ; I2C2 + DCD SPI1_IRQHandler ; SPI1 + DCD SPI2_IRQHandler ; SPI2 + DCD USART1_IRQHandler ; USART1 + DCD USART2_IRQHandler ; USART2 + DCD RNG_LPUART1_IRQHandler ; RNG and LPUART1 + DCD LCD_IRQHandler ; LCD + DCD USB_IRQHandler ; USB + +__Vectors_End + +__Vectors_Size EQU __Vectors_End - __Vectors + + AREA |.text|, CODE, READONLY + +; Reset handler routine +Reset_Handler PROC + EXPORT Reset_Handler [WEAK] + IMPORT __main + IMPORT SystemInit + 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 +SVC_Handler PROC + EXPORT SVC_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_IRQHandler [WEAK] + EXPORT RTC_IRQHandler [WEAK] + EXPORT FLASH_IRQHandler [WEAK] + EXPORT RCC_CRS_IRQHandler [WEAK] + EXPORT EXTI0_1_IRQHandler [WEAK] + EXPORT EXTI2_3_IRQHandler [WEAK] + EXPORT EXTI4_15_IRQHandler [WEAK] + EXPORT TSC_IRQHandler [WEAK] + EXPORT DMA1_Channel1_IRQHandler [WEAK] + EXPORT DMA1_Channel2_3_IRQHandler [WEAK] + EXPORT DMA1_Channel4_5_6_7_IRQHandler [WEAK] + EXPORT ADC1_COMP_IRQHandler [WEAK] + EXPORT LPTIM1_IRQHandler [WEAK] + EXPORT USART4_5_IRQHandler [WEAK] + EXPORT TIM2_IRQHandler [WEAK] + EXPORT TIM3_IRQHandler [WEAK] + EXPORT TIM6_DAC_IRQHandler [WEAK] + EXPORT TIM7_IRQHandler [WEAK] + EXPORT TIM21_IRQHandler [WEAK] + EXPORT TIM22_IRQHandler [WEAK] + EXPORT I2C1_IRQHandler [WEAK] + EXPORT I2C2_IRQHandler [WEAK] + EXPORT I2C3_IRQHandler [WEAK] + EXPORT SPI1_IRQHandler [WEAK] + EXPORT SPI2_IRQHandler [WEAK] + EXPORT USART1_IRQHandler [WEAK] + EXPORT USART2_IRQHandler [WEAK] + EXPORT RNG_LPUART1_IRQHandler [WEAK] + EXPORT LCD_IRQHandler [WEAK] + EXPORT USB_IRQHandler [WEAK] + + +WWDG_IRQHandler +PVD_IRQHandler +RTC_IRQHandler +FLASH_IRQHandler +RCC_CRS_IRQHandler +EXTI0_1_IRQHandler +EXTI2_3_IRQHandler +EXTI4_15_IRQHandler +TSC_IRQHandler +DMA1_Channel1_IRQHandler +DMA1_Channel2_3_IRQHandler +DMA1_Channel4_5_6_7_IRQHandler +ADC1_COMP_IRQHandler +LPTIM1_IRQHandler +USART4_5_IRQHandler +TIM2_IRQHandler +TIM3_IRQHandler +TIM6_DAC_IRQHandler +TIM7_IRQHandler +TIM21_IRQHandler +TIM22_IRQHandler +I2C1_IRQHandler +I2C2_IRQHandler +I2C3_IRQHandler +SPI1_IRQHandler +SPI2_IRQHandler +USART1_IRQHandler +USART2_IRQHandler +RNG_LPUART1_IRQHandler +LCD_IRQHandler +USB_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/board/NUCLEO_STM32L073RZ/TOS_CONFIG/tos_config.h b/board/NUCLEO_STM32L073RZ/TOS_CONFIG/tos_config.h index cf7a1a32..ca2dfb22 100644 --- a/board/NUCLEO_STM32L073RZ/TOS_CONFIG/tos_config.h +++ b/board/NUCLEO_STM32L073RZ/TOS_CONFIG/tos_config.h @@ -15,7 +15,7 @@ #define TOS_CFG_MMHEAP_EN 1u -#define TOS_CFG_MMHEAP_DEFAULT_POOL_SIZE 0x100 +#define TOS_CFG_MMHEAP_DEFAULT_POOL_SIZE 0x2000 #define TOS_CFG_MUTEX_EN 1u