From d0f61b43a5cab1958648717832b1e802e398b59e Mon Sep 17 00:00:00 2001 From: supowang Date: Mon, 16 Dec 2019 11:32:03 +0800 Subject: [PATCH 1/8] add GD32V TencentOS tiny EVB_LX board add GD32V TencentOS tiny EVB_LX board --- board/TencentOS_tiny_EVB_LX/.project | 11 + .../BSP/Inc/EVB_LX_IoT_gd32vf103.h | 173 +++++++ board/TencentOS_tiny_EVB_LX/BSP/Inc/bmp.h | 80 ++++ .../TencentOS_tiny_EVB_LX/BSP/Inc/mcu_init.h | 11 + board/TencentOS_tiny_EVB_LX/BSP/Inc/oled.h | 40 ++ .../TencentOS_tiny_EVB_LX/BSP/Inc/oledfont.h | 230 +++++++++ board/TencentOS_tiny_EVB_LX/BSP/Inc/usart.h | 13 + .../BSP/Src/EVB_LX_IoT_gd32vf103.c | 208 +++++++++ .../BSP/Src/gd32vf103_it.c | 11 + .../TencentOS_tiny_EVB_LX/BSP/Src/mcu_init.c | 26 ++ board/TencentOS_tiny_EVB_LX/BSP/Src/oled.c | 312 +++++++++++++ board/TencentOS_tiny_EVB_LX/BSP/Src/usart.c | 66 +++ .../TOS_CONFIG/tos_config.h | 70 +++ .../eclipse/hello_world/.cproject | 438 ++++++++++++++++++ .../eclipse/hello_world/.gitignore | 1 + .../eclipse/hello_world/.project | 94 ++++ .../eclipse/hello_world/gd32vf103_libopt.h | 61 +++ .../eclipse/hello_world/link.lds | 175 +++++++ .../eclipse/hello_world/main.c | 57 +++ .../eclipse/hello_world/openocd_gdlink.cfg | 45 ++ 20 files changed, 2122 insertions(+) create mode 100644 board/TencentOS_tiny_EVB_LX/.project create mode 100644 board/TencentOS_tiny_EVB_LX/BSP/Inc/EVB_LX_IoT_gd32vf103.h create mode 100644 board/TencentOS_tiny_EVB_LX/BSP/Inc/bmp.h create mode 100644 board/TencentOS_tiny_EVB_LX/BSP/Inc/mcu_init.h create mode 100644 board/TencentOS_tiny_EVB_LX/BSP/Inc/oled.h create mode 100644 board/TencentOS_tiny_EVB_LX/BSP/Inc/oledfont.h create mode 100644 board/TencentOS_tiny_EVB_LX/BSP/Inc/usart.h create mode 100644 board/TencentOS_tiny_EVB_LX/BSP/Src/EVB_LX_IoT_gd32vf103.c create mode 100644 board/TencentOS_tiny_EVB_LX/BSP/Src/gd32vf103_it.c create mode 100644 board/TencentOS_tiny_EVB_LX/BSP/Src/mcu_init.c create mode 100644 board/TencentOS_tiny_EVB_LX/BSP/Src/oled.c create mode 100644 board/TencentOS_tiny_EVB_LX/BSP/Src/usart.c create mode 100644 board/TencentOS_tiny_EVB_LX/TOS_CONFIG/tos_config.h create mode 100644 board/TencentOS_tiny_EVB_LX/eclipse/hello_world/.cproject create mode 100644 board/TencentOS_tiny_EVB_LX/eclipse/hello_world/.gitignore create mode 100644 board/TencentOS_tiny_EVB_LX/eclipse/hello_world/.project create mode 100644 board/TencentOS_tiny_EVB_LX/eclipse/hello_world/gd32vf103_libopt.h create mode 100644 board/TencentOS_tiny_EVB_LX/eclipse/hello_world/link.lds create mode 100644 board/TencentOS_tiny_EVB_LX/eclipse/hello_world/main.c create mode 100644 board/TencentOS_tiny_EVB_LX/eclipse/hello_world/openocd_gdlink.cfg diff --git a/board/TencentOS_tiny_EVB_LX/.project b/board/TencentOS_tiny_EVB_LX/.project new file mode 100644 index 00000000..87584654 --- /dev/null +++ b/board/TencentOS_tiny_EVB_LX/.project @@ -0,0 +1,11 @@ + + + GigaDevice_GD32VF103C_START + + + + + + + + diff --git a/board/TencentOS_tiny_EVB_LX/BSP/Inc/EVB_LX_IoT_gd32vf103.h b/board/TencentOS_tiny_EVB_LX/BSP/Inc/EVB_LX_IoT_gd32vf103.h new file mode 100644 index 00000000..f02805f0 --- /dev/null +++ b/board/TencentOS_tiny_EVB_LX/BSP/Inc/EVB_LX_IoT_gd32vf103.h @@ -0,0 +1,173 @@ +#ifndef EVB_LX_IOT_GD32VF103_H +#define EVB_LX_IOT_GD32VF103_H + +#ifdef __cplusplus + extern "C" { +#endif + +#include "gd32vf103.h" + +/* exported types */ +typedef enum +{ + LED = 0, + +} led_typedef_enum; + +typedef enum +{ + F1_KEY = 0, + F2_KEY = 1, +} key_typedef_enum; + +typedef enum +{ + KEY_MODE_GPIO = 0, + KEY_MODE_EXTI = 1 +} keymode_typedef_enum; + +/* eval board low layer led */ +#define LEDn 4U + +#define LED_PIN GPIO_PIN_2 +#define LED_GPIO_PORT GPIOB +#define LED_GPIO_CLK RCU_GPIOB +/*****************E53***********************************/ +#define SPI_SCK_PIN GPIO_PIN_13 +#define SPI_GPIO_PORT GPIOB +#define SPI_SCK_CLK RCU_GPIOB + +#define SPI_NSS_PIN GPIO_PIN_12 +#define SPI_NSS_PORT GPIOB +#define SPI_NSS_CLK RCU_GPIOB + +#define GPIO1_PIN GPIO_PIN_0 +#define GPIO1_PORT GPIOA +#define GPIO1_CLK RCU_GPIOA + +#define ADC_PIN GPIO_PIN_1 +#define ADC_PORT GPIOA +#define ADC_CLK RCU_GPIOA + +#define DAC_PIN GPIO_PIN_4 +#define DAC_PORT GPIOA +#define DAC_CLK RCU_GPIOA + +#define GPIO2_PIN GPIO_PIN_9 +#define GPIO2_PORT GPIOB +#define GPIO2_CLK RCU_GPIOB + +#define GPIO3_PIN GPIO_PIN_8 +#define GPIO3_PORT GPIOB +#define GPIO3_CLK RCU_GPIOB + +#define IIC_SCL_PIN GPIO_PIN_6 +#define IIC_SCL_PORT GPIOB +#define IIC_SCL_CLK RCU_GPIOB + +#define IIC_SDA_PIN GPIO_PIN_7 +#define IIC_SDA_PORT GPIOB +#define IIC_SDA_CLK RCU_GPIOB + +#define GPIO4_PIN GPIO_PIN_8 +#define GPIO4_PORT GPIOA +#define GPIO4_CLK RCU_GPIOA + +#define UART_RX_PIN GPIO_PIN_11 +#define UART_RX_PORT GPIOC +#define UART_RX_CLK RCU_GPIOC + +#define UART_TX_PIN GPIO_PIN_10 +#define UART_TX_PORT GPIOC +#define UART_TX_CLK RCU_GPIOC + +#define GPIO5_PIN GPIO_PIN_9 +#define GPIO5_PORT GPIOC +#define GPIO5_CLK RCU_GPIOC + +#define SPI_MOSI_PIN GPIO_PIN_15 +#define SPI_MOSI_PORT GPIOB +#define SPI_MOSI_CLK RCU_GPIOB + +#define SPI_MISO_PIN GPIO_PIN_14 +#define SPI_MISO_PORT GPIOB +#define SPI_MISO_CLK RCU_GPIOB +/*******************************************************/ + +/*************************OLED**************************/ +#define IIC2_SCL_PIN GPIO_PIN_10 +#define IIC2_SCL_PORT GPIOB + +#define IIC2_SDA_PIN GPIO_PIN_11 +#define IIC2_SDA_PORT GPIOB +/********************************************************/ + +#define COMn 2U + +#define EVAL_COM0 USART2 +#define EVAL_COM0_CLK RCU_USART2 +#define EVAL_COM0_TX_PIN GPIO_PIN_2 +#define EVAL_COM0_RX_PIN GPIO_PIN_3 +#define EVAL_COM0_GPIO_PORT GPIOA +#define EVAL_COM0_GPIO_CLK RCU_GPIOA + +#define EVAL_COM1 USART1 +#define EVAL_COM1_CLK RCU_USART1 +#define EVAL_COM1_TX_PIN GPIO_PIN_2 +#define EVAL_COM1_RX_PIN GPIO_PIN_3 +#define EVAL_COM1_GPIO_PORT GPIOA +#define EVAL_COM1_GPIO_CLK RCU_GPIOA + +#define EVAL_COM3 UART3 +#define EVAL_COM3_CLK RCU_UART3 +#define EVAL_COM3_TX_PIN GPIO_PIN_10 +#define EVAL_COM3_RX_PIN GPIO_PIN_11 +#define EVAL_COM3_GPIO_PORT GPIOC +#define EVAL_COM3_GPIO_CLK RCU_GPIOC + +#define KEYn 3U + +/* F1 push-button */ +#define F1_KEY_PIN GPIO_PIN_1 +#define F1_KEY_GPIO_PORT GPIOA +#define F1_KEY_GPIO_CLK RCU_GPIOA +#define F1_KEY_EXTI_LINE EXTI_1 +#define F1_KEY_EXTI_PORT_SOURCE GPIO_PORT_SOURCE_GPIOA +#define F1_KEY_EXTI_PIN_SOURCE GPIO_PIN_SOURCE_1 +#define F1_KEY_EXTI_IRQn EXTI1_IRQn + +/* F2 push-button */ +#define F2_KEY_PIN GPIO_PIN_0 +#define F2_KEY_GPIO_PORT GPIOA +#define F2_KEY_GPIO_CLK RCU_GPIOA +#define F2_KEY_EXTI_LINE EXTI_0 +#define F2_KEY_EXTI_PORT_SOURCE GPIO_PORT_SOURCE_GPIOA +#define F2_KEY_EXTI_PIN_SOURCE GPIO_PIN_SOURCE_0 +#define F2_KEY_EXTI_IRQn EXTI0_IRQn + + + + + +/* function declarations */ +/* configure led GPIO */ +void gd_eval_led_init(led_typedef_enum lednum); +/* turn on selected led */ +void gd_eval_led_on(led_typedef_enum lednum); +/* turn off selected led */ +void gd_eval_led_off(led_typedef_enum lednum); +/* toggle the selected led */ +void gd_eval_led_toggle(led_typedef_enum lednum); +/* configure key */ +void gd_eval_key_init(key_typedef_enum key_num, keymode_typedef_enum key_mode); +/* return the selected key state */ +uint8_t gd_eval_key_state_get(key_typedef_enum key); +/* configure COM port */ +void gd_eval_com_init(uint32_t com); + +#ifdef __cplusplus +} +#endif + +#endif /* BEARPI_IOT_GD32F303_H */ + diff --git a/board/TencentOS_tiny_EVB_LX/BSP/Inc/bmp.h b/board/TencentOS_tiny_EVB_LX/BSP/Inc/bmp.h new file mode 100644 index 00000000..9c852fa4 --- /dev/null +++ b/board/TencentOS_tiny_EVB_LX/BSP/Inc/bmp.h @@ -0,0 +1,80 @@ +////////////////////////////////////////////////////////////////////////////////// +// +// +//存储图片数据,图片大小为64*32像素 +// +///////////////////////////////////////////////////////////////////////////////// + +#ifndef __BMP_H +#define __BMP_H +unsigned char BMP1[] = +{0x00,0x06,0x0A,0xFE,0x0A,0xC6,0x00,0xE0,0x00,0xF0,0x00,0xF8,0x00,0x00,0x00,0x00, +0x00,0x00,0xFE,0x7D,0xBB,0xC7,0xEF,0xEF,0xEF,0xEF,0xEF,0xEF,0xEF,0xC7,0xBB,0x7D, +0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x08, +0x0C,0xFE,0xFE,0x0C,0x08,0x20,0x60,0xFE,0xFE,0x60,0x20,0x00,0x00,0x00,0x78,0x48, +0xFE,0x82,0xBA,0xBA,0x82,0xBA,0xBA,0x82,0xBA,0xBA,0x82,0xBA,0xBA,0x82,0xFE,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01,0x01, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFE,0xFF, +0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0xFF,0xFF,0x00,0x00,0xFE,0xFF,0x03, +0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0xFF,0xFE,0x00,0x00,0x00,0x00,0xC0,0xC0, +0xC0,0x00,0x00,0x00,0x00,0xFE,0xFF,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03, +0xFF,0xFE,0x00,0x00,0xFE,0xFF,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0x03,0xFF, +0xFE,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0xFF,0xFF,0x0C, +0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0xFF,0xFF,0x00,0x00,0x00,0x00,0xE1,0xE1, +0xE1,0x00,0x00,0x00,0x00,0xFF,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0xFF,0xFF,0x00,0x00,0xFF,0xFF,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0x0C,0xFF, +0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x0F,0x1F, +0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1F,0x0F,0x00,0x00,0x0F,0x1F,0x18, +0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1F,0x0F,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x0F,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18, +0x1F,0x0F,0x00,0x00,0x0F,0x1F,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x18,0x1F, +0x0F,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x8C,0x42,0x22,0x12,0x0C,0x00,0xFC,0x02,0x02,0x02,0xFC,0x00,0x00,0x04, +0xFE,0x00,0x00,0x00,0x20,0x58,0x44,0xFE,0x40,0x00,0x10,0x10,0x10,0x10,0x10,0x00, +0x00,0x04,0xFE,0x00,0x00,0x00,0xFC,0x02,0x02,0x02,0xFC,0x00,0x10,0x10,0x10,0x10, +0x10,0x00,0xFC,0x02,0x02,0x02,0xFC,0x00,0x00,0x04,0xFE,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x24,0xA4,0x2E,0x24,0xE4,0x24,0x2E,0xA4,0x24,0x00,0x00,0x00,0xF8,0x4A,0x4C, +0x48,0xF8,0x48,0x4C,0x4A,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x00,0x00,0x01,0x01,0x01,0x00,0x00,0x00,0x01, +0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x01,0x01,0x01,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x00,0x00,0x01,0x01,0x01,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xC0,0x20,0x10,0x10, +0x10,0x10,0x20,0xC0,0x00,0x00,0xC0,0x20,0x10,0x10,0x10,0x10,0x20,0xC0,0x00,0x00, +0x00,0x12,0x0A,0x07,0x02,0x7F,0x02,0x07,0x0A,0x12,0x00,0x00,0x00,0x0B,0x0A,0x0A, +0x0A,0x7F,0x0A,0x0A,0x0A,0x0B,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, +0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x40,0x40, +0x40,0x50,0x20,0x5F,0x80,0x00,0x1F,0x20,0x40,0x40,0x40,0x50,0x20,0x5F,0x80,0x00, + +}; + +#endif + + diff --git a/board/TencentOS_tiny_EVB_LX/BSP/Inc/mcu_init.h b/board/TencentOS_tiny_EVB_LX/BSP/Inc/mcu_init.h new file mode 100644 index 00000000..09da853e --- /dev/null +++ b/board/TencentOS_tiny_EVB_LX/BSP/Inc/mcu_init.h @@ -0,0 +1,11 @@ +#ifndef __MCU_INIT_H +#define __MCU_INIT_H + +#include "gd32vf103.h" +#include "usart.h" +#include "oled.h" +#include "EVB_LX_IoT_gd32vf103.h" + +void board_init(); + +#endif //__MCU_INIT_H diff --git a/board/TencentOS_tiny_EVB_LX/BSP/Inc/oled.h b/board/TencentOS_tiny_EVB_LX/BSP/Inc/oled.h new file mode 100644 index 00000000..6cd9d988 --- /dev/null +++ b/board/TencentOS_tiny_EVB_LX/BSP/Inc/oled.h @@ -0,0 +1,40 @@ +#ifndef __OLED_H +#define __OLED_H +#include "gd32vf103.h" +#include "stdlib.h" +#define OLED_MODE 0 +#define OLED_SIZE 8 +#define XLevelL 0x00 +#define XLevelH 0x10 +#define Max_Column 128 +#define Max_Row 64 +#define Brightness 0xFF +#define X_WIDTH 128 +#define Y_WIDTH 64 + + + +#define OLED_SCLK_Clr() gpio_bit_write(GPIOB,GPIO_PIN_10, RESET);//SCL +#define OLED_SCLK_Set() gpio_bit_write(GPIOB,GPIO_PIN_10, SET); + +#define OLED_SDIN_Clr() gpio_bit_write(GPIOB,GPIO_PIN_11, RESET);//SDA +#define OLED_SDIN_Set() gpio_bit_write(GPIOB,GPIO_PIN_11, SET); + +#define OLED_CMD 0 +#define OLED_DATA 1 + + + +void OLED_ShowNum(uint8_t x,uint8_t y,uint32_t num,uint8_t len,uint8_t size); +void OLED_ShowString(uint8_t x,uint8_t y, uint8_t *p,uint8_t Char_Size); +void OLED_ShowChinese(uint8_t x,uint8_t y,uint8_t no); +void OLED_DrawBMP(unsigned char x0, unsigned char y0,unsigned char x1, unsigned char y1,unsigned char BMP[]); + + + +void OLED_Init(void); +void OLED_Clear(void); +void OLED_Display_On(void); +void OLED_Display_Off(void); +void OLED_Set_Pos(unsigned char x, unsigned char y); +#endif diff --git a/board/TencentOS_tiny_EVB_LX/BSP/Inc/oledfont.h b/board/TencentOS_tiny_EVB_LX/BSP/Inc/oledfont.h new file mode 100644 index 00000000..bece1302 --- /dev/null +++ b/board/TencentOS_tiny_EVB_LX/BSP/Inc/oledfont.h @@ -0,0 +1,230 @@ +#ifndef __OLEDFONT_H +#define __OLEDFONT_H +//常用ASCII表 +//偏移量32 +//ASCII字符集 +//偏移量32 +//大小:12*6 +/************************************6*8的点阵************************************/ +const unsigned char F6x8[][6] = +{ +{0x00, 0x00, 0x00, 0x00, 0x00, 0x00},// sp +{0x00, 0x00, 0x00, 0x2f, 0x00, 0x00},// ! +{0x00, 0x00, 0x07, 0x00, 0x07, 0x00},// " +{0x00, 0x14, 0x7f, 0x14, 0x7f, 0x14},// # +{0x00, 0x24, 0x2a, 0x7f, 0x2a, 0x12},// $ +{0x00, 0x62, 0x64, 0x08, 0x13, 0x23},// % +{0x00, 0x36, 0x49, 0x55, 0x22, 0x50},// & +{0x00, 0x00, 0x05, 0x03, 0x00, 0x00},// ' +{0x00, 0x00, 0x1c, 0x22, 0x41, 0x00},// ( +{0x00, 0x00, 0x41, 0x22, 0x1c, 0x00},// ) +{0x00, 0x14, 0x08, 0x3E, 0x08, 0x14},// * +{0x00, 0x08, 0x08, 0x3E, 0x08, 0x08},// + +{0x00, 0x00, 0x00, 0xA0, 0x60, 0x00},// , +{0x00, 0x08, 0x08, 0x08, 0x08, 0x08},// - +{0x00, 0x00, 0x60, 0x60, 0x00, 0x00},// . +{0x00, 0x20, 0x10, 0x08, 0x04, 0x02},// / +{0x00, 0x3E, 0x51, 0x49, 0x45, 0x3E},// 0 +{0x00, 0x00, 0x42, 0x7F, 0x40, 0x00},// 1 +{0x00, 0x42, 0x61, 0x51, 0x49, 0x46},// 2 +{0x00, 0x21, 0x41, 0x45, 0x4B, 0x31},// 3 +{0x00, 0x18, 0x14, 0x12, 0x7F, 0x10},// 4 +{0x00, 0x27, 0x45, 0x45, 0x45, 0x39},// 5 +{0x00, 0x3C, 0x4A, 0x49, 0x49, 0x30},// 6 +{0x00, 0x01, 0x71, 0x09, 0x05, 0x03},// 7 +{0x00, 0x36, 0x49, 0x49, 0x49, 0x36},// 8 +{0x00, 0x06, 0x49, 0x49, 0x29, 0x1E},// 9 +{0x00, 0x00, 0x36, 0x36, 0x00, 0x00},// : +{0x00, 0x00, 0x56, 0x36, 0x00, 0x00},// ; +{0x00, 0x08, 0x14, 0x22, 0x41, 0x00},// < +{0x00, 0x14, 0x14, 0x14, 0x14, 0x14},// = +{0x00, 0x00, 0x41, 0x22, 0x14, 0x08},// > +{0x00, 0x02, 0x01, 0x51, 0x09, 0x06},// ? +{0x00, 0x32, 0x49, 0x59, 0x51, 0x3E},// @ +{0x00, 0x7C, 0x12, 0x11, 0x12, 0x7C},// A +{0x00, 0x7F, 0x49, 0x49, 0x49, 0x36},// B +{0x00, 0x3E, 0x41, 0x41, 0x41, 0x22},// C +{0x00, 0x7F, 0x41, 0x41, 0x22, 0x1C},// D +{0x00, 0x7F, 0x49, 0x49, 0x49, 0x41},// E +{0x00, 0x7F, 0x09, 0x09, 0x09, 0x01},// F +{0x00, 0x3E, 0x41, 0x49, 0x49, 0x7A},// G +{0x00, 0x7F, 0x08, 0x08, 0x08, 0x7F},// H +{0x00, 0x00, 0x41, 0x7F, 0x41, 0x00},// I +{0x00, 0x20, 0x40, 0x41, 0x3F, 0x01},// J +{0x00, 0x7F, 0x08, 0x14, 0x22, 0x41},// K +{0x00, 0x7F, 0x40, 0x40, 0x40, 0x40},// L +{0x00, 0x7F, 0x02, 0x0C, 0x02, 0x7F},// M +{0x00, 0x7F, 0x04, 0x08, 0x10, 0x7F},// N +{0x00, 0x3E, 0x41, 0x41, 0x41, 0x3E},// O +{0x00, 0x7F, 0x09, 0x09, 0x09, 0x06},// P +{0x00, 0x3E, 0x41, 0x51, 0x21, 0x5E},// Q +{0x00, 0x7F, 0x09, 0x19, 0x29, 0x46},// R +{0x00, 0x46, 0x49, 0x49, 0x49, 0x31},// S +{0x00, 0x01, 0x01, 0x7F, 0x01, 0x01},// T +{0x00, 0x3F, 0x40, 0x40, 0x40, 0x3F},// U +{0x00, 0x1F, 0x20, 0x40, 0x20, 0x1F},// V +{0x00, 0x3F, 0x40, 0x38, 0x40, 0x3F},// W +{0x00, 0x63, 0x14, 0x08, 0x14, 0x63},// X +{0x00, 0x07, 0x08, 0x70, 0x08, 0x07},// Y +{0x00, 0x61, 0x51, 0x49, 0x45, 0x43},// Z +{0x00, 0x00, 0x7F, 0x41, 0x41, 0x00},// [ +{0x00, 0x55, 0x2A, 0x55, 0x2A, 0x55},// 55 +{0x00, 0x00, 0x41, 0x41, 0x7F, 0x00},// ] +{0x00, 0x04, 0x02, 0x01, 0x02, 0x04},// ^ +{0x00, 0x40, 0x40, 0x40, 0x40, 0x40},// _ +{0x00, 0x00, 0x01, 0x02, 0x04, 0x00},// ' +{0x00, 0x20, 0x54, 0x54, 0x54, 0x78},// a +{0x00, 0x7F, 0x48, 0x44, 0x44, 0x38},// b +{0x00, 0x38, 0x44, 0x44, 0x44, 0x20},// c +{0x00, 0x38, 0x44, 0x44, 0x48, 0x7F},// d +{0x00, 0x38, 0x54, 0x54, 0x54, 0x18},// e +{0x00, 0x08, 0x7E, 0x09, 0x01, 0x02},// f +{0x00, 0x18, 0xA4, 0xA4, 0xA4, 0x7C},// g +{0x00, 0x7F, 0x08, 0x04, 0x04, 0x78},// h +{0x00, 0x00, 0x44, 0x7D, 0x40, 0x00},// i +{0x00, 0x40, 0x80, 0x84, 0x7D, 0x00},// j +{0x00, 0x7F, 0x10, 0x28, 0x44, 0x00},// k +{0x00, 0x00, 0x41, 0x7F, 0x40, 0x00},// l +{0x00, 0x7C, 0x04, 0x18, 0x04, 0x78},// m +{0x00, 0x7C, 0x08, 0x04, 0x04, 0x78},// n +{0x00, 0x38, 0x44, 0x44, 0x44, 0x38},// o +{0x00, 0xFC, 0x24, 0x24, 0x24, 0x18},// p +{0x00, 0x18, 0x24, 0x24, 0x18, 0xFC},// q +{0x00, 0x7C, 0x08, 0x04, 0x04, 0x08},// r +{0x00, 0x48, 0x54, 0x54, 0x54, 0x20},// s +{0x00, 0x04, 0x3F, 0x44, 0x40, 0x20},// t +{0x00, 0x3C, 0x40, 0x40, 0x20, 0x7C},// u +{0x00, 0x1C, 0x20, 0x40, 0x20, 0x1C},// v +{0x00, 0x3C, 0x40, 0x30, 0x40, 0x3C},// w +{0x00, 0x44, 0x28, 0x10, 0x28, 0x44},// x +{0x00, 0x1C, 0xA0, 0xA0, 0xA0, 0x7C},// y +{0x00, 0x44, 0x64, 0x54, 0x4C, 0x44},// z +{0x14, 0x14, 0x14, 0x14, 0x14, 0x14},// horiz lines +}; +/****************************************8*16的点阵************************************/ +const unsigned char F8X16[]= +{ + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,// 0 + 0x00,0x00,0x00,0xF8,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x33,0x30,0x00,0x00,0x00,//! 1 + 0x00,0x10,0x0C,0x06,0x10,0x0C,0x06,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//" 2 + 0x40,0xC0,0x78,0x40,0xC0,0x78,0x40,0x00,0x04,0x3F,0x04,0x04,0x3F,0x04,0x04,0x00,//# 3 + 0x00,0x70,0x88,0xFC,0x08,0x30,0x00,0x00,0x00,0x18,0x20,0xFF,0x21,0x1E,0x00,0x00,//$ 4 + 0xF0,0x08,0xF0,0x00,0xE0,0x18,0x00,0x00,0x00,0x21,0x1C,0x03,0x1E,0x21,0x1E,0x00,//% 5 + 0x00,0xF0,0x08,0x88,0x70,0x00,0x00,0x00,0x1E,0x21,0x23,0x24,0x19,0x27,0x21,0x10,//& 6 + 0x10,0x16,0x0E,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//' 7 + 0x00,0x00,0x00,0xE0,0x18,0x04,0x02,0x00,0x00,0x00,0x00,0x07,0x18,0x20,0x40,0x00,//( 8 + 0x00,0x02,0x04,0x18,0xE0,0x00,0x00,0x00,0x00,0x40,0x20,0x18,0x07,0x00,0x00,0x00,//) 9 + 0x40,0x40,0x80,0xF0,0x80,0x40,0x40,0x00,0x02,0x02,0x01,0x0F,0x01,0x02,0x02,0x00,//* 10 + 0x00,0x00,0x00,0xF0,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x1F,0x01,0x01,0x01,0x00,//+ 11 + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0xB0,0x70,0x00,0x00,0x00,0x00,0x00,//, 12 + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0x01,0x01,0x01,0x01,0x01,//- 13 + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,0x00,0x00,//. 14 + 0x00,0x00,0x00,0x00,0x80,0x60,0x18,0x04,0x00,0x60,0x18,0x06,0x01,0x00,0x00,0x00,/// 15 + 0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x0F,0x10,0x20,0x20,0x10,0x0F,0x00,//0 16 + 0x00,0x10,0x10,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//1 17 + 0x00,0x70,0x08,0x08,0x08,0x88,0x70,0x00,0x00,0x30,0x28,0x24,0x22,0x21,0x30,0x00,//2 18 + 0x00,0x30,0x08,0x88,0x88,0x48,0x30,0x00,0x00,0x18,0x20,0x20,0x20,0x11,0x0E,0x00,//3 19 + 0x00,0x00,0xC0,0x20,0x10,0xF8,0x00,0x00,0x00,0x07,0x04,0x24,0x24,0x3F,0x24,0x00,//4 20 + 0x00,0xF8,0x08,0x88,0x88,0x08,0x08,0x00,0x00,0x19,0x21,0x20,0x20,0x11,0x0E,0x00,//5 21 + 0x00,0xE0,0x10,0x88,0x88,0x18,0x00,0x00,0x00,0x0F,0x11,0x20,0x20,0x11,0x0E,0x00,//6 22 + 0x00,0x38,0x08,0x08,0xC8,0x38,0x08,0x00,0x00,0x00,0x00,0x3F,0x00,0x00,0x00,0x00,//7 23 + 0x00,0x70,0x88,0x08,0x08,0x88,0x70,0x00,0x00,0x1C,0x22,0x21,0x21,0x22,0x1C,0x00,//8 24 + 0x00,0xE0,0x10,0x08,0x08,0x10,0xE0,0x00,0x00,0x00,0x31,0x22,0x22,0x11,0x0F,0x00,//9 25 + 0x00,0x00,0x00,0xC0,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x30,0x30,0x00,0x00,0x00,//: 26 + 0x00,0x00,0x00,0x80,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x60,0x00,0x00,0x00,0x00,//; 27 + 0x00,0x00,0x80,0x40,0x20,0x10,0x08,0x00,0x00,0x01,0x02,0x04,0x08,0x10,0x20,0x00,//< 28 + 0x40,0x40,0x40,0x40,0x40,0x40,0x40,0x00,0x04,0x04,0x04,0x04,0x04,0x04,0x04,0x00,//= 29 + 0x00,0x08,0x10,0x20,0x40,0x80,0x00,0x00,0x00,0x20,0x10,0x08,0x04,0x02,0x01,0x00,//> 30 + 0x00,0x70,0x48,0x08,0x08,0x08,0xF0,0x00,0x00,0x00,0x00,0x30,0x36,0x01,0x00,0x00,//? 31 + 0xC0,0x30,0xC8,0x28,0xE8,0x10,0xE0,0x00,0x07,0x18,0x27,0x24,0x23,0x14,0x0B,0x00,//@ 32 + 0x00,0x00,0xC0,0x38,0xE0,0x00,0x00,0x00,0x20,0x3C,0x23,0x02,0x02,0x27,0x38,0x20,//A 33 + 0x08,0xF8,0x88,0x88,0x88,0x70,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x11,0x0E,0x00,//B 34 + 0xC0,0x30,0x08,0x08,0x08,0x08,0x38,0x00,0x07,0x18,0x20,0x20,0x20,0x10,0x08,0x00,//C 35 + 0x08,0xF8,0x08,0x08,0x08,0x10,0xE0,0x00,0x20,0x3F,0x20,0x20,0x20,0x10,0x0F,0x00,//D 36 + 0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x20,0x23,0x20,0x18,0x00,//E 37 + 0x08,0xF8,0x88,0x88,0xE8,0x08,0x10,0x00,0x20,0x3F,0x20,0x00,0x03,0x00,0x00,0x00,//F 38 + 0xC0,0x30,0x08,0x08,0x08,0x38,0x00,0x00,0x07,0x18,0x20,0x20,0x22,0x1E,0x02,0x00,//G 39 + 0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x20,0x3F,0x21,0x01,0x01,0x21,0x3F,0x20,//H 40 + 0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//I 41 + 0x00,0x00,0x08,0x08,0xF8,0x08,0x08,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,0x00,//J 42 + 0x08,0xF8,0x88,0xC0,0x28,0x18,0x08,0x00,0x20,0x3F,0x20,0x01,0x26,0x38,0x20,0x00,//K 43 + 0x08,0xF8,0x08,0x00,0x00,0x00,0x00,0x00,0x20,0x3F,0x20,0x20,0x20,0x20,0x30,0x00,//L 44 + 0x08,0xF8,0xF8,0x00,0xF8,0xF8,0x08,0x00,0x20,0x3F,0x00,0x3F,0x00,0x3F,0x20,0x00,//M 45 + 0x08,0xF8,0x30,0xC0,0x00,0x08,0xF8,0x08,0x20,0x3F,0x20,0x00,0x07,0x18,0x3F,0x00,//N 46 + 0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x10,0x20,0x20,0x20,0x10,0x0F,0x00,//O 47 + 0x08,0xF8,0x08,0x08,0x08,0x08,0xF0,0x00,0x20,0x3F,0x21,0x01,0x01,0x01,0x00,0x00,//P 48 + 0xE0,0x10,0x08,0x08,0x08,0x10,0xE0,0x00,0x0F,0x18,0x24,0x24,0x38,0x50,0x4F,0x00,//Q 49 + 0x08,0xF8,0x88,0x88,0x88,0x88,0x70,0x00,0x20,0x3F,0x20,0x00,0x03,0x0C,0x30,0x20,//R 50 + 0x00,0x70,0x88,0x08,0x08,0x08,0x38,0x00,0x00,0x38,0x20,0x21,0x21,0x22,0x1C,0x00,//S 51 + 0x18,0x08,0x08,0xF8,0x08,0x08,0x18,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//T 52 + 0x08,0xF8,0x08,0x00,0x00,0x08,0xF8,0x08,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//U 53 + 0x08,0x78,0x88,0x00,0x00,0xC8,0x38,0x08,0x00,0x00,0x07,0x38,0x0E,0x01,0x00,0x00,//V 54 + 0xF8,0x08,0x00,0xF8,0x00,0x08,0xF8,0x00,0x03,0x3C,0x07,0x00,0x07,0x3C,0x03,0x00,//W 55 + 0x08,0x18,0x68,0x80,0x80,0x68,0x18,0x08,0x20,0x30,0x2C,0x03,0x03,0x2C,0x30,0x20,//X 56 + 0x08,0x38,0xC8,0x00,0xC8,0x38,0x08,0x00,0x00,0x00,0x20,0x3F,0x20,0x00,0x00,0x00,//Y 57 + 0x10,0x08,0x08,0x08,0xC8,0x38,0x08,0x00,0x20,0x38,0x26,0x21,0x20,0x20,0x18,0x00,//Z 58 + 0x00,0x00,0x00,0xFE,0x02,0x02,0x02,0x00,0x00,0x00,0x00,0x7F,0x40,0x40,0x40,0x00,//[ 59 + 0x00,0x0C,0x30,0xC0,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x06,0x38,0xC0,0x00,//\ 60 + 0x00,0x02,0x02,0x02,0xFE,0x00,0x00,0x00,0x00,0x40,0x40,0x40,0x7F,0x00,0x00,0x00,//] 61 + 0x00,0x00,0x04,0x02,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//^ 62 + 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x80,//_ 63 + 0x00,0x02,0x02,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//` 64 + 0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x19,0x24,0x22,0x22,0x22,0x3F,0x20,//a 65 + 0x08,0xF8,0x00,0x80,0x80,0x00,0x00,0x00,0x00,0x3F,0x11,0x20,0x20,0x11,0x0E,0x00,//b 66 + 0x00,0x00,0x00,0x80,0x80,0x80,0x00,0x00,0x00,0x0E,0x11,0x20,0x20,0x20,0x11,0x00,//c 67 + 0x00,0x00,0x00,0x80,0x80,0x88,0xF8,0x00,0x00,0x0E,0x11,0x20,0x20,0x10,0x3F,0x20,//d 68 + 0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x22,0x22,0x22,0x22,0x13,0x00,//e 69 + 0x00,0x80,0x80,0xF0,0x88,0x88,0x88,0x18,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//f 70 + 0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x6B,0x94,0x94,0x94,0x93,0x60,0x00,//g 71 + 0x08,0xF8,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//h 72 + 0x00,0x80,0x98,0x98,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//i 73 + 0x00,0x00,0x00,0x80,0x98,0x98,0x00,0x00,0x00,0xC0,0x80,0x80,0x80,0x7F,0x00,0x00,//j 74 + 0x08,0xF8,0x00,0x00,0x80,0x80,0x80,0x00,0x20,0x3F,0x24,0x02,0x2D,0x30,0x20,0x00,//k 75 + 0x00,0x08,0x08,0xF8,0x00,0x00,0x00,0x00,0x00,0x20,0x20,0x3F,0x20,0x20,0x00,0x00,//l 76 + 0x80,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x20,0x3F,0x20,0x00,0x3F,0x20,0x00,0x3F,//m 77 + 0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x3F,0x21,0x00,0x00,0x20,0x3F,0x20,//n 78 + 0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x00,0x1F,0x20,0x20,0x20,0x20,0x1F,0x00,//o 79 + 0x80,0x80,0x00,0x80,0x80,0x00,0x00,0x00,0x80,0xFF,0xA1,0x20,0x20,0x11,0x0E,0x00,//p 80 + 0x00,0x00,0x00,0x80,0x80,0x80,0x80,0x00,0x00,0x0E,0x11,0x20,0x20,0xA0,0xFF,0x80,//q 81 + 0x80,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x20,0x20,0x3F,0x21,0x20,0x00,0x01,0x00,//r 82 + 0x00,0x00,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x33,0x24,0x24,0x24,0x24,0x19,0x00,//s 83 + 0x00,0x80,0x80,0xE0,0x80,0x80,0x00,0x00,0x00,0x00,0x00,0x1F,0x20,0x20,0x00,0x00,//t 84 + 0x80,0x80,0x00,0x00,0x00,0x80,0x80,0x00,0x00,0x1F,0x20,0x20,0x20,0x10,0x3F,0x20,//u 85 + 0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x00,0x01,0x0E,0x30,0x08,0x06,0x01,0x00,//v 86 + 0x80,0x80,0x00,0x80,0x00,0x80,0x80,0x80,0x0F,0x30,0x0C,0x03,0x0C,0x30,0x0F,0x00,//w 87 + 0x00,0x80,0x80,0x00,0x80,0x80,0x80,0x00,0x00,0x20,0x31,0x2E,0x0E,0x31,0x20,0x00,//x 88 + 0x80,0x80,0x80,0x00,0x00,0x80,0x80,0x80,0x80,0x81,0x8E,0x70,0x18,0x06,0x01,0x00,//y 89 + 0x00,0x80,0x80,0x80,0x80,0x80,0x80,0x00,0x00,0x21,0x30,0x2C,0x22,0x21,0x30,0x00,//z 90 + 0x00,0x00,0x00,0x00,0x80,0x7C,0x02,0x02,0x00,0x00,0x00,0x00,0x00,0x3F,0x40,0x40,//{ 91 + 0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xFF,0x00,0x00,0x00,//| 92 + 0x00,0x02,0x02,0x7C,0x80,0x00,0x00,0x00,0x00,0x40,0x40,0x3F,0x00,0x00,0x00,0x00,//} 93 + 0x00,0x06,0x01,0x01,0x02,0x02,0x04,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,//~ 94 +}; +char Hzk[][16]={ + +{0x40,0x3C,0x10,0xFF,0x10,0x10,0x20,0x10,0x8F,0x78,0x08,0xF8,0x08,0xF8,0x00,0x00}, +{0x02,0x06,0x02,0xFF,0x01,0x01,0x04,0x42,0x21,0x18,0x46,0x81,0x40,0x3F,0x00,0x00},/*"物",0*/ +/* (16 X 16 , 宋体 )*/ + +{0x02,0xFE,0x92,0x92,0xFE,0x02,0x00,0x10,0x11,0x16,0xF0,0x14,0x13,0x10,0x00,0x00}, +{0x10,0x1F,0x08,0x08,0xFF,0x04,0x81,0x41,0x31,0x0D,0x03,0x0D,0x31,0x41,0x81,0x00},/*"联",1*/ +/* (16 X 16 , 宋体 )*/ + +{0x00,0xFE,0x02,0x22,0x42,0x82,0x72,0x02,0x22,0x42,0x82,0x72,0x02,0xFE,0x00,0x00}, +{0x00,0xFF,0x10,0x08,0x06,0x01,0x0E,0x10,0x08,0x06,0x01,0x4E,0x80,0x7F,0x00,0x00},/*"网",2*/ +/* (16 X 16 , 宋体 )*/ + +{0x00,0x80,0x60,0xF8,0x07,0x00,0xFE,0x52,0x52,0x52,0x52,0x52,0xFE,0x00,0x00,0x00}, +{0x01,0x00,0x00,0xFF,0x08,0x88,0x4F,0x29,0x09,0x09,0x09,0x29,0x4F,0x88,0x08,0x00},/*"俱",3*/ +/* (16 X 16 , 宋体 )*/ + +{0x00,0x00,0xE0,0x9C,0x84,0x84,0x84,0xF4,0x82,0x82,0x83,0x82,0x80,0x80,0x00,0x00}, +{0x00,0x20,0x10,0x08,0x06,0x40,0x80,0x7F,0x00,0x00,0x02,0x04,0x08,0x30,0x00,0x00},/*"乐",4*/ +/* (16 X 16 , 宋体 )*/ + +{0x40,0x44,0x54,0x65,0x46,0x44,0x64,0x54,0x44,0x40,0xFE,0x02,0x22,0xDA,0x06,0x00}, +{0x00,0x00,0x7E,0x22,0x22,0x22,0x22,0x7E,0x00,0x00,0xFF,0x08,0x10,0x08,0x07,0x00},/*"部",5*/ +/* (16 X 16 , 宋体 )*/ +}; + +#endif diff --git a/board/TencentOS_tiny_EVB_LX/BSP/Inc/usart.h b/board/TencentOS_tiny_EVB_LX/BSP/Inc/usart.h new file mode 100644 index 00000000..a5cbe461 --- /dev/null +++ b/board/TencentOS_tiny_EVB_LX/BSP/Inc/usart.h @@ -0,0 +1,13 @@ +#ifndef __USART_H +#define __USART_H + +#define USART0_GPIO_TX_PIN GPIO_PIN_9 +#define USART0_GPIO_RX_PIN GPIO_PIN_10 +#define USART0_GPIO_PORT GPIOA + +#define USART3_GPIO_TX_PIN GPIO_PIN_10 +#define USART3_GPIO_RX_PIN GPIO_PIN_11 +#define USART3_GPIO_PORT GPIOC +void usart0_init(int baud); +void uart3_init(int baud); +#endif // __USART_H diff --git a/board/TencentOS_tiny_EVB_LX/BSP/Src/EVB_LX_IoT_gd32vf103.c b/board/TencentOS_tiny_EVB_LX/BSP/Src/EVB_LX_IoT_gd32vf103.c new file mode 100644 index 00000000..fe16cfce --- /dev/null +++ b/board/TencentOS_tiny_EVB_LX/BSP/Src/EVB_LX_IoT_gd32vf103.c @@ -0,0 +1,208 @@ +/*! + \file BearPi-IoT_gd32f303.c + \brief firmware functions to manage leds, keys, COM ports + + \version 2019-10-30, V1.0.0, demo for BearPi-IoT_GD32F30x + +*/ + +/* + Copyright (c) 2019, BearPi LIMITED. + + All rights reserved. + + 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 the copyright holder 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. +*/ + +#include "EVB_LX_IoT_gd32vf103.h" +#include "gd32vf103.h" +#include + +/* private variables */ +static uint32_t GPIO_PORT[LEDn] = {LED_GPIO_PORT}; +static uint32_t GPIO_PIN[LEDn] = {LED_PIN}; + +static rcu_periph_enum COM_CLK[COMn] = {EVAL_COM0_CLK, EVAL_COM1_CLK}; +static uint32_t COM_TX_PIN[COMn] = {EVAL_COM0_TX_PIN, EVAL_COM1_TX_PIN}; +static uint32_t COM_RX_PIN[COMn] = {EVAL_COM0_RX_PIN, EVAL_COM1_RX_PIN}; +static uint32_t COM_GPIO_PORT[COMn] = {EVAL_COM0_GPIO_PORT, EVAL_COM1_GPIO_PORT}; +static rcu_periph_enum COM_GPIO_CLK[COMn] = {EVAL_COM0_GPIO_CLK, EVAL_COM1_GPIO_CLK}; + +static rcu_periph_enum GPIO_CLK[LEDn] = {LED_GPIO_CLK}; + +static uint32_t KEY_PORT[KEYn] = {F1_KEY_GPIO_PORT, F2_KEY_GPIO_PORT}; +static uint32_t KEY_PIN[KEYn] = {F1_KEY_PIN, F2_KEY_PIN}; +static rcu_periph_enum KEY_CLK[KEYn] = {F1_KEY_GPIO_CLK, F2_KEY_GPIO_CLK}; +static exti_line_enum KEY_EXTI_LINE[KEYn] = {F1_KEY_EXTI_LINE, F2_KEY_EXTI_LINE}; +static uint8_t KEY_PORT_SOURCE[KEYn] = {F1_KEY_EXTI_PORT_SOURCE, F2_KEY_EXTI_PORT_SOURCE}; +static uint8_t KEY_PIN_SOURCE[KEYn] = {F1_KEY_EXTI_PIN_SOURCE, F2_KEY_EXTI_PIN_SOURCE}; +static uint8_t KEY_IRQn[KEYn] = {F1_KEY_EXTI_IRQn, F2_KEY_EXTI_IRQn}; + +/*! + \brief configure led GPIO + \param[in] lednum: specify the led to be configured + \arg LED + \param[out] none + \retval none +*/ +void gd_eval_led_init(led_typedef_enum lednum) +{ + /* enable the led clock */ + rcu_periph_clock_enable(GPIO_CLK[lednum]); + /* configure led GPIO port */ + gpio_init(GPIO_PORT[lednum], GPIO_MODE_OUT_PP, GPIO_OSPEED_50MHZ, GPIO_PIN[lednum]); + + GPIO_BC(GPIO_PORT[lednum]) = GPIO_PIN[lednum]; +} + +/*! + \brief turn on selected led + \param[in] lednum: specify the led to be turned on + \arg LED + \param[out] none + \retval none +*/ +void gd_eval_led_on(led_typedef_enum lednum) { GPIO_BOP(GPIO_PORT[lednum]) = GPIO_PIN[lednum]; } + +/*! + \brief turn off selected led + \param[in] lednum: specify the led to be turned off + \arg LED + \param[out] none + \retval none +*/ +void gd_eval_led_off(led_typedef_enum lednum) { GPIO_BC(GPIO_PORT[lednum]) = GPIO_PIN[lednum]; } + +/*! + \brief toggle selected led + \param[in] lednum: specify the led to be toggled + \arg LED + \param[out] none + \retval none +*/ +void gd_eval_led_toggle(led_typedef_enum lednum) +{ + gpio_bit_write(GPIO_PORT[lednum], GPIO_PIN[lednum], (bit_status)(1 - gpio_input_bit_get(GPIO_PORT[lednum], GPIO_PIN[lednum]))); +} + +/*! + \brief configure key + \param[in] key_num: specify the key to be configured + \arg F1_KEY + \arg F2_KEY + \param[in] key_mode: specify button mode + \arg KEY_MODE_GPIO: key will be used as simple IO + \arg KEY_MODE_EXTI: key will be connected to EXTI line with interrupt + \param[out] none + \retval none +*/ +void gd_eval_key_init(key_typedef_enum keynum, keymode_typedef_enum keymode) +{ + /* enable the key clock */ + rcu_periph_clock_enable(KEY_CLK[keynum]); + rcu_periph_clock_enable(RCU_AF); + + /* configure button pin as input */ + gpio_init(KEY_PORT[keynum], GPIO_MODE_IN_FLOATING, GPIO_OSPEED_50MHZ, KEY_PIN[keynum]); + + if (keymode == KEY_MODE_EXTI) { + /* enable and set key EXTI interrupt to the lowest priority */ + eclic_irq_enable(KEY_IRQn[keynum],1, 1); + + /* connect key EXTI line to key GPIO pin */ + gpio_exti_source_select(KEY_PORT_SOURCE[keynum], KEY_PIN_SOURCE[keynum]); + + /* configure key EXTI line */ + exti_init(KEY_EXTI_LINE[keynum], EXTI_INTERRUPT, EXTI_TRIG_FALLING); + exti_interrupt_flag_clear(KEY_EXTI_LINE[keynum]); + } +} + +/*! + \brief return the selected key state + \param[in] key: specify the key to be checked + \arg F1_KEY + \arg F2_KEY + \param[out] none + \retval the key's GPIO pin value +*/ +uint8_t gd_eval_key_state_get(key_typedef_enum key) { return gpio_input_bit_get(KEY_PORT[key], KEY_PIN[key]); } + +/*! + \brief configure COM port + \param[in] com: COM on the board + \arg EVAL_COM0: COM0 on the board + \arg EVAL_COM1: COM1 on the board + \param[out] none + \retval none +*/ +void gd_eval_com_init(uint32_t com) +{ + uint32_t com_id = 0U; + if (EVAL_COM0 == com) + { + com_id = 0U; + } + else if (EVAL_COM1 == com) + { + com_id = 1U; + } + + /* enable GPIO clock */ + rcu_periph_clock_enable(COM_GPIO_CLK[com_id]); + + /* enable USART clock */ + rcu_periph_clock_enable(COM_CLK[com_id]); + + /* connect port to USARTx_Tx */ + gpio_init(COM_GPIO_PORT[com_id], GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, COM_TX_PIN[com_id]); + + /* connect port to USARTx_Rx */ + gpio_init(COM_GPIO_PORT[com_id], GPIO_MODE_IN_FLOATING, GPIO_OSPEED_50MHZ, COM_RX_PIN[com_id]); + + /* USART configure */ + usart_deinit(com); + if (EVAL_COM0 == com) + { + usart_baudrate_set(com, 115200U); + } + else if (EVAL_COM1 == com) + { + usart_baudrate_set(com, 9600U); + } + usart_receive_config(com, USART_RECEIVE_ENABLE); + usart_transmit_config(com, USART_TRANSMIT_ENABLE); + usart_enable(com); +} + +/* retarget the C library printf function to the USART */ +/*int _put_char(int ch) +{ + usart_data_transmit(EVAL_COM0, (uint8_t) ch ); + while ( usart_flag_get(EVAL_COM0, USART_FLAG_TBE)== RESET){ + } + + return ch; +}*/ + diff --git a/board/TencentOS_tiny_EVB_LX/BSP/Src/gd32vf103_it.c b/board/TencentOS_tiny_EVB_LX/BSP/Src/gd32vf103_it.c new file mode 100644 index 00000000..aa33583b --- /dev/null +++ b/board/TencentOS_tiny_EVB_LX/BSP/Src/gd32vf103_it.c @@ -0,0 +1,11 @@ +#include "tos.h" + +// systick handler +void eclic_mtip_handler() { + port_systick_config((uint32_t)k_cpu_cycle_per_tick); + if (tos_knl_is_running()) { + tos_knl_irq_enter(); + tos_tick_handler(); + tos_knl_irq_leave(); + } +} diff --git a/board/TencentOS_tiny_EVB_LX/BSP/Src/mcu_init.c b/board/TencentOS_tiny_EVB_LX/BSP/Src/mcu_init.c new file mode 100644 index 00000000..2eee0d82 --- /dev/null +++ b/board/TencentOS_tiny_EVB_LX/BSP/Src/mcu_init.c @@ -0,0 +1,26 @@ +#include "mcu_init.h" + +static void led_config(void) +{ + rcu_periph_clock_enable(LED_GPIO_CLK); + + + /* configure LED GPIO port */ + gpio_init(LED_GPIO_PORT, GPIO_MODE_OUT_PP, GPIO_OSPEED_50MHZ, LED_PIN); + /* reset LED GPIO pin */ + gpio_bit_set(LED_GPIO_PORT, LED_PIN); +} + +void board_init() { + char *str = "Tencent"; + SystemInit(); + led_config(); + uart3_init(115200); + OLED_Init(); + OLED_Clear(); + OLED_ShowChinese(36,0,0); + OLED_ShowChinese(54,0,1); + OLED_ShowChinese(72,0,2); + OLED_ShowString(36,2,(uint8_t*)str,8); + +} diff --git a/board/TencentOS_tiny_EVB_LX/BSP/Src/oled.c b/board/TencentOS_tiny_EVB_LX/BSP/Src/oled.c new file mode 100644 index 00000000..0f687ee8 --- /dev/null +++ b/board/TencentOS_tiny_EVB_LX/BSP/Src/oled.c @@ -0,0 +1,312 @@ +#include "oled.h" +#include "stdlib.h" +#include "oledfont.h" + +void delay(unsigned int t) +{ + for(int i = 0; i < 1000; i++) + for(int j = 0; j < t;j++); +} +void IIC_Start(void) +{ + OLED_SCLK_Set(); + OLED_SDIN_Set(); + OLED_SDIN_Clr(); + OLED_SCLK_Clr(); +} + +/********************************************** +//IIC Stop +**********************************************/ +void IIC_Stop(void) +{ + OLED_SCLK_Set(); + OLED_SDIN_Clr(); + OLED_SDIN_Set(); +} + +void IIC_Wait_Ack(void) +{ + OLED_SCLK_Set(); + OLED_SCLK_Clr(); +} +/********************************************** +// IIC Write byte +**********************************************/ + +void Write_IIC_Byte(unsigned char IIC_Byte) +{ + unsigned char i; + unsigned char m,da; + da=IIC_Byte; + OLED_SCLK_Clr(); + for(i=0;i<8;i++) + { + m=da; + m=m&0x80; + if(m==0x80) + { + OLED_SDIN_Set(); + } + else + OLED_SDIN_Clr(); + da=da<<1; + OLED_SCLK_Set(); + OLED_SCLK_Clr(); + } +} +/********************************************** +// IIC Write Command +**********************************************/ +void Write_IIC_Command(unsigned char IIC_Command) +{ + IIC_Start(); + Write_IIC_Byte(0x78); //Slave address,SA0=0 + IIC_Wait_Ack(); + Write_IIC_Byte(0x00); //write command + IIC_Wait_Ack(); + Write_IIC_Byte(IIC_Command); + IIC_Wait_Ack(); + IIC_Stop(); +} +/********************************************** +// IIC Write Data +**********************************************/ +void Write_IIC_Data(unsigned char IIC_Data) +{ + IIC_Start(); + Write_IIC_Byte(0x78); //D/C#=0; R/W#=0 + IIC_Wait_Ack(); + Write_IIC_Byte(0x40); //write data + IIC_Wait_Ack(); + Write_IIC_Byte(IIC_Data); + IIC_Wait_Ack(); + IIC_Stop(); +} +void OLED_WR_Byte(unsigned dat,unsigned cmd) +{ + if(cmd) + { + Write_IIC_Data(dat); + } + else + { + Write_IIC_Command(dat); + } +} + + +/******************************************** +// fill_Picture +********************************************/ +void fill_picture(unsigned char fill_Data) +{ + unsigned char m,n; + for(m=0;m<8;m++) + { + OLED_WR_Byte(0xb0+m,0); //page0-page1 + OLED_WR_Byte(0x00,0); //low column start address + OLED_WR_Byte(0x10,0); //high column start address + for(n=0;n<128;n++) + { + OLED_WR_Byte(fill_Data,1); + } + } +} + + +void OLED_Set_Pos(unsigned char x, unsigned char y) +{ + OLED_WR_Byte(0xb0+y,OLED_CMD); + OLED_WR_Byte(((x&0xf0)>>4)|0x10,OLED_CMD); + OLED_WR_Byte((x&0x0f),OLED_CMD); +} + +void OLED_Display_On(void) +{ + OLED_WR_Byte(0X8D,OLED_CMD); //SET DCDC + OLED_WR_Byte(0X14,OLED_CMD); //DCDC ON + OLED_WR_Byte(0XAF,OLED_CMD); //DISPLAY ON +} + +void OLED_Display_Off(void) +{ + OLED_WR_Byte(0X8D,OLED_CMD); //SET DCDC + OLED_WR_Byte(0X10,OLED_CMD); //DCDC OFF + OLED_WR_Byte(0XAE,OLED_CMD); //DISPLAY OFF +} + +void OLED_Clear(void) +{ + uint8_t i,n; + for(i=0;i<8;i++) + { + OLED_WR_Byte (0xb0+i,OLED_CMD); + OLED_WR_Byte (0x00,OLED_CMD); + OLED_WR_Byte (0x10,OLED_CMD); + for(n=0;n<128;n++) + OLED_WR_Byte(0,OLED_DATA); + } +} +void OLED_On(void) +{ + uint8_t i,n; + for(i=0;i<8;i++) + { + OLED_WR_Byte (0xb0+i,OLED_CMD); + OLED_WR_Byte (0x00,OLED_CMD); + OLED_WR_Byte (0x10,OLED_CMD); + for(n=0;n<128;n++)OLED_WR_Byte(1,OLED_DATA); + } +} + +void OLED_ShowChar(uint8_t x,uint8_t y,uint8_t chr,uint8_t Char_Size) +{ + unsigned char c=0,i=0; + c=chr-' '; + if(x>Max_Column-1){x=0;y=y+2;} + if(Char_Size ==16) + { + OLED_Set_Pos(x,y); + for(i=0;i<8;i++) + { + OLED_WR_Byte(F8X16[c*16+i],OLED_DATA); + } + OLED_Set_Pos(x,y+1); + for(i=0;i<8;i++){ + OLED_WR_Byte(F8X16[c*16+i+8],OLED_DATA); + } + } + else + { + OLED_Set_Pos(x,y); + for(i=0;i<6;i++) + OLED_WR_Byte(F6x8[c][i],OLED_DATA); + } +} + + +uint32_t oled_pow(uint8_t m,uint8_t n) +{ + uint32_t result=1; + while(n--)result*=m; + return result; +} + +void OLED_ShowNum(uint8_t x,uint8_t y,uint32_t num,uint8_t len,uint8_t size2) +{ + uint8_t t,temp; + uint8_t enshow=0; + for(t=0;t120) + { + x=0;y+=2; + } + j++; + } +} + +void OLED_ShowChinese(uint8_t x,uint8_t y,uint8_t no) +{ + uint8_t t,adder=0; + OLED_Set_Pos(x,y); + for(t=0;t<16;t++) + { + OLED_WR_Byte(Hzk[2*no][t],OLED_DATA); + adder+=1; + } + OLED_Set_Pos(x,y+1); + for(t=0;t<16;t++) + { + OLED_WR_Byte(Hzk[2*no+1][t],OLED_DATA); + adder+=1; + } +} + +void OLED_DrawBMP(unsigned char x0, unsigned char y0,unsigned char x1, unsigned char y1,unsigned char BMP[]) +{ + unsigned int j=0; + unsigned char x,y; + + if(y1%8==0) y=y1/8; + else y=y1/8+1; + for(y=y0;y 0u) +#define TOS_CFG_MSG_EN 1u +#else +#define TOS_CFG_MSG_EN 0u +#endif + +// 配置TencentOS tiny消息队列大小 +#define TOS_CFG_MSG_POOL_SIZE 10u + +// 配置TencentOS tiny空闲任务栈大小 +#define TOS_CFG_IDLE_TASK_STK_SIZE 512u + +// 配置TencentOS tiny中断栈大小 +#define TOS_CFG_IRQ_STK_SIZE 128u + +// 配置TencentOS tiny的tick频率 +#define TOS_CFG_CPU_TICK_PER_SECOND 1000u + +// 配置TencentOS tiny CPU频率 +// 除4的原因是,Bumblebee内核通过core_clk_aon四分频来更新mtime寄存器 +// 具体信息参见《Bumblebee内核简明数据手册》 +#define TOS_CFG_CPU_CLOCK (SystemCoreClock/4) + +// 配置是否将TIMER配置成函数模式 +#define TOS_CFG_TIMER_AS_PROC 1u + +#define TOS_CFG_VFS_EN 1u + +#define TOS_CFG_MMBLK_EN 1u + + +#endif /* INC_TOS_CONFIG_H_ */ diff --git a/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/.cproject b/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/.cproject new file mode 100644 index 00000000..28693a92 --- /dev/null +++ b/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/.cproject @@ -0,0 +1,438 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/.gitignore b/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/.gitignore new file mode 100644 index 00000000..3df573fe --- /dev/null +++ b/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/.gitignore @@ -0,0 +1 @@ +/Debug/ diff --git a/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/.project b/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/.project new file mode 100644 index 00000000..c505a084 --- /dev/null +++ b/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/.project @@ -0,0 +1,94 @@ + + + hello_world + + + + + + org.eclipse.cdt.managedbuilder.core.genmakebuilder + clean,full,incremental, + + + + + org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder + full,incremental, + + + + + + org.eclipse.cdt.core.cnature + org.eclipse.cdt.managedbuilder.core.managedBuildNature + org.eclipse.cdt.managedbuilder.core.ScannerConfigNature + + + + Application + 2 + virtual:/virtual + + + GD32VF103_Firmware_Library + 2 + $%7BPARENT-4-PROJECT_LOC%7D/platform/vendor_bsp/gd/GD32VF103_Firmware_Library + + + TencentOS_tiny + 2 + virtual:/virtual + + + Application/Inc + 2 + $%7BPARENT-2-PROJECT_LOC%7D/BSP/Inc + + + Application/Src + 2 + $%7BPARENT-2-PROJECT_LOC%7D/BSP/Src + + + Application/tos_config.h + 1 + $%7BPARENT-2-PROJECT_LOC%7D/TOS_CONFIG/tos_config.h + + + TencentOS_tiny/arch + 2 + virtual:/virtual + + + TencentOS_tiny/kernel + 2 + $%7BPARENT-4-PROJECT_LOC%7D/kernel + + + TencentOS_tiny/arch/risc-v + 2 + virtual:/virtual + + + TencentOS_tiny/arch/risc-v/bumblebee + 2 + TOP_DIR/arch/risc-v/bumblebee/gcc + + + TencentOS_tiny/arch/risc-v/common + 2 + $%7BPARENT-4-PROJECT_LOC%7D/arch/risc-v/common + + + TencentOS_tiny/arch/risc-v/rv32i + 2 + TOP_DIR/arch/risc-v/rv32i/gcc + + + + + TOP_DIR + $%7BPARENT-4-PROJECT_LOC%7D + + + diff --git a/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/gd32vf103_libopt.h b/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/gd32vf103_libopt.h new file mode 100644 index 00000000..875ff748 --- /dev/null +++ b/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/gd32vf103_libopt.h @@ -0,0 +1,61 @@ +/*! + \file gd32vf103_libopt.h + \brief library optional for gd32vf103 + + \version 2019-6-5, V1.0.0, demo for GD32VF103 +*/ + +/* + Copyright (c) 2019, GigaDevice Semiconductor Inc. + + 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 the copyright holder 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. +*/ + +#ifndef GD32VF103_LIBOPT_H +#define GD32VF103_LIBOPT_H + +#include "gd32vf103_adc.h" +#include "gd32vf103_bkp.h" +#include "gd32vf103_can.h" +#include "gd32vf103_crc.h" +#include "gd32vf103_dac.h" +#include "gd32vf103_dma.h" +#include "gd32vf103_eclic.h" +#include "gd32vf103_exmc.h" +#include "gd32vf103_exti.h" +#include "gd32vf103_fmc.h" +#include "gd32vf103_gpio.h" +#include "gd32vf103_i2c.h" +#include "gd32vf103_fwdgt.h" +#include "gd32vf103_dbg.h" +#include "gd32vf103_pmu.h" +#include "gd32vf103_rcu.h" +#include "gd32vf103_rtc.h" +#include "gd32vf103_spi.h" +#include "gd32vf103_timer.h" +#include "gd32vf103_usart.h" +#include "gd32vf103_wwdgt.h" +#include "n200_func.h" + +#endif /* GD32VF103_LIBOPT_H */ diff --git a/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/link.lds b/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/link.lds new file mode 100644 index 00000000..1c32e640 --- /dev/null +++ b/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/link.lds @@ -0,0 +1,175 @@ +OUTPUT_ARCH( "riscv" ) + +ENTRY( _start ) + +MEMORY +{ + /* Run in FLASH */ + flash (rxai!w) : ORIGIN = 0x08000000, LENGTH = 128k + ram (wxa!ri) : ORIGIN = 0x20000000, LENGTH = 32K + + /* Run in RAM */ +/* flash (rxai!w) : ORIGIN = 0x20000000, LENGTH = 24k + ram (wxa!ri) : ORIGIN = 0x20006000, LENGTH = 8K +*/ +} + + +SECTIONS +{ + __stack_size = DEFINED(__stack_size) ? __stack_size : 2K; + + + .init : + { + KEEP (*(SORT_NONE(.init))) + } >flash AT>flash + + .ilalign : + { + . = ALIGN(4); + PROVIDE( _ilm_lma = . ); + } >flash AT>flash + + .ialign : + { + PROVIDE( _ilm = . ); + } >flash AT>flash + + .text : + { + *(.rodata .rodata.*) + *(.text.unlikely .text.unlikely.*) + *(.text.startup .text.startup.*) + *(.text .text.*) + *(.gnu.linkonce.t.*) + } >flash AT>flash + + .fini : + { + KEEP (*(SORT_NONE(.fini))) + } >flash AT>flash + + . = ALIGN(4); + + PROVIDE (__etext = .); + PROVIDE (_etext = .);/*0x80022c8*/ + PROVIDE (etext = .);/*0x80022c8*/ + PROVIDE( _eilm = . ); + + .preinit_array : + { + PROVIDE_HIDDEN (__preinit_array_start = .); + KEEP (*(.preinit_array)) + PROVIDE_HIDDEN (__preinit_array_end = .); + } >flash AT>flash + + .init_array : + { + PROVIDE_HIDDEN (__init_array_start = .); + KEEP (*(SORT_BY_INIT_PRIORITY(.init_array.*) SORT_BY_INIT_PRIORITY(.ctors.*))) + KEEP (*(.init_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .ctors)) + PROVIDE_HIDDEN (__init_array_end = .); + } >flash AT>flash + + .fini_array : + { + PROVIDE_HIDDEN (__fini_array_start = .); + KEEP (*(SORT_BY_INIT_PRIORITY(.fini_array.*) SORT_BY_INIT_PRIORITY(.dtors.*))) + KEEP (*(.fini_array EXCLUDE_FILE (*crtbegin.o *crtbegin?.o *crtend.o *crtend?.o ) .dtors)) + PROVIDE_HIDDEN (__fini_array_end = .); + } >flash AT>flash + + .ctors : + { + /* gcc uses crtbegin.o to find the start of + the constructors, so we make sure it is + first. Because this is a wildcard, it + doesn't matter if the user does not + actually link against crtbegin.o; the + linker won't look for a file to match a + wildcard. The wildcard also means that it + doesn't matter which directory crtbegin.o + is in. */ + KEEP (*crtbegin.o(.ctors)) + KEEP (*crtbegin?.o(.ctors)) + /* We don't want to include the .ctor section from + the crtend.o file until after the sorted ctors. + The .ctor section from the crtend file contains the + end of ctors marker and it must be last */ + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .ctors)) + KEEP (*(SORT(.ctors.*))) + KEEP (*(.ctors)) + } >flash AT>flash + + .dtors : + { + KEEP (*crtbegin.o(.dtors)) + KEEP (*crtbegin?.o(.dtors)) + KEEP (*(EXCLUDE_FILE (*crtend.o *crtend?.o ) .dtors)) + KEEP (*(SORT(.dtors.*))) + KEEP (*(.dtors)) + } >flash AT>flash + + . = ALIGN(4); + PROVIDE( _eilm = . ); + + .lalign : + { + . = ALIGN(4); + PROVIDE( _data_lma = . ); + } >flash AT>flash + + .dalign : + { + . = ALIGN(4); + PROVIDE( _data = . ); + } >ram AT>flash + + + .data : + { + *(.rdata) + + *(.gnu.linkonce.r.*) + *(.data .data.*) + *(.gnu.linkonce.d.*) + . = ALIGN(8); + PROVIDE( __global_pointer$ = . + 0x800); + *(.sdata .sdata.*) + *(.gnu.linkonce.s.*) + . = ALIGN(8); + *(.srodata.cst16) + *(.srodata.cst8) + *(.srodata.cst4) + *(.srodata.cst2) + *(.srodata .srodata.*) + } >ram AT>flash + + . = ALIGN(4); + PROVIDE( _edata = . ); + PROVIDE( edata = . ); + + PROVIDE( _fbss = . ); /*0X200052A0 0X200002A0*/ + PROVIDE( __bss_start = . ); + .bss : + { + *(.sbss*) + *(.gnu.linkonce.sb.*) + *(.bss .bss.*) + *(.gnu.linkonce.b.*) + *(COMMON) + . = ALIGN(4); + } >ram AT>ram + + . = ALIGN(8); + PROVIDE( _end = . ); /*0X2000,0340*/ + PROVIDE( end = . ); + + .stack ORIGIN(ram) + LENGTH(ram) - __stack_size : + { + PROVIDE( _heap_end = . ); + . = __stack_size; + PROVIDE( _sp = . ); + } >ram AT>ram +} diff --git a/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/main.c b/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/main.c new file mode 100644 index 00000000..3541a26f --- /dev/null +++ b/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/main.c @@ -0,0 +1,57 @@ +#include "mcu_init.h" +#include "tos.h" + +#define TASK_SIZE 1024 +k_task_t k_task_task1; +k_task_t k_task_task2; +uint8_t k_task1_stk[TASK_SIZE]; +uint8_t k_task2_stk[TASK_SIZE]; + +void task1(void *pdata) +{ + int task_cnt1 = 0; + while (1) { + printf("hello world from %s cnt: %d\n", __func__, task_cnt1++); + if (task_cnt1 % 2 == 0) + { + gpio_bit_write(LED_GPIO_PORT, LED_PIN,SET); + } + else + { + gpio_bit_write(LED_GPIO_PORT, LED_PIN,RESET); + } + tos_task_delay(1000); + } +} + +void task2(void *pdata) +{ + int task_cnt2 = 0; + while (1) { + printf("hello world from %s cnt: %d\n", __func__, task_cnt2++); + if (task_cnt2 %2 == 0) + { + gpio_bit_write(GPIOE, GPIO_PIN_0,SET); + gpio_bit_write(GPIOE, GPIO_PIN_1,SET); + } + else + { + gpio_bit_write(GPIOE, GPIO_PIN_0,RESET); + gpio_bit_write(GPIOE, GPIO_PIN_1,RESET); + } + tos_task_delay(500); + } +} + + +void main(void) { + board_init(); + + tos_knl_init(); + + tos_task_create(&k_task_task1, "task1", task1, NULL, 3, k_task1_stk, TASK_SIZE, 0); + tos_task_create(&k_task_task2, "task2", task2, NULL, 3, k_task2_stk, TASK_SIZE, 0); + + tos_knl_start(); + +} diff --git a/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/openocd_gdlink.cfg b/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/openocd_gdlink.cfg new file mode 100644 index 00000000..3ec85d42 --- /dev/null +++ b/board/TencentOS_tiny_EVB_LX/eclipse/hello_world/openocd_gdlink.cfg @@ -0,0 +1,45 @@ +adapter_khz 1000 +reset_config srst_only +adapter_nsrst_assert_width 100 + + + +interface cmsis-dap + +transport select jtag + +#autoexit true + +set _CHIPNAME riscv +jtag newtap $_CHIPNAME cpu -irlen 5 -expected-id 0x1000563d + +set _TARGETNAME $_CHIPNAME.cpu +target create $_TARGETNAME riscv -chain-position $_TARGETNAME +$_TARGETNAME configure -work-area-phys 0x20000000 -work-area-size 20480 -work-area-backup 0 + + +# Work-area is a space in RAM used for flash programming +if { [info exists WORKAREASIZE] } { + set _WORKAREASIZE $WORKAREASIZE +} else { + set _WORKAREASIZE 0x5000 +} + +# Allow overriding the Flash bank size +if { [info exists FLASH_SIZE] } { + set _FLASH_SIZE $FLASH_SIZE +} else { + # autodetect size + set _FLASH_SIZE 0 +} + +# flash size will be probed +set _FLASHNAME $_CHIPNAME.flash + +flash bank $_FLASHNAME gd32vf103 0x08000000 0 0 0 $_TARGETNAME +riscv set_reset_timeout_sec 1 +init + +halt + + From 539dc6a152cf249dbeff468144dafba80f988e47 Mon Sep 17 00:00:00 2001 From: royye Date: Tue, 17 Dec 2019 19:53:58 +0800 Subject: [PATCH 2/8] add end-to-end example sensor_e53_ia1_e2e_demo --- .../TencentOS_tiny.uvoptx | 1432 +++++++++++++++++ .../TencentOS_tiny.uvprojx | 910 +++++++++++ .../startup_stm32l431xx.s | 404 +++++ .../wrapper/src/mqtt_wrapper.c | 2 +- .../e53_ia1_e2e_demo.c | 418 +++++ .../e53_ia1_e2e_demo.h | 16 + .../e53_ia1_e2e_demo_config.h | 12 + 7 files changed, 3193 insertions(+), 1 deletion(-) create mode 100644 board/TencentOS_tiny_EVB_MX/KEIL/sensor_e53_ia1_e2e_demo/TencentOS_tiny.uvoptx create mode 100644 board/TencentOS_tiny_EVB_MX/KEIL/sensor_e53_ia1_e2e_demo/TencentOS_tiny.uvprojx create mode 100644 board/TencentOS_tiny_EVB_MX/KEIL/sensor_e53_ia1_e2e_demo/startup_stm32l431xx.s create mode 100644 examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo.c create mode 100644 examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo.h create mode 100644 examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo_config.h diff --git a/board/TencentOS_tiny_EVB_MX/KEIL/sensor_e53_ia1_e2e_demo/TencentOS_tiny.uvoptx b/board/TencentOS_tiny_EVB_MX/KEIL/sensor_e53_ia1_e2e_demo/TencentOS_tiny.uvoptx new file mode 100644 index 00000000..119cf92a --- /dev/null +++ b/board/TencentOS_tiny_EVB_MX/KEIL/sensor_e53_ia1_e2e_demo/TencentOS_tiny.uvoptx @@ -0,0 +1,1432 @@ + + + + 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 + 11 + + + + + + + + + + + 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 -S1 -C0 -A0 -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 + 1 + tos_next_task + + + 1 + 1 + tos_rdyq.highest_prio + + + 2 + 1 + task_list + + + 3 + 1 + 0x20000280 + + + 4 + 1 + tos_rdyq.highest_prio + + + 5 + 1 + owner + + + 6 + 1 + tos_curr_task + + + 7 + 1 + highest_pending_prio + + + 8 + 1 + task + + + + + 1 + 0 + 0xE000ED88 + 0 + + + + 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 + + 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 + + + + + examples + 1 + 0 + 0 + 0 + + 3 + 12 + 1 + 0 + 0 + 0 + ..\..\..\..\examples\sensor_e53_ia1_e2e_demo\e53_ia1_e2e_demo.c + e53_ia1_e2e_demo.c + 0 + 0 + + + + + Drivers/STM32L4xx_HAL_Driver + 0 + 0 + 0 + 0 + + 4 + 13 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_tim.c + stm32l4xx_hal_tim.c + 0 + 0 + + + 4 + 14 + 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 + 15 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_uart.c + stm32l4xx_hal_uart.c + 0 + 0 + + + 4 + 16 + 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 + 17 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal.c + stm32l4xx_hal.c + 0 + 0 + + + 4 + 18 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_i2c.c + stm32l4xx_hal_i2c.c + 0 + 0 + + + 4 + 19 + 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 + 20 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_rcc.c + stm32l4xx_hal_rcc.c + 0 + 0 + + + 4 + 21 + 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 + 22 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_flash.c + stm32l4xx_hal_flash.c + 0 + 0 + + + 4 + 23 + 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 + 24 + 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 + 25 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_gpio.c + stm32l4xx_hal_gpio.c + 0 + 0 + + + 4 + 26 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dma.c + stm32l4xx_hal_dma.c + 0 + 0 + + + 4 + 27 + 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 + 28 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_pwr.c + stm32l4xx_hal_pwr.c + 0 + 0 + + + 4 + 29 + 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 + 30 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_cortex.c + stm32l4xx_hal_cortex.c + 0 + 0 + + + 4 + 31 + 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 + 32 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_adc.c + stm32l4xx_hal_adc.c + 0 + 0 + + + 4 + 33 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dac.c + stm32l4xx_hal_dac.c + 0 + 0 + + + 4 + 34 + 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 + 35 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_spi.c + stm32l4xx_hal_spi.c + 0 + 0 + + + 4 + 36 + 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 + 37 + 1 + 0 + 0 + 0 + ..\..\BSP\Src\system_stm32l4xx.c + system_stm32l4xx.c + 0 + 0 + + + + + Hardware + 0 + 0 + 0 + 0 + + 6 + 38 + 1 + 0 + 0 + 0 + ..\..\BSP\Hardware\DHT11\DHT11_BUS.c + DHT11_BUS.c + 0 + 0 + + + 6 + 39 + 1 + 0 + 0 + 0 + ..\..\BSP\Hardware\OLED\oled.c + oled.c + 0 + 0 + + + 6 + 40 + 1 + 0 + 0 + 0 + ..\..\BSP\Hardware\E53_IA1\E53_IA1.c + E53_IA1.c + 0 + 0 + + + + + kernel + 0 + 0 + 0 + 0 + + 7 + 41 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_binary_heap.c + tos_binary_heap.c + 0 + 0 + + + 7 + 42 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_char_fifo.c + tos_char_fifo.c + 0 + 0 + + + 7 + 43 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_completion.c + tos_completion.c + 0 + 0 + + + 7 + 44 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_countdownlatch.c + tos_countdownlatch.c + 0 + 0 + + + 7 + 45 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_event.c + tos_event.c + 0 + 0 + + + 7 + 46 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_global.c + tos_global.c + 0 + 0 + + + 7 + 47 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_mail_queue.c + tos_mail_queue.c + 0 + 0 + + + 7 + 48 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_message_queue.c + tos_message_queue.c + 0 + 0 + + + 7 + 49 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_mmblk.c + tos_mmblk.c + 0 + 0 + + + 7 + 50 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_mmheap.c + tos_mmheap.c + 0 + 0 + + + 7 + 51 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_mutex.c + tos_mutex.c + 0 + 0 + + + 7 + 52 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_pend.c + tos_pend.c + 0 + 0 + + + 7 + 53 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_priority_mail_queue.c + tos_priority_mail_queue.c + 0 + 0 + + + 7 + 54 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_priority_message_queue.c + tos_priority_message_queue.c + 0 + 0 + + + 7 + 55 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_priority_queue.c + tos_priority_queue.c + 0 + 0 + + + 7 + 56 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_ring_queue.c + tos_ring_queue.c + 0 + 0 + + + 7 + 57 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_robin.c + tos_robin.c + 0 + 0 + + + 7 + 58 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_sched.c + tos_sched.c + 0 + 0 + + + 7 + 59 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_sem.c + tos_sem.c + 0 + 0 + + + 7 + 60 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_sys.c + tos_sys.c + 0 + 0 + + + 7 + 61 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_task.c + tos_task.c + 0 + 0 + + + 7 + 62 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_tick.c + tos_tick.c + 0 + 0 + + + 7 + 63 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_time.c + tos_time.c + 0 + 0 + + + 7 + 64 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_timer.c + tos_timer.c + 0 + 0 + + + + + cpu + 0 + 0 + 0 + 0 + + 8 + 65 + 2 + 0 + 0 + 0 + ..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc\port_s.S + port_s.S + 0 + 0 + + + 8 + 66 + 1 + 0 + 0 + 0 + ..\..\..\..\arch\arm\arm-v7m\common\tos_cpu.c + tos_cpu.c + 0 + 0 + + + 8 + 67 + 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 + 68 + 1 + 0 + 0 + 0 + ..\..\..\..\osal\cmsis_os\cmsis_os.c + cmsis_os.c + 0 + 0 + + + + + config + 1 + 0 + 0 + 0 + + 10 + 69 + 5 + 0 + 0 + 0 + ..\..\TOS-CONFIG\tos_config.h + tos_config.h + 0 + 0 + + + + + devices + 0 + 0 + 0 + 0 + + 11 + 70 + 1 + 0 + 0 + 0 + ..\..\..\..\devices\bc35_28_95\bc35_28_95.c + bc35_28_95.c + 0 + 0 + + + 11 + 71 + 1 + 0 + 0 + 0 + ..\..\..\..\devices\esp8266\esp8266.c + esp8266.c + 0 + 0 + + + + + hal + 0 + 0 + 0 + 0 + + 12 + 72 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\hal\st\stm32l4xx\src\tos_hal_uart.c + tos_hal_uart.c + 0 + 0 + + + + + at + 0 + 0 + 0 + 0 + + 13 + 73 + 1 + 0 + 0 + 0 + ..\..\..\..\net\at\src\tos_at.c + tos_at.c + 0 + 0 + + + 13 + 74 + 1 + 0 + 0 + 0 + ..\..\..\..\net\at\src\tos_at_utils.c + tos_at_utils.c + 0 + 0 + + + 13 + 75 + 1 + 0 + 0 + 0 + ..\..\..\..\net\sal_module_wrapper\sal_module_wrapper.c + sal_module_wrapper.c + 0 + 0 + + + + + mqtt + 0 + 0 + 0 + 0 + + 14 + 76 + 1 + 0 + 0 + 0 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\wrapper\src\mqtt_wrapper.c + mqtt_wrapper.c + 0 + 0 + + + 14 + 77 + 1 + 0 + 0 + 0 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\wrapper\src\transport_wrapper.c + transport_wrapper.c + 0 + 0 + + + 14 + 78 + 1 + 0 + 0 + 0 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\src\MQTTConnectClient.c + MQTTConnectClient.c + 0 + 0 + + + 14 + 79 + 1 + 0 + 0 + 0 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\src\MQTTConnectServer.c + MQTTConnectServer.c + 0 + 0 + + + 14 + 80 + 1 + 0 + 0 + 0 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\src\MQTTDeserializePublish.c + MQTTDeserializePublish.c + 0 + 0 + + + 14 + 81 + 1 + 0 + 0 + 0 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\src\MQTTFormat.c + MQTTFormat.c + 0 + 0 + + + 14 + 82 + 1 + 0 + 0 + 0 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\src\MQTTPacket.c + MQTTPacket.c + 0 + 0 + + + 14 + 83 + 1 + 0 + 0 + 0 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\src\MQTTSerializePublish.c + MQTTSerializePublish.c + 0 + 0 + + + 14 + 84 + 1 + 0 + 0 + 0 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\src\MQTTSubscribeClient.c + MQTTSubscribeClient.c + 0 + 0 + + + 14 + 85 + 1 + 0 + 0 + 0 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\src\MQTTSubscribeServer.c + MQTTSubscribeServer.c + 0 + 0 + + + 14 + 86 + 1 + 0 + 0 + 0 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\src\MQTTUnsubscribeClient.c + MQTTUnsubscribeClient.c + 0 + 0 + + + 14 + 87 + 1 + 0 + 0 + 0 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\src\MQTTUnsubscribeServer.c + MQTTUnsubscribeServer.c + 0 + 0 + + + + + components + 1 + 0 + 0 + 0 + + 15 + 88 + 1 + 0 + 0 + 0 + ..\..\..\..\components\utils\JSON\src\cJSON.c + cJSON.c + 0 + 0 + + + + + ::CMSIS + 0 + 0 + 0 + 1 + + +
diff --git a/board/TencentOS_tiny_EVB_MX/KEIL/sensor_e53_ia1_e2e_demo/TencentOS_tiny.uvprojx b/board/TencentOS_tiny_EVB_MX/KEIL/sensor_e53_ia1_e2e_demo/TencentOS_tiny.uvprojx new file mode 100644 index 00000000..4fe0987a --- /dev/null +++ b/board/TencentOS_tiny_EVB_MX/KEIL/sensor_e53_ia1_e2e_demo/TencentOS_tiny.uvprojx @@ -0,0 +1,910 @@ + + + + 2.1 + +
### uVision Project, (C) Keil Software
+ + + + TencentOS_tiny + 0x4 + ARM-ADS + 5060061::V5.06 update 1 (build 61)::ARMCC + + + STM32L431RCTx + STMicroelectronics + Keil.STM32L4xx_DFP.2.2.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 + 4103 + + 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 + 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 + 1 + 1 + 1 + 1 + + + USE_HAL_DRIVER,STM32L431xx + + ..\..\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;..\..\..\..\net\at\include;..\..\..\..\kernel\hal\include;..\..\..\..\net\sal_module_wrapper;..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\wrapper\include;..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\include;..\..\..\..\devices\bc35_28_95;..\..\..\..\devices\esp8266;..\..\..\..\devices\m26;..\..\..\..\components\utils\JSON\include;..\..\BSP\Hardware\E53_IA1;..\..\..\..\examples\sensor_e53_ia1_e2e_demo + + + + 1 + 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 + + + + + examples + + + e53_ia1_e2e_demo.c + 1 + ..\..\..\..\examples\sensor_e53_ia1_e2e_demo\e53_ia1_e2e_demo.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 + + + E53_IA1.c + 1 + ..\..\BSP\Hardware\E53_IA1\E53_IA1.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 + + + + + config + + + tos_config.h + 5 + ..\..\TOS-CONFIG\tos_config.h + + + + + devices + + + bc35_28_95.c + 1 + ..\..\..\..\devices\bc35_28_95\bc35_28_95.c + + + esp8266.c + 1 + ..\..\..\..\devices\esp8266\esp8266.c + + + + + hal + + + tos_hal_uart.c + 1 + ..\..\..\..\platform\hal\st\stm32l4xx\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 + + + sal_module_wrapper.c + 1 + ..\..\..\..\net\sal_module_wrapper\sal_module_wrapper.c + + + + + mqtt + + + mqtt_wrapper.c + 1 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\wrapper\src\mqtt_wrapper.c + + + transport_wrapper.c + 1 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\wrapper\src\transport_wrapper.c + + + MQTTConnectClient.c + 1 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\src\MQTTConnectClient.c + + + MQTTConnectServer.c + 1 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\src\MQTTConnectServer.c + + + MQTTDeserializePublish.c + 1 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\src\MQTTDeserializePublish.c + + + MQTTFormat.c + 1 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\src\MQTTFormat.c + + + MQTTPacket.c + 1 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\src\MQTTPacket.c + + + MQTTSerializePublish.c + 1 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\src\MQTTSerializePublish.c + + + MQTTSubscribeClient.c + 1 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\src\MQTTSubscribeClient.c + + + MQTTSubscribeServer.c + 1 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\src\MQTTSubscribeServer.c + + + MQTTUnsubscribeClient.c + 1 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\src\MQTTUnsubscribeClient.c + + + MQTTUnsubscribeServer.c + 1 + ..\..\..\..\components\connectivity\Eclipse-Paho-MQTT\3rdparty\src\MQTTUnsubscribeServer.c + + + + + components + + + cJSON.c + 1 + ..\..\..\..\components\utils\JSON\src\cJSON.c + + + + + ::CMSIS + + + + + + + + + + + + + + + + + + +
diff --git a/board/TencentOS_tiny_EVB_MX/KEIL/sensor_e53_ia1_e2e_demo/startup_stm32l431xx.s b/board/TencentOS_tiny_EVB_MX/KEIL/sensor_e53_ia1_e2e_demo/startup_stm32l431xx.s new file mode 100644 index 00000000..05d40343 --- /dev/null +++ b/board/TencentOS_tiny_EVB_MX/KEIL/sensor_e53_ia1_e2e_demo/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 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 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/Eclipse-Paho-MQTT/wrapper/src/mqtt_wrapper.c b/components/connectivity/Eclipse-Paho-MQTT/wrapper/src/mqtt_wrapper.c index 857a86cc..83fd0d98 100644 --- a/components/connectivity/Eclipse-Paho-MQTT/wrapper/src/mqtt_wrapper.c +++ b/components/connectivity/Eclipse-Paho-MQTT/wrapper/src/mqtt_wrapper.c @@ -1,6 +1,6 @@ #include "mqtt_wrapper.h" -#define BUFFER_LEN 200 +#define BUFFER_LEN 256 static MQTTPacket_connectData mqtt_form_connect_packet(mqtt_con_opt_t *opt) { diff --git a/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo.c b/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo.c new file mode 100644 index 00000000..b7998e5c --- /dev/null +++ b/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo.c @@ -0,0 +1,418 @@ +#include "e53_ia1_e2e_demo.h" +#include "e53_ia1_e2e_demo_config.h" +#include "cJSON.h" +#include "E53_IA1.h" +#include "mcu_init.h" + +#define USE_ESP8266 +//#define MQTT_SERVER_IP "iotcloud-mqtt.gz.tencentdevices.com" +#define MQTT_SERVER_IP "111.230.127.136" +#define MQTT_SERVER_PORT "1883" + +const char OPEN = 1; +const char CLOSE = 0; + +int sock_id = 0; + +void sensor_init(void) { + Init_E53_IA1(); +} + +void sensor_read(void) { + E53_IA1_Read_Data(); +} + +int light_intensity_low() { + return E53_IA1_Data.Lux < (float)20.0 && E53_IA1_Data.LightMode == CLOSE; +} + +int light_intensity_high() { + return E53_IA1_Data.Lux > (float)20.0 && E53_IA1_Data.LightMode == OPEN; +} + +int temperature_too_high() { + return E53_IA1_Data.Lux > (float)20.0 && E53_IA1_Data.LightMode == OPEN; + // return E53_IA1_Data.Temperature > (float)30.0 && E53_IA1_Data.MotorMode == OPEN; +} + +void turnon_fan() { + motor_control(OPEN); +} + +void turnoff_fan() { + motor_control(CLOSE); +} + +void turnon_light() { + light_control(OPEN); +} + +void turnoff_light() { + light_control(CLOSE); +} + +void print_sensor_data() { + printf("{\"temperature\":%.2f,\"humidity\":%.2f,\"light_intensity\":%.2f,\"motor\":%d,\"light\":%d}\n", + E53_IA1_Data.Temperature, + E53_IA1_Data.Humidity, + E53_IA1_Data.Lux, + E53_IA1_Data.MotorMode, + E53_IA1_Data.LightMode); +} + +int parse_data(uint8_t *data) { + //{"motor":0,"light":1} + cJSON* cjson = cJSON_Parse((char *)data); + cJSON *cjsonret = NULL; + int motor; + int light; + if(cjson == NULL) { + printf("json pack into cjson error..."); + return -1; + } else { + cJSON_Print(cjson); + } + cjsonret = NULL; + cjsonret = cJSON_GetObjectItem(cjson, "motor"); + if(cjsonret != NULL) { + motor = cjsonret->valueint; + printf("motor=%d\n", motor); + if(motor == 1) { + //power on relay + motor_control(OPEN); + } else if(motor == 0) { + //power off relay + motor_control(CLOSE); + } + } + cjsonret = NULL; + cjsonret = cJSON_GetObjectItem(cjson, "light"); + if(cjsonret != NULL) { + light = cjsonret->valueint; + printf("light=%d\n", light); + if(light == 1) { + //power on relay + light_control(OPEN); + } else if(light == 0) { + //power off relay + light_control(CLOSE); + } + } + cJSON_Delete(cjson); + return 0; +} + +int receive_data(void) { + static int count = 1; + uint8_t read_data[100] = {0}; + int read_len; + mqtt_sub_opt_t sub_opt; + sub_opt.count = 1; + sub_opt.dup = 0; + sub_opt.id = 1; + sub_opt.req_qos = 0; + sub_opt.topic = MQTT_SUBSCRIBE_TOPIC; + + printf("receive: \r\n"); + read_len = tos_mqtt_receive(sub_opt.topic, strlen(sub_opt.topic), read_data, sizeof(read_data)); + if (read_len >= 0) { + printf("MQTT count: %d\r\n", count++); + printf("---------->topic: %s, payload: %s, payload_len: %d\n", sub_opt.topic, read_data, read_len); + parse_data(read_data); + } + return 0; +} + +int publish_data(void) { + mqtt_pub_opt_t pub_opt; + pub_opt.dup = 0; + pub_opt.qos = 0; + pub_opt.retained = 0; + pub_opt.id = 0; + pub_opt.topic = MQTT_PUBLISH_TOPIC; + + char buffer[256] = {0}; + snprintf(buffer, sizeof(buffer), + "{\"type\":\"update\",\"state\":{\"desired\":null,\"reported\":{\"temperature\":%.2f,\"humidity\":%.2f,\"light_intensity\":%.2f,\"motor\":%d,\"light\":%d}},\"version\":0,\"clientToken\":\"clientToken\"}", + E53_IA1_Data.Temperature, + E53_IA1_Data.Humidity, + E53_IA1_Data.Lux, + E53_IA1_Data.MotorMode, + E53_IA1_Data.LightMode); + + pub_opt.payload = (unsigned char *)buffer; + pub_opt.payload_len = strlen(buffer); + printf("\r\nreport--->topic:%s\r\ndata(%d):%s\r\n", pub_opt.topic, pub_opt.payload_len, pub_opt.payload); + if (tos_mqtt_publish(sock_id, &pub_opt) != 0) { + printf("publish failed!!!\n"); + } + return 0; +} + +int network_init() { +#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); + // int ret = esp8266_join_ap("royye", "Gch626262"); + int ret = esp8266_join_ap("iottest", "iot12345"); + return ret; +#endif +} + +int mqtt_connect(void) { + mqtt_con_opt_t con_opt; + con_opt.keep_alive_interval = 2000; + con_opt.cleansession = 1; + con_opt.username = MQTT_USR_NAME; + con_opt.password = MQTT_PASSWORD; + con_opt.client_id = MQTT_CLIENT_ID; + + int try = 0; + while(try++ < 10) { + sock_id = tos_mqtt_connect(MQTT_SERVER_IP, MQTT_SERVER_PORT, &con_opt); + if (sock_id != -1) { + printf("tos_mqtt_connect success. sock_id %d \r\n", sock_id); + return 0; + } + transport_close(sock_id); + printf("tos_mqtt_connect fail. sock_id %d \r\n", sock_id); + osDelay(2000); + } + return -1; +} + +int mqtt_subscribe(void) { + mqtt_sub_opt_t sub_opt; + sub_opt.count = 1; + sub_opt.dup = 0; + sub_opt.id = 1; + sub_opt.req_qos = 0; + sub_opt.topic = MQTT_SUBSCRIBE_TOPIC; + + int try = 0; + while (try++ < 10) { + if (tos_mqtt_subscribe(sock_id, &sub_opt) == 0) { + printf("subscribe topic:%s success\n", sub_opt.topic); + return 0; + } + osDelay(2000); + } + printf("subscribe topic:%s fail\n", sub_opt.topic); + + return -1; +} + +void qcloud_agent(void) { + // 网络初始化 + int ret = network_init(); + if (ret < 0) { + printf("network_init fail\n"); + return; + } + + // 建立到IoT hub的MQTT连接 + ret = mqtt_connect(); + if (ret < 0) { + printf("mqtt_connect fail\n"); + return; + } + + // 订阅设备主题 + ret = mqtt_subscribe(); + if (ret < 0) { + printf("mqtt_subscribe fail\n"); + return; + } + + sensor_init(); + while(1) { + sensor_read(); + // 发布传感器数据 + publish_data(); + // 接收控制消息 + receive_data(); + osDelay(1000); + } +} + + +void one_loop_task(void *arg) { + sensor_init(); + while(1) { + sensor_read(); + print_sensor_data(); + // 光照强度太低 => 打开补光灯 + if (light_intensity_low()) { + turnon_light(); // 实时性如何保证? + // 光照强度过高 => 关闭补光灯 + } else if (light_intensity_high()) { + turnoff_light(); + } + + // 其他业务逻辑 + printf("delay 5 senconds \n"); + osDelay(5000); + } +} + +void monitor_task(void) { + sensor_init(); + while(1) { + sensor_read(); + // 光照强度太低 => 打开补光灯 + if (light_intensity_low()) { + turnon_light(); + // 光照强度过高 => 关闭补光灯 + } else if (light_intensity_high()) { + turnoff_light(); + } + osDelay(100); + } +} + +void normal_task() { + while(1) { + printf("do something for 5 senconds \n"); + print_sensor_data(); + osDelay(5000); + } +} + +void network_test_task() { + // 初始化WiFi模组,连接AP + 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); + int ret = esp8266_join_ap("iottest", "iot12345"); + if (ret < 0) { + printf("network_init fail\n"); + return; + } + + // 调用SAL层接口,建立Socket连接 + int socket_id = -1; + uint8_t recv_data[128]; + socket_id = tos_sal_module_connect("45.40.201.56", "8080", TOS_SAL_PROTO_TCP); + if (socket_id == -1) { + printf("TCP connect failed\r\n"); + return; + } else { + printf("TCP connect success! fd: %d\n", socket_id); + } + + // 调用SAL层接口,消息收发 + while (1) { + tos_sal_module_send(socket_id, (const void *)"Hello TencentOS tiny!\r\n", + strlen("Hello TencentOS tiny!\r\n")); + + int recv_len = tos_sal_module_recv_timeout(socket_id, recv_data, sizeof(recv_data), 8000); + if (recv_len < 0) { + printf("receive error\n\r"); + } else if (recv_len == 0) { + printf("receive none\n"); + } else { + recv_data[recv_len] = 0; + printf("receive len: %d\n recv_data: %s\n", recv_len, recv_data); + } + + tos_sleep_ms(2000); + } +} + +void entry_task1(void *arg) +{ + while (K_TRUE) { + printf("entry_task1\n"); + tos_task_delay(1000); + } +} + +void entry_task2(void *arg) +{ + while (K_TRUE) { + printf("entry_task2\n"); + osDelay(2000); + } +} + +void entry_task1(void *arg); +#define TASK1_STK_SIZE 512 +k_stack_t stack_task1[TASK1_STK_SIZE]; +k_task_t task1; + +#define TASK2_STK_SIZE 512 +void entry_task2(void *arg); +osThreadDef(entry_task2, osPriorityNormal, 1, TASK2_STK_SIZE); + +// 联网测试 +osThreadDef(network_test_task, osPriorityNormal, 1, 1024); + +// 端云对接 +osThreadDef(qcloud_agent, osPriorityNormal, 1, 8192); + +// 大循环的方式 +osThreadDef(one_loop_task, osPriorityNormal, 1, 1024); + +// 1. 高优先级任务 +#define MONITOR_STK_SIZE 1024 +osThreadDef(monitor_task, osPriorityHigh, 1, MONITOR_STK_SIZE); + +// 2. 普通优先级任务 +#define NORMAL_STK_SIZE 512 +osThreadDef(normal_task, osPriorityNormal, 1, NORMAL_STK_SIZE); + +void application_entry(void *arg) { + // 端云对接 + osThreadCreate(osThread(qcloud_agent), NULL); +} + +/* +// tos_task_create 创建任务1 +(void)tos_task_create(&task1, + "task1", // 任务名称 + entry_task1, // 任务入口 + NULL, // 任务参数 + 4, // 优先级 + stack_task1, // 任务栈空间 + TASK1_STK_SIZE,// 任务栈大小 + 0); // 时间片 + +// cmsis api 创建任务2 +osThreadCreate(osThread(entry_task2), NULL); + +// 大循环的方式 +sensor_init(); +while(1) { + sensor_read(); + print_sensor_data(); + + // 光照强度太低 => 打开补光灯 + if (light_intensity_low()) { + turnon_light(); // 实时性如何保证? + // 光照强度过高 => 关闭补光灯 + } else if (light_intensity_high()) { + turnoff_light(); + } + + // 其他业务逻辑 + printf("do something for 5 senconds \n"); + osDelay(5000); +} + + +// 多任务,基于优先级抢占 +// 高优先级任务: 读取传感器,并实时监控传感器值 +osThreadCreate(osThread(monitor_task), NULL); +// 普通优先级任务:其他业务逻辑 +osThreadCreate(osThread(normal_task), NULL); + +// 联网测试 +osThreadCreate(osThread(network_test_task), NULL); + +// 端云对接 +osThreadCreate(osThread(agent_task), NULL); + +*/ + + diff --git a/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo.h b/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo.h new file mode 100644 index 00000000..21f28fb4 --- /dev/null +++ b/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo.h @@ -0,0 +1,16 @@ +#ifndef __MQTT_DEMO_H__ +#define __MQTT_DEMO_H__ + +#include "mcu_init.h" +#include "tos_at.h" +#include "string.h" +#include "cmsis_os.h" +#include "sal_module_wrapper.h" + +#include "mqtt_wrapper.h" + +extern void application_entry(void *arg); +extern void motor_control(char mode); +extern void light_control(char mode); +#endif /* __APP_DEMO_H__ */ + diff --git a/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo_config.h b/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo_config.h new file mode 100644 index 00000000..4038c105 --- /dev/null +++ b/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo_config.h @@ -0,0 +1,12 @@ +#ifndef _H_TOS_FARM_AI_CONFIG_H +#define _H_TOS_FARM_AI_CONFIG_H + +#define MQTT_PRODUCT_ID "U1BZWHF7F9" +#define MQTT_DEV_NAME "dev_01" +#define MQTT_CLIENT_ID "U1BZWHF7F9dev_01" +#define MQTT_USR_NAME "U1BZWHF7F9dev_01;12010126;O3I57;1611533066" +#define MQTT_PASSWORD "6ebcf20c9f7f725b5bcf18a85cc7a49479f489eea65946f92ba18a51a135c89e;hmacsha256" +#define MQTT_SUBSCRIBE_TOPIC "U1BZWHF7F9/dev_01/data" +#define MQTT_PUBLISH_TOPIC "$shadow/operation/U1BZWHF7F9/dev_01" + +#endif From e1c19fd194e6f13381c30742ae811a8ba3ff5896 Mon Sep 17 00:00:00 2001 From: supowang Date: Wed, 18 Dec 2019 13:01:35 +0800 Subject: [PATCH 3/8] add lora lowpower at command support add lora lowpower at command support --- .../TencentOS_tiny_STM32L073RZTx.dbgconf | 43 ------------ .../RTE/_TencentOS_tiny/RTE_Components.h | 20 ------ .../lorawan/TencentOS_tiny/TencentOS_tiny.sct | 16 ----- board/TencentOS_tiny_EVB_LX/BSP/Inc/usart.h | 15 +++-- .../TencentOS_tiny_EVB_LX/BSP/Src/mcu_init.c | 8 ++- board/TencentOS_tiny_EVB_LX/BSP/Src/usart.c | 66 ++++++++++++++----- devices/rhf76_lora/RHF76.c | 19 ++++++ devices/rhf76_lora/RHF76.h | 3 + 8 files changed, 86 insertions(+), 104 deletions(-) delete mode 100644 board/NUCLEO_STM32L073RZ/KEIL/lorawan/DebugConfig/TencentOS_tiny_STM32L073RZTx.dbgconf delete mode 100644 board/NUCLEO_STM32L073RZ/KEIL/lorawan/RTE/_TencentOS_tiny/RTE_Components.h delete mode 100644 board/NUCLEO_STM32L073RZ/KEIL/lorawan/TencentOS_tiny/TencentOS_tiny.sct diff --git a/board/NUCLEO_STM32L073RZ/KEIL/lorawan/DebugConfig/TencentOS_tiny_STM32L073RZTx.dbgconf b/board/NUCLEO_STM32L073RZ/KEIL/lorawan/DebugConfig/TencentOS_tiny_STM32L073RZTx.dbgconf deleted file mode 100644 index 5b27c4a9..00000000 --- a/board/NUCLEO_STM32L073RZ/KEIL/lorawan/DebugConfig/TencentOS_tiny_STM32L073RZTx.dbgconf +++ /dev/null @@ -1,43 +0,0 @@ -// File: STM32L0x1_0x2_0x3_DBGMCU.ini -// Version: 1.0.0 -// Note: refer to STM32L0x1 reference manual (RM0377) -// refer to STM32L0x1 datasheet -// refer to STM32L0x2 reference manual (RM0376) -// refer to STM32L0x2 datasheet -// refer to STM32L0x3 reference manual (RM0367) -// refer to STM32L0x3 datasheet - -// <<< Use Configuration Wizard in Context Menu >>> - -// Debug MCU configuration register (DBGMCU_CR) -// Reserved bits must be kept at reset value -// DBG_STANDBY Debug Standby Mode -// DBG_STOP Debug Stop Mode -// DBG_SLEEP Debug Sleep Mode -// -DbgMCU_CR = 0x00000007; - -// Debug MCU APB1 freeze register (DBGMCU_APB1_FZ) -// Reserved bits must be kept at reset value -// DBG_LPTIMER_STOP LPTIM1 counter stopped when core is halted -// DBG_I2C3_STOP I2C3 SMBUS timeout mode stopped when core is halted -// DBG_I2C2_STOP I2C2 SMBUS timeout mode stopped when core is halted -// DBG_I2C1_STOP I2C1 SMBUS timeout mode stopped when core is halted -// DBG_IWDG_STOP Debug independent watchdog stopped when core is halted -// DBG_WWDG_STOP Debug window watchdog stopped when core is halted -// DBG_RTC_STOP Debug RTC stopped when core is halted -// DBG_TIM7_STOP TIM7 counter stopped when core is halted -// DBG_TIM6_STOP TIM6 counter stopped when core is halted -// DBG_TIM3_STOP TIM3 counter stopped when core is halted -// DBG_TIM2_STOP TIM2 counter stopped when core is halted -// -DbgMCU_APB1_Fz = 0x00000000; - -// Debug MCU APB2 freeze register (DBGMCU_APB2_FZ) -// Reserved bits must be kept at reset value -// DBG_TIM22_STOP TIM22 counter stopped when core is halted -// DBG_TIM21_STOP TIM21 counter stopped when core is halted -// -DbgMCU_APB2_Fz = 0x00000000; - -// <<< end of configuration section >>> diff --git a/board/NUCLEO_STM32L073RZ/KEIL/lorawan/RTE/_TencentOS_tiny/RTE_Components.h b/board/NUCLEO_STM32L073RZ/KEIL/lorawan/RTE/_TencentOS_tiny/RTE_Components.h deleted file mode 100644 index 4b2a0396..00000000 --- a/board/NUCLEO_STM32L073RZ/KEIL/lorawan/RTE/_TencentOS_tiny/RTE_Components.h +++ /dev/null @@ -1,20 +0,0 @@ - -/* - * Auto generated Run-Time-Environment Component Configuration File - * *** Do not modify ! *** - * - * Project: 'TencentOS_tiny' - * Target: 'TencentOS_tiny' - */ - -#ifndef RTE_COMPONENTS_H -#define RTE_COMPONENTS_H - - -/* - * Define the Device Header File: - */ -#define CMSIS_device_header "stm32l0xx.h" - - -#endif /* RTE_COMPONENTS_H */ diff --git a/board/NUCLEO_STM32L073RZ/KEIL/lorawan/TencentOS_tiny/TencentOS_tiny.sct b/board/NUCLEO_STM32L073RZ/KEIL/lorawan/TencentOS_tiny/TencentOS_tiny.sct deleted file mode 100644 index 2d15c6b4..00000000 --- a/board/NUCLEO_STM32L073RZ/KEIL/lorawan/TencentOS_tiny/TencentOS_tiny.sct +++ /dev/null @@ -1,16 +0,0 @@ -; ************************************************************* -; *** Scatter-Loading Description File generated by uVision *** -; ************************************************************* - -LR_IROM1 0x08000000 0x00030000 { ; load region size_region - ER_IROM1 0x08000000 0x00030000 { ; load address = execution address - *.o (RESET, +First) - *(InRoot$$Sections) - .ANY (+RO) - .ANY (+XO) - } - RW_IRAM1 0x20000000 0x00005000 { ; RW data - .ANY (+RW +ZI) - } -} - diff --git a/board/TencentOS_tiny_EVB_LX/BSP/Inc/usart.h b/board/TencentOS_tiny_EVB_LX/BSP/Inc/usart.h index a5cbe461..68631a13 100644 --- a/board/TencentOS_tiny_EVB_LX/BSP/Inc/usart.h +++ b/board/TencentOS_tiny_EVB_LX/BSP/Inc/usart.h @@ -5,9 +5,16 @@ #define USART0_GPIO_RX_PIN GPIO_PIN_10 #define USART0_GPIO_PORT GPIOA -#define USART3_GPIO_TX_PIN GPIO_PIN_10 -#define USART3_GPIO_RX_PIN GPIO_PIN_11 -#define USART3_GPIO_PORT GPIOC +#define USART1_GPIO_TX_PIN GPIO_PIN_2 +#define USART1_GPIO_RX_PIN GPIO_PIN_3 +#define USART1_GPIO_PORT GPIOA + +#define USART2_GPIO_TX_PIN GPIO_PIN_10 +#define USART2_GPIO_RX_PIN GPIO_PIN_11 +#define USART2_GPIO_PORT GPIOC + + void usart0_init(int baud); -void uart3_init(int baud); +void usart1_init(int baud); +void usart2_init(int baud); #endif // __USART_H diff --git a/board/TencentOS_tiny_EVB_LX/BSP/Src/mcu_init.c b/board/TencentOS_tiny_EVB_LX/BSP/Src/mcu_init.c index 2eee0d82..c2bbf9f3 100644 --- a/board/TencentOS_tiny_EVB_LX/BSP/Src/mcu_init.c +++ b/board/TencentOS_tiny_EVB_LX/BSP/Src/mcu_init.c @@ -11,16 +11,18 @@ static void led_config(void) gpio_bit_set(LED_GPIO_PORT, LED_PIN); } -void board_init() { +void board_init() +{ char *str = "Tencent"; SystemInit(); led_config(); - uart3_init(115200); + usart0_init(115200); + usart1_init(115200); + usart2_init(115200); OLED_Init(); OLED_Clear(); OLED_ShowChinese(36,0,0); OLED_ShowChinese(54,0,1); OLED_ShowChinese(72,0,2); OLED_ShowString(36,2,(uint8_t*)str,8); - } diff --git a/board/TencentOS_tiny_EVB_LX/BSP/Src/usart.c b/board/TencentOS_tiny_EVB_LX/BSP/Src/usart.c index f2ea118d..284eb060 100644 --- a/board/TencentOS_tiny_EVB_LX/BSP/Src/usart.c +++ b/board/TencentOS_tiny_EVB_LX/BSP/Src/usart.c @@ -27,39 +27,69 @@ void usart0_init(int baud) usart_enable(USART0); } +void usart1_init(int baud) +{ + /* enable GPIO clock */ + rcu_periph_clock_enable(RCU_GPIOA); -void uart3_init(int baud) + /* enable USART1 clock */ + rcu_periph_clock_enable(RCU_USART1); + + /* connect port to USART0_Tx */ + gpio_init(USART1_GPIO_PORT, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, USART1_GPIO_TX_PIN); + + /* connect port to USART0_Rx */ + gpio_init(USART1_GPIO_PORT, GPIO_MODE_IN_FLOATING, GPIO_OSPEED_50MHZ, USART1_GPIO_RX_PIN); + + /* USART1 configure */ + usart_deinit(USART1); + usart_baudrate_set(USART1, baud); + usart_word_length_set(USART1, USART_WL_8BIT); + usart_stop_bit_set(USART1, USART_STB_1BIT); + usart_parity_config(USART1, USART_PM_NONE); + usart_hardware_flow_rts_config(USART1, USART_RTS_DISABLE); + usart_hardware_flow_cts_config(USART1, USART_CTS_DISABLE); + usart_receive_config(USART1, USART_RECEIVE_ENABLE); + usart_transmit_config(USART1, USART_TRANSMIT_ENABLE); + usart_enable(USART1); +} + + + +void usart2_init(int baud) { /* enable GPIO clock */ rcu_periph_clock_enable(RCU_GPIOC); - /* enable USART0 clock */ - rcu_periph_clock_enable(RCU_UART3); + /* enable USART2 clock */ + rcu_periph_clock_enable(RCU_USART2); /* connect port to USART0_Tx */ - gpio_init(USART3_GPIO_PORT, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, USART3_GPIO_TX_PIN); + gpio_init(USART2_GPIO_PORT, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, USART2_GPIO_TX_PIN); /* connect port to USART0_Rx */ - gpio_init(USART3_GPIO_PORT, GPIO_MODE_IN_FLOATING, GPIO_OSPEED_50MHZ, USART3_GPIO_RX_PIN); + gpio_init(USART2_GPIO_PORT, GPIO_MODE_IN_FLOATING, GPIO_OSPEED_50MHZ, USART2_GPIO_RX_PIN); - /* USART0 configure */ - usart_deinit(UART3); - usart_baudrate_set(UART3, baud); - usart_word_length_set(UART3, USART_WL_8BIT); - usart_stop_bit_set(UART3, USART_STB_1BIT); - usart_parity_config(UART3, USART_PM_NONE); - usart_hardware_flow_rts_config(UART3, USART_RTS_DISABLE); - usart_hardware_flow_cts_config(UART3, USART_CTS_DISABLE); - usart_receive_config(UART3, USART_RECEIVE_ENABLE); - usart_transmit_config(UART3, USART_TRANSMIT_ENABLE); - usart_enable(UART3); + gpio_pin_remap_config(GPIO_USART2_FULL_REMAP,ENABLE); + + /* USART1 configure */ + usart_deinit(USART2); + usart_baudrate_set(USART2, baud); + usart_word_length_set(USART2, USART_WL_8BIT); + usart_stop_bit_set(USART2, USART_STB_1BIT); + usart_parity_config(USART2, USART_PM_NONE); + usart_hardware_flow_rts_config(USART2, USART_RTS_DISABLE); + usart_hardware_flow_cts_config(USART2, USART_CTS_DISABLE); + usart_receive_config(USART2, USART_RECEIVE_ENABLE); + usart_transmit_config(USART2, USART_TRANSMIT_ENABLE); + usart_enable(USART2); } int _put_char(int ch) { - usart_data_transmit(UART3, (uint8_t) ch ); - while ( usart_flag_get(UART3, USART_FLAG_TBE)== RESET){ + usart_data_transmit(USART0, (uint8_t) ch ); + while ( usart_flag_get(USART0, USART_FLAG_TBE)== RESET){ } return ch; diff --git a/devices/rhf76_lora/RHF76.c b/devices/rhf76_lora/RHF76.c index 32d98446..18eb2d27 100644 --- a/devices/rhf76_lora/RHF76.c +++ b/devices/rhf76_lora/RHF76.c @@ -3,6 +3,21 @@ static mcps_indication_t rhf76_mcps_indication; +static int rhf76_exit_low_power(void) +{ + int try = 0; + at_echo_t echo; + + tos_at_echo_create(&echo, NULL, 0, "+LOWPOWER: AUTOOFF"); + while (try++ < 10) { + tos_at_cmd_exec(&echo, 3000, RHF76_LOWPOWER_SET); + if (echo.status == AT_ECHO_STATUS_OK || echo.status == AT_ECHO_STATUS_EXPECT) { + return 0; + } + } + return -1; +} + static int rhf76_reset(void) { int try = 0; @@ -186,6 +201,10 @@ static int rhf76_init(void) printf("Init RHF76 LoRa ...\n" ); at_delay_ms(1000); + if (rhf76_exit_low_power() != 0) { + printf("rhf76 reset FAILED\n"); + return -1; + } if (rhf76_reset() != 0) { printf("rhf76 reset FAILED\n"); diff --git a/devices/rhf76_lora/RHF76.h b/devices/rhf76_lora/RHF76.h index 55694a21..a8524dc5 100644 --- a/devices/rhf76_lora/RHF76.h +++ b/devices/rhf76_lora/RHF76.h @@ -51,6 +51,9 @@ typedef enum lora_key_type { } lora_key_type_t; +const char RHF76_LOWPOWER_SET[] = { + 0xFF,0xFF,0xFF,0xFF,'A','T','+','L','O','W','P','O','W','E','R','=','a','u','t','o','o','f','f','\r','\n' +}; #define RHF76_ATCMD_SET_CLASS_A "AT+CLASS=A\r\n" #define RHF76_ATCMD_SET_CLASS_B "AT+CLASS=B\r\n" #define RHF76_ATCMD_SET_CLASS_C "AT+CLASS=C\r\n" From febcf10911660c3a01a9511cef92d5bbca123c29 Mon Sep 17 00:00:00 2001 From: daishengdong Date: Thu, 19 Dec 2019 16:08:42 +0800 Subject: [PATCH 4/8] add kv fs component 1. a true wear-leveling kv fs for norflash, especially optimize for some onchip norflash with "write once on one single write unit" like stm32l4, a true "no earse before write" flash algorithm. 2. an "as less as possible" gc strategy, do best to save norflash's life. 3. full "power down protection" support 4. see "examples" of kv, project in "TencentOS_tiny_EVB_MX_Plus", with onchip flash and qspiflash sample. --- .../BSP/Hardware/ONCHIP_FLASH/onchip_flash.c | 78 + .../BSP/Hardware/QSPI_FLASH/hal_qspi_flash.c | 407 ++ .../BSP/Hardware/QSPI_FLASH/hal_qspi_flash.h | 23 + .../BSP/Hardware/QSPI_FLASH/qspi_flash_kv.c | 40 + .../BSP/Inc/quadspi.h | 79 + .../BSP/Inc/stm32l4xx_hal_conf.h | 2 +- .../BSP/Src/quadspi.c | 139 + .../TencentOS_tiny_STM32L431RCTx.dbgconf | 97 + .../KEIL/kv/EventRecorderStub.scvd | 9 + .../kv/RTE/_TencentOS_tiny/RTE_Components.h | 20 + .../KEIL/kv/TencentOS_tiny.uvoptx | 1252 ++++++ .../KEIL/kv/TencentOS_tiny.uvprojx | 827 ++++ .../KEIL/kv/obj/TencentOS_tiny.htm | 3389 +++++++++++++++++ .../KEIL/kv/obj/TencentOS_tiny.sct | 16 + .../KEIL/kv/startup_stm32l431xx.s | 404 ++ components/fs/kv/include/tos_kv.h | 333 ++ components/fs/kv/include/tos_kv_err.h | 52 + components/fs/kv/include/tos_kv_flash.h | 46 + components/fs/kv/tos_kv.c | 1348 +++++++ examples/kv/kv_sample.c | 105 + kernel/core/include/tos_task.h | 4 +- kernel/core/tos_mmheap.c | 12 +- kernel/core/tos_task.c | 2 +- 23 files changed, 8674 insertions(+), 10 deletions(-) create mode 100644 board/TencentOS_tiny_EVB_MX_Plus/BSP/Hardware/ONCHIP_FLASH/onchip_flash.c create mode 100644 board/TencentOS_tiny_EVB_MX_Plus/BSP/Hardware/QSPI_FLASH/hal_qspi_flash.c create mode 100644 board/TencentOS_tiny_EVB_MX_Plus/BSP/Hardware/QSPI_FLASH/hal_qspi_flash.h create mode 100644 board/TencentOS_tiny_EVB_MX_Plus/BSP/Hardware/QSPI_FLASH/qspi_flash_kv.c create mode 100644 board/TencentOS_tiny_EVB_MX_Plus/BSP/Inc/quadspi.h create mode 100644 board/TencentOS_tiny_EVB_MX_Plus/BSP/Src/quadspi.c create mode 100644 board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/DebugConfig/TencentOS_tiny_STM32L431RCTx.dbgconf create mode 100644 board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/EventRecorderStub.scvd create mode 100644 board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/RTE/_TencentOS_tiny/RTE_Components.h create mode 100644 board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/TencentOS_tiny.uvoptx create mode 100644 board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/TencentOS_tiny.uvprojx create mode 100644 board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/obj/TencentOS_tiny.htm create mode 100644 board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/obj/TencentOS_tiny.sct create mode 100644 board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/startup_stm32l431xx.s create mode 100644 components/fs/kv/include/tos_kv.h create mode 100644 components/fs/kv/include/tos_kv_err.h create mode 100644 components/fs/kv/include/tos_kv_flash.h create mode 100644 components/fs/kv/tos_kv.c create mode 100644 examples/kv/kv_sample.c diff --git a/board/TencentOS_tiny_EVB_MX_Plus/BSP/Hardware/ONCHIP_FLASH/onchip_flash.c b/board/TencentOS_tiny_EVB_MX_Plus/BSP/Hardware/ONCHIP_FLASH/onchip_flash.c new file mode 100644 index 00000000..1e3327ff --- /dev/null +++ b/board/TencentOS_tiny_EVB_MX_Plus/BSP/Hardware/ONCHIP_FLASH/onchip_flash.c @@ -0,0 +1,78 @@ +#include "tos_kv.h" +#include "stm32l4xx.h" + +#define ONCHIP_FLASH_ADDR_START 0x08000000 // start address for onchip flash for stm32l431RCTX +#define ONCHIP_FLASH_ADDR_MAX 0x0803FFFF // 256K flash addr for stm32l431RCTX + +#define SECTOR_SIZE 2048 // sector size for stm32l431RCTX +#define SECTOR_SIZE_LOG2 11 // 2 ^ 11 = 2048 + +#define FOR_KV_FLASH_SIZE (2 * SECTOR_SIZE) // storage for kv +#define FOR_KV_FLASH_START 0x803d000 + +int stm32l4_norflash_onchip_read(uint32_t addr, void *buf, size_t len) +{ + memcpy(buf, (void *)addr, len); + return 0; +} + +int stm32l4_norflash_onchip_write(uint32_t addr, const void *buf, size_t len) +{ + int i = 0; + uint8_t *array = (uint8_t *)buf; + HAL_StatusTypeDef hal_status; + + HAL_FLASH_Unlock(); + tos_cpu_int_disable(); + + for (i = 0; i < len; i += 8) { + hal_status = HAL_FLASH_Program(FLASH_TYPEPROGRAM_DOUBLEWORD, + addr + i, + *(uint64_t *)&array[i]); + if (hal_status != HAL_OK) { + return -1; + } + } + + HAL_FLASH_Lock(); + tos_cpu_int_enable(); + + return 0; +} + +int stm32l4_norflash_onchip_erase(uint32_t addr, size_t size) +{ + uint32_t page_err = 0; + HAL_StatusTypeDef hal_status; + FLASH_EraseInitTypeDef erase_para; + + erase_para.TypeErase = FLASH_TYPEERASE_PAGES; + erase_para.Banks = FLASH_BANK_1; + erase_para.Page = addr / SECTOR_SIZE; + erase_para.NbPages = size / SECTOR_SIZE; + HAL_FLASH_Unlock(); + tos_cpu_int_disable(); + hal_status = HAL_FLASHEx_Erase(&erase_para, &page_err); + HAL_FLASH_Lock(); + tos_cpu_int_enable(); + + if (hal_status != HAL_OK) { + return -1; + } + + return 0; +} + +kv_flash_drv_t stm32l4_norflash_onchip_drv = { + .write = stm32l4_norflash_onchip_write, + .read = stm32l4_norflash_onchip_read, + .erase = stm32l4_norflash_onchip_erase, +}; + +kv_flash_prop_t stm32l4_norflash_onchip_prop = { + .sector_size_log2 = SECTOR_SIZE_LOG2, + .pgm_type = KV_FLASH_PROGRAM_TYPE_DOUBLEWORD, + .flash_start = FOR_KV_FLASH_START, + .flash_size = FOR_KV_FLASH_SIZE, +}; + diff --git a/board/TencentOS_tiny_EVB_MX_Plus/BSP/Hardware/QSPI_FLASH/hal_qspi_flash.c b/board/TencentOS_tiny_EVB_MX_Plus/BSP/Hardware/QSPI_FLASH/hal_qspi_flash.c new file mode 100644 index 00000000..d3f7a3a9 --- /dev/null +++ b/board/TencentOS_tiny_EVB_MX_Plus/BSP/Hardware/QSPI_FLASH/hal_qspi_flash.c @@ -0,0 +1,407 @@ +#include "hal_qspi_flash.h" +#include "stm32l4xx.h" + +#ifdef HAL_QSPI_MODULE_ENABLED + +#define QSPI_FLASH_PAGESIZE 256 +#define QSPI_FLASH_SECTOR 4096 +#define QSPI_FLASH_ID 0xEF4017 +#define QSPI_FLASH_TOTAL_SIZE 0x7FFFFF + +#define QSPI_FLASH_WriteEnable 0x06 +#define QSPI_FLASH_WriteDisable 0x04 +#define QSPI_FLASH_ReadStatusReg 0x05 +#define QSPI_FLASH_WriteStatusReg 0x01 +#define QSPI_FLASH_ReadData 0x03 +#define QSPI_FLASH_FastReadData 0x0B +#define QSPI_FLASH_FastReadDual 0x3B +#define QSPI_FLASH_PageProgram 0x02 +#define QSPI_FLASH_BlockErase 0xD8 +#define QSPI_FLASH_SectorErase 0x20 +#define QSPI_FLASH_ChipErase 0xC7 +#define QSPI_FLASH_PowerDown 0xB9 +#define QSPI_FLASH_ReleasePowerDown 0xAB +#define QSPI_FLASH_DeviceID 0xAB +#define QSPI_FLASH_ManufactDeviceID 0x90 +#define QSPI_FLASH_JedecDeviceID 0x9F +#define QSPI_FLASH_WIP_FLAG 0x01 +#define QSPI_FLASH_DUMMY_BYTE 0xFF + +#define CHOOSE_BIT_16 16 +#define CHOOSE_BIT_8 8 + + +#define CHECK_RET_RETURN(ret) \ + do \ + { \ + if ((ret) < 0) \ + { \ + return ret; \ + } \ + } while (0) + +extern QSPI_HandleTypeDef hqspi; + +/* This function is called by inner-HAL lib */ +static void HAL_QSPI_MspInit(QSPI_HandleTypeDef* qspiHandle) +{ + + GPIO_InitTypeDef GPIO_InitStruct; + if(qspiHandle->Instance==QUADSPI) + { + /* USER CODE BEGIN QUADSPI_MspInit 0 */ + + /* USER CODE END QUADSPI_MspInit 0 */ + /* QUADSPI clock enable */ + __HAL_RCC_QSPI_CLK_ENABLE(); + + /**QUADSPI GPIO Configuration + PB0 ------> QUADSPI_BK1_IO1 + PB1 ------> QUADSPI_BK1_IO0 + PB10 ------> QUADSPI_CLK + PB11 ------> QUADSPI_BK1_NCS + */ + GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_10|GPIO_PIN_11; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF10_QUADSPI; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + /* USER CODE BEGIN QUADSPI_MspInit 1 */ + + /* USER CODE END QUADSPI_MspInit 1 */ + } +} + +/* This function is called by inner-HAL lib */ +static void HAL_QSPI_MspDeInit(QSPI_HandleTypeDef* qspiHandle) +{ + + if(qspiHandle->Instance==QUADSPI) + { + /* USER CODE BEGIN QUADSPI_MspDeInit 0 */ + + /* USER CODE END QUADSPI_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_QSPI_CLK_DISABLE(); + + /**QUADSPI GPIO Configuration + PB0 ------> QUADSPI_BK1_IO1 + PB1 ------> QUADSPI_BK1_IO0 + PB10 ------> QUADSPI_CLK + PB11 ------> QUADSPI_BK1_NCS + */ + HAL_GPIO_DeInit(GPIOB, GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_10|GPIO_PIN_11); + + /* USER CODE BEGIN QUADSPI_MspDeInit 1 */ + + /* USER CODE END QUADSPI_MspDeInit 1 */ + } +} + + +/** + * @brief QSPI + * + * @param instruction Ҫ͵ָ + * @param address ͵Ŀĵַ + * @param dummyCycles ָ + * @param instructionMode ָģʽ;QSPI_INSTRUCTION_NONE,QSPI_INSTRUCTION_1_LINE,QSPI_INSTRUCTION_2_LINE,QSPI_INSTRUCTION_4_LINE + * @param addressMode ַģʽ; QSPI_ADDRESS_NONE,QSPI_ADDRESS_1_LINE,QSPI_ADDRESS_2_LINE,QSPI_ADDRESS_4_LINE + * @param addressSize ַ;QSPI_ADDRESS_8_BITS,QSPI_ADDRESS_16_BITS,QSPI_ADDRESS_24_BITS,QSPI_ADDRESS_32_BITS + * @param dataMode ģʽ; QSPI_DATA_NONE,QSPI_DATA_1_LINE,QSPI_DATA_2_LINE,QSPI_DATA_4_LINE + * + * @return void + */ +uint32_t QSPI_Send_CMD(uint32_t instruction, uint32_t address, uint32_t dummyCycles, uint32_t instructionMode, uint32_t addressMode, uint32_t addressSize, uint32_t dataMode) +{ + QSPI_CommandTypeDef s_command; + + s_command.Instruction = instruction; //ָ + s_command.Address = address; //ַ + s_command.DummyCycles = dummyCycles; //ÿָ + s_command.InstructionMode = instructionMode; //ָģʽ + s_command.AddressMode = addressMode; //ַģʽ + s_command.AddressSize = addressSize; //ַ + s_command.DataMode = dataMode; //ģʽ + s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; //ÿζָ + s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; //޽ֽ + s_command.DdrMode = QSPI_DDR_MODE_DISABLE; //رDDRģʽ + s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; + + return HAL_QSPI_Command(&hqspi, &s_command, 5000); +} + +uint8_t QSPI_Receive(const uint8_t * buf, uint32_t datalen) +{ + hqspi.Instance->DLR = datalen - 1; //Configuration data length + if(HAL_QSPI_Receive(&hqspi, (uint8_t * )buf, 5000) == HAL_OK) return 0; //receive data + + else return 1; +} + +uint8_t QSPI_Transmit(const int8_t * buf, uint32_t datalen) +{ + hqspi.Instance->DLR = datalen - 1; //Configuration data length + if(HAL_QSPI_Transmit(&hqspi, (uint8_t * )buf, 5000) == HAL_OK) return 0; //send data + + else return 1; +} + +static void prv_spi_flash_write_enable(void) +{ + QSPI_Send_CMD(QSPI_FLASH_WriteEnable, 0, 0, QSPI_INSTRUCTION_1_LINE, QSPI_ADDRESS_NONE, QSPI_ADDRESS_8_BITS, QSPI_DATA_NONE); +} + +static void prv_spi_flash_wait_write_end(void) +{ + uint8_t status = 0; + + + /* Loop as long as the memory is busy with a write cycle */ + do + { + /* Send a dummy byte to generate the clock needed by the FLASH + and put the value of the status register in status variable */ + QSPI_Send_CMD(QSPI_FLASH_ReadStatusReg, 0, 0, QSPI_INSTRUCTION_1_LINE, QSPI_ADDRESS_NONE, QSPI_ADDRESS_8_BITS, QSPI_DATA_1_LINE); + QSPI_Receive(&status, 1); + + } while ((status & QSPI_FLASH_WIP_FLAG) == SET); /* Write in progress */ + +} + +static int prv_spi_flash_write_page(const uint8_t* buf, uint32_t addr, int32_t len) +{ + int ret = 0; + + if(0 == len) + { + return 0; + } + + prv_spi_flash_write_enable(); //Write enable + + QSPI_Send_CMD(QSPI_FLASH_PageProgram, addr, 0, QSPI_INSTRUCTION_1_LINE, QSPI_ADDRESS_1_LINE, QSPI_ADDRESS_24_BITS, QSPI_DATA_1_LINE); + QSPI_Transmit((const int8_t *)buf, len); + + prv_spi_flash_wait_write_end(); //Waiting for Writing to End + + return ret; +} + + int prv_spi_flash_erase_sector(uint32_t addr) +{ + //printf("fe:%x\r\n",addr); //flash, + int ret = 0; + prv_spi_flash_write_enable(); //Write enable + prv_spi_flash_wait_write_end(); + + ret=QSPI_Send_CMD(QSPI_FLASH_SectorErase, addr, 0, QSPI_INSTRUCTION_1_LINE, QSPI_ADDRESS_1_LINE, QSPI_ADDRESS_24_BITS, QSPI_DATA_NONE); + + prv_spi_flash_wait_write_end(); //Waiting for Writing to End + + return ret; +} + +void hal_spi_flash_config(void) +{ + hqspi.Instance = QUADSPI; + hqspi.Init.ClockPrescaler = 0; + hqspi.Init.FifoThreshold = 4; + hqspi.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_HALFCYCLE; + hqspi.Init.FlashSize = POSITION_VAL(0x1000000) - 1; + hqspi.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_4_CYCLE; + hqspi.Init.ClockMode = QSPI_CLOCK_MODE_0; + hqspi.Init.FlashID = QSPI_FLASH_ID_1; + hqspi.Init.DualFlash = QSPI_DUALFLASH_DISABLE; + if (HAL_QSPI_Init(&hqspi) != HAL_OK) + { + Error_Handler(); + } + +} + +int hal_spi_flash_erase(uint32_t addr, int32_t len) +{ + uint32_t begin; + uint32_t end; + int i; + + if (len < 0 + || addr > QSPI_FLASH_TOTAL_SIZE + || addr + len > QSPI_FLASH_TOTAL_SIZE) + { + return -1; + } + + begin = addr / QSPI_FLASH_SECTOR * QSPI_FLASH_SECTOR; + end = (addr + len - 1) / QSPI_FLASH_SECTOR * QSPI_FLASH_SECTOR; + + for (i = begin; i <= end; i += QSPI_FLASH_SECTOR) + { + if (prv_spi_flash_erase_sector(i) == -1) + { + return -1; + } + } + + return 0; +} + +int hal_spi_flash_write(const void* buf, int32_t len, uint32_t* location) +{ + const uint8_t* pbuf = (const uint8_t*)buf; + int page_cnt = 0; + int remain_cnt = 0; + int temp = 0; + uint32_t loc_addr; + uint8_t addr = 0; + uint8_t count = 0; + int i; + int ret = 0; + + if (NULL == pbuf + || NULL == location + || len < 0 + || *location > QSPI_FLASH_TOTAL_SIZE + || len + *location > QSPI_FLASH_TOTAL_SIZE) + { + return -1; + } + + loc_addr = *location; + addr = loc_addr % QSPI_FLASH_PAGESIZE; + count = QSPI_FLASH_PAGESIZE - addr; + page_cnt = len / QSPI_FLASH_PAGESIZE; + remain_cnt = len % QSPI_FLASH_PAGESIZE; + + if (addr == 0) /* addr is aligned to SPI_FLASH_PAGESIZE */ + { + if (page_cnt == 0) /* len < SPI_FLASH_PAGESIZE */ + { + ret = prv_spi_flash_write_page(pbuf, loc_addr, len); + CHECK_RET_RETURN(ret); + } + else /* len > SPI_FLASH_PAGESIZE */ + { + for (i = 0; i < page_cnt; ++i) + { + ret = prv_spi_flash_write_page(pbuf + i * QSPI_FLASH_PAGESIZE, loc_addr, QSPI_FLASH_PAGESIZE); + CHECK_RET_RETURN(ret); + loc_addr += QSPI_FLASH_PAGESIZE; + } + + ret = prv_spi_flash_write_page(pbuf + page_cnt * QSPI_FLASH_PAGESIZE, loc_addr, remain_cnt); + CHECK_RET_RETURN(ret); + } + } + else /* addr is not aligned to SPI_FLASH_PAGESIZE */ + { + if (page_cnt == 0) /* len < SPI_FLASH_PAGESIZE */ + { + if (remain_cnt > count) /* (len + loc_addr) > SPI_FLASH_PAGESIZE */ + { + temp = remain_cnt - count; + + ret = prv_spi_flash_write_page(pbuf, loc_addr, count); + CHECK_RET_RETURN(ret); + + ret = prv_spi_flash_write_page(pbuf + count, loc_addr + count, temp); + CHECK_RET_RETURN(ret); + } + else + { + ret = prv_spi_flash_write_page(pbuf, loc_addr, len); + CHECK_RET_RETURN(ret); + } + } + else /* len > SPI_FLASH_PAGESIZE */ + { + len -= count; + page_cnt = len / QSPI_FLASH_PAGESIZE; + remain_cnt = len % QSPI_FLASH_PAGESIZE; + + ret = prv_spi_flash_write_page(pbuf, loc_addr, count); + CHECK_RET_RETURN(ret); + loc_addr += count; + + for (i = 0; i < page_cnt; ++i) + { + ret = prv_spi_flash_write_page(pbuf + count + i * QSPI_FLASH_PAGESIZE, loc_addr, QSPI_FLASH_PAGESIZE); + CHECK_RET_RETURN(ret); + loc_addr += QSPI_FLASH_PAGESIZE; + } + + if (remain_cnt != 0) + { + ret = prv_spi_flash_write_page(pbuf + count + page_cnt * QSPI_FLASH_PAGESIZE, loc_addr, remain_cnt); + CHECK_RET_RETURN(ret); + } + } + } + + *location += len; + return ret; + +} + +int hal_spi_flash_erase_write(const void* buf, int32_t len, uint32_t location) +{ + int ret = 0; + + ret = hal_spi_flash_erase(location, len); + CHECK_RET_RETURN(ret); + ret = hal_spi_flash_write(buf, len, &location); + + return ret; +} + +int hal_spi_flash_read(void* buf, int32_t len, uint32_t location) +{ + int ret = 0; + uint8_t* pbuf = (uint8_t*)buf; + + if (NULL == pbuf + || len < 0 + || location > QSPI_FLASH_TOTAL_SIZE + || len + location > QSPI_FLASH_TOTAL_SIZE) + { + return -1; + } + + QSPI_Send_CMD(QSPI_FLASH_FastReadData, location, 8, QSPI_INSTRUCTION_1_LINE, QSPI_ADDRESS_1_LINE, QSPI_ADDRESS_24_BITS, QSPI_DATA_1_LINE); + QSPI_Receive(buf, len); + + return ret; + +} + +int hal_spi_flash_get_id(void) +{ + QSPI_CommandTypeDef s_command; + uint8_t temp[3]; + uint32_t deviceid; + + s_command.InstructionMode = QSPI_INSTRUCTION_1_LINE; + s_command.Instruction = QSPI_FLASH_JedecDeviceID; + s_command.AddressMode = QSPI_ADDRESS_1_LINE; + s_command.AddressSize = QSPI_ADDRESS_24_BITS; + s_command.DataMode = QSPI_DATA_1_LINE; + s_command.AddressMode = QSPI_ADDRESS_NONE; + s_command.AlternateByteMode = QSPI_ALTERNATE_BYTES_NONE; + s_command.DummyCycles = 0; + s_command.NbData = 3; + s_command.DdrMode = QSPI_DDR_MODE_DISABLE; + s_command.DdrHoldHalfCycle = QSPI_DDR_HHC_ANALOG_DELAY; + s_command.SIOOMode = QSPI_SIOO_INST_EVERY_CMD; + + HAL_QSPI_Command(&hqspi, &s_command, HAL_QPSI_TIMEOUT_DEFAULT_VALUE); + + QSPI_Receive(temp, 3); + deviceid = (temp[1]<<8)|( temp[0]<<16)|(temp[2]); + return deviceid; +} + + +#endif /* HAL_QSPI_MODULE_ENABLED */ diff --git a/board/TencentOS_tiny_EVB_MX_Plus/BSP/Hardware/QSPI_FLASH/hal_qspi_flash.h b/board/TencentOS_tiny_EVB_MX_Plus/BSP/Hardware/QSPI_FLASH/hal_qspi_flash.h new file mode 100644 index 00000000..9cd2639f --- /dev/null +++ b/board/TencentOS_tiny_EVB_MX_Plus/BSP/Hardware/QSPI_FLASH/hal_qspi_flash.h @@ -0,0 +1,23 @@ +#ifndef __HAL_SPI_FLASH_H__ +#define __HAL_SPI_FLASH_H__ + +#include + +void hal_spi_flash_config(void); + +int hal_spi_flash_erase(uint32_t addr, int32_t len); + +int hal_spi_flash_write(const void* buf, int32_t len, uint32_t* location); + +int hal_spi_flash_erase_write(const void* buf, int32_t len, uint32_t location); + +int hal_spi_flash_read(void* buf, int32_t len, uint32_t location); + +int hal_spi_flash_get_id(void); + +void hal_spi_flash_power_down(void); + +void hal_spi_flash_wake_up(void); + +#endif /* _HAL_SPI_FLASH_H_ */ + diff --git a/board/TencentOS_tiny_EVB_MX_Plus/BSP/Hardware/QSPI_FLASH/qspi_flash_kv.c b/board/TencentOS_tiny_EVB_MX_Plus/BSP/Hardware/QSPI_FLASH/qspi_flash_kv.c new file mode 100644 index 00000000..9968c8ee --- /dev/null +++ b/board/TencentOS_tiny_EVB_MX_Plus/BSP/Hardware/QSPI_FLASH/qspi_flash_kv.c @@ -0,0 +1,40 @@ +#include "tos_kv.h" +#include "hal_qspi_flash.h" + +#define SECTOR_SIZE 4096 // sector size for qspiflash +#define SECTOR_SIZE_LOG2 12 // 2 ^ 12 = 4096 + +#define FOR_KV_FLASH_SIZE (2 * SECTOR_SIZE) +#define FOR_KV_FLASH_START 0x0 + +int stm32l4_qspiflash_read(uint32_t addr, void *buf, size_t len) +{ + return hal_spi_flash_read(buf, len, addr); +} + +int stm32l4_qspiflash_write(uint32_t addr, const void *buf, size_t len) +{ + uint32_t location = addr; + + return hal_spi_flash_write(buf, len, &location); +} + +int stm32l4_qspiflash_erase(uint32_t addr, size_t size) +{ + return hal_spi_flash_erase(addr, size); +} + +kv_flash_drv_t stm32l4_qspiflash_drv = { + .write = stm32l4_qspiflash_write, + .read = stm32l4_qspiflash_read, + .erase = stm32l4_qspiflash_erase, +}; + +kv_flash_prop_t stm32l4_qspiflash_prop = { + .sector_size_log2 = SECTOR_SIZE_LOG2, + .pgm_type = KV_FLASH_PROGRAM_TYPE_BYTE, + .flash_start = FOR_KV_FLASH_START, + .flash_size = FOR_KV_FLASH_SIZE, +}; + + diff --git a/board/TencentOS_tiny_EVB_MX_Plus/BSP/Inc/quadspi.h b/board/TencentOS_tiny_EVB_MX_Plus/BSP/Inc/quadspi.h new file mode 100644 index 00000000..27e5be59 --- /dev/null +++ b/board/TencentOS_tiny_EVB_MX_Plus/BSP/Inc/quadspi.h @@ -0,0 +1,79 @@ +/** + ****************************************************************************** + * File Name : QUADSPI.h + * Description : This file provides code for the configuration + * of the QUADSPI instances. + ****************************************************************************** + ** This notice applies to any and all portions of this file + * that are not between comment pairs USER CODE BEGIN and + * USER CODE END. Other portions of this file, whether + * inserted by the user or by software development tools + * are owned by their respective copyright owners. + * + * COPYRIGHT(c) 2019 STMicroelectronics + * + * 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. + * + ****************************************************************************** + */ +/* Define to prevent recursive inclusion -------------------------------------*/ +#ifndef __quadspi_H +#define __quadspi_H +#ifdef __cplusplus + extern "C" { +#endif + +/* Includes ------------------------------------------------------------------*/ +#include "stm32l4xx_hal.h" +#include "main.h" + +/* USER CODE BEGIN Includes */ + +/* USER CODE END Includes */ + +extern QSPI_HandleTypeDef hqspi; + +/* USER CODE BEGIN Private defines */ + +/* USER CODE END Private defines */ + +void MX_QUADSPI_Init(void); + +/* USER CODE BEGIN Prototypes */ + +/* USER CODE END Prototypes */ + +#ifdef __cplusplus +} +#endif +#endif /*__ quadspi_H */ + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/board/TencentOS_tiny_EVB_MX_Plus/BSP/Inc/stm32l4xx_hal_conf.h b/board/TencentOS_tiny_EVB_MX_Plus/BSP/Inc/stm32l4xx_hal_conf.h index b877f4ad..8c41790a 100644 --- a/board/TencentOS_tiny_EVB_MX_Plus/BSP/Inc/stm32l4xx_hal_conf.h +++ b/board/TencentOS_tiny_EVB_MX_Plus/BSP/Inc/stm32l4xx_hal_conf.h @@ -78,7 +78,7 @@ /*#define HAL_OSPI_MODULE_ENABLED */ /*#define HAL_PCD_MODULE_ENABLED */ /*#define HAL_QSPI_MODULE_ENABLED */ -/*#define HAL_QSPI_MODULE_ENABLED */ +#define HAL_QSPI_MODULE_ENABLED /*#define HAL_RNG_MODULE_ENABLED */ #define HAL_RTC_MODULE_ENABLED /*#define HAL_SAI_MODULE_ENABLED */ diff --git a/board/TencentOS_tiny_EVB_MX_Plus/BSP/Src/quadspi.c b/board/TencentOS_tiny_EVB_MX_Plus/BSP/Src/quadspi.c new file mode 100644 index 00000000..9e4a004f --- /dev/null +++ b/board/TencentOS_tiny_EVB_MX_Plus/BSP/Src/quadspi.c @@ -0,0 +1,139 @@ +/** + ****************************************************************************** + * File Name : QUADSPI.c + * Description : This file provides code for the configuration + * of the QUADSPI instances. + ****************************************************************************** + ** This notice applies to any and all portions of this file + * that are not between comment pairs USER CODE BEGIN and + * USER CODE END. Other portions of this file, whether + * inserted by the user or by software development tools + * are owned by their respective copyright owners. + * + * COPYRIGHT(c) 2019 STMicroelectronics + * + * 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. + * + ****************************************************************************** + */ + +/* Includes ------------------------------------------------------------------*/ +#include "quadspi.h" + +#include "gpio.h" + +/* USER CODE BEGIN 0 */ + +/* USER CODE END 0 */ + +QSPI_HandleTypeDef hqspi; + +/* QUADSPI init function */ +void MX_QUADSPI_Init(void) +{ + + hqspi.Instance = QUADSPI; + hqspi.Init.ClockPrescaler = 0; + hqspi.Init.FifoThreshold = 4; + hqspi.Init.SampleShifting = QSPI_SAMPLE_SHIFTING_HALFCYCLE; + hqspi.Init.FlashSize = 25; + hqspi.Init.ChipSelectHighTime = QSPI_CS_HIGH_TIME_4_CYCLE; + hqspi.Init.ClockMode = QSPI_CLOCK_MODE_0; + hqspi.Init.FlashID = QSPI_FLASH_ID_1; + hqspi.Init.DualFlash = QSPI_DUALFLASH_DISABLE; + if (HAL_QSPI_Init(&hqspi) != HAL_OK) + { + return; + } + +} + +void HAL_QSPI_MspInit(QSPI_HandleTypeDef* qspiHandle) +{ + + GPIO_InitTypeDef GPIO_InitStruct; + if(qspiHandle->Instance==QUADSPI) + { + /* USER CODE BEGIN QUADSPI_MspInit 0 */ + + /* USER CODE END QUADSPI_MspInit 0 */ + /* QUADSPI clock enable */ + __HAL_RCC_QSPI_CLK_ENABLE(); + + /**QUADSPI GPIO Configuration + PB0 ------> QUADSPI_BK1_IO1 + PB1 ------> QUADSPI_BK1_IO0 + PB10 ------> QUADSPI_CLK + PB11 ------> QUADSPI_BK1_NCS + */ + GPIO_InitStruct.Pin = GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_10|GPIO_PIN_11; + GPIO_InitStruct.Mode = GPIO_MODE_AF_PP; + GPIO_InitStruct.Pull = GPIO_NOPULL; + GPIO_InitStruct.Speed = GPIO_SPEED_FREQ_VERY_HIGH; + GPIO_InitStruct.Alternate = GPIO_AF10_QUADSPI; + HAL_GPIO_Init(GPIOB, &GPIO_InitStruct); + + /* USER CODE BEGIN QUADSPI_MspInit 1 */ + + /* USER CODE END QUADSPI_MspInit 1 */ + } +} + +void HAL_QSPI_MspDeInit(QSPI_HandleTypeDef* qspiHandle) +{ + + if(qspiHandle->Instance==QUADSPI) + { + /* USER CODE BEGIN QUADSPI_MspDeInit 0 */ + + /* USER CODE END QUADSPI_MspDeInit 0 */ + /* Peripheral clock disable */ + __HAL_RCC_QSPI_CLK_DISABLE(); + + /**QUADSPI GPIO Configuration + PB0 ------> QUADSPI_BK1_IO1 + PB1 ------> QUADSPI_BK1_IO0 + PB10 ------> QUADSPI_CLK + PB11 ------> QUADSPI_BK1_NCS + */ + HAL_GPIO_DeInit(GPIOB, GPIO_PIN_0|GPIO_PIN_1|GPIO_PIN_10|GPIO_PIN_11); + + /* USER CODE BEGIN QUADSPI_MspDeInit 1 */ + + /* USER CODE END QUADSPI_MspDeInit 1 */ + } +} + +/* USER CODE BEGIN 1 */ + +/* USER CODE END 1 */ + +/** + * @} + */ + +/** + * @} + */ + +/************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ diff --git a/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/DebugConfig/TencentOS_tiny_STM32L431RCTx.dbgconf b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/DebugConfig/TencentOS_tiny_STM32L431RCTx.dbgconf new file mode 100644 index 00000000..c9811753 --- /dev/null +++ b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/DebugConfig/TencentOS_tiny_STM32L431RCTx.dbgconf @@ -0,0 +1,97 @@ +// File: STM32L43x_44x_45x_46x.dbgconf +// Version: 1.0.0 +// Note: refer to STM32L43xxx STM32L44xxx STM32L45xxx STM32L46xxx Reference manual (RM0394) +// refer to STM32L431xx, STM32L432xx, STM32L433xx, STM32L442xx, STM32L443xx, STM32L451xx, STM32L452xx, STM32L462xx datasheets + +// <<< Use Configuration Wizard in Context Menu >>> + +// Debug MCU configuration register (DBGMCU_CR) +// DBG_STANDBY +// Debug Standby mode +// 0: (FCLK=Off, HCLK=Off) The whole digital part is unpowered. +// 1: (FCLK=On, HCLK=On) The digital part is not unpowered and FCLK and HCLK are provided by the internal RC oscillator which remains active +// DBG_STOP +// Debug Stop mode +// 0: (FCLK=Off, HCLK=Off) In STOP mode, the clock controller disables all clocks (including HCLK and FCLK). +// 1: (FCLK=On, HCLK=On) When entering STOP mode, FCLK and HCLK are provided by the internal RC oscillator which remains active in STOP mode. +// DBG_SLEEP +// Debug Sleep mode +// 0: (FCLK=On, HCLK=Off) In Sleep mode, FCLK is clocked by the system clock as previously configured by the software while HCLK is disabled. +// 1: (FCLK=On, HCLK=On) When entering Sleep mode, HCLK is fed by the same clock that is provided to FCLK (system clock as previously configured by the software). +// +DbgMCU_CR = 0x00000007; + +// Debug MCU APB1 freeze register1 (DBGMCU_APB1FZR1) +// DBG_LPTIM1_STOP +// LPTIM1 counter stopped when core is halted +// 0: The counter clock of LPTIM1 is fed even if the core is halted +// 1: The counter clock of LPTIM1 is stopped when the core is halted +// DBG_CAN_STOP +// bxCAN1 stopped when core is halted +// 0: Same behavior as in normal mode +// 1: The bxCAN1 receive registers are frozen +// DBG_I2C3_STOP +// I2C3 SMBUS timeout counter stopped when core is halted +// 0: Same behavior as in normal mode +// 1: The I2C3 SMBus timeout is frozen +// DBG_I2C2_STOP +// I2C2 SMBUS timeout counter stopped when core is halted +// 0: Same behavior as in normal mode +// 1: The I2C2 SMBus timeout is frozen +// DBG_I2C1_STOP +// I2C1 SMBUS timeout counter stopped when core is halted +// 0: Same behavior as in normal mode +// 1: The I2C1 SMBus timeout is frozen +// DBG_IWDG_STOP +// Independent watchdog counter stopped when core is halted +// 0: The independent watchdog counter clock continues even if the core is halted +// 1: The independent watchdog counter clock is stopped when the core is halted +// DBG_WWDG_STOP +// Window watchdog counter stopped when core is halted +// 0: The window watchdog counter clock continues even if the core is halted +// 1: The window watchdog counter clock is stopped when the core is halted +// DBG_RTC_STOP +// RTC counter stopped when core is halted +// 0: The clock of the RTC counter is fed even if the core is halted +// 1: The clock of the RTC counter is stopped when the core is halted +// DBG_TIM7_STOP +// TIM7 counter stopped when core is halted +// 0: The counter clock of TIM7 is fed even if the core is halted +// 1: The counter clock of TIM7 is stopped when the core is halted +// DBG_TIM6_STOP +// TIM6 counter stopped when core is halted +// 0: The counter clock of TIM6 is fed even if the core is halted +// 1: The counter clock of TIM6 is stopped when the core is halted +// DBG_TIM2_STOP +// TIM2 counter stopped when core is halted +// 0: The counter clock of TIM2 is fed even if the core is halted +// 1: The counter clock of TIM2 is stopped when the core is halted +// +DbgMCU_APB1_Fz1 = 0x00000000; + +// Debug MCU APB1 freeze register 2 (DBGMCU_APB1FZR2) +// DBG_LPTIM2_STOP +// LPTIM2 counter stopped when core is halted +// 0: The counter clock of LPTIM2 is fed even if the core is halted +// 1: The counter clock of LPTIM2 is stopped when the core is halted +// +DbgMCU_APB1_Fz2 = 0x00000000; + +// Debug MCU APB2 freeze register (DBGMCU_APB2FZR) +// DBG_TIM16_STOP +// TIM16 counter stopped when core is halted +// 0: The clock of the TIM16 counter is fed even if the core is halted +// 1: The clock of the TIM16 counter is stopped when the core is halted +// DBG_TIM15_STOP +// TIM15 counter stopped when core is halted +// 0: The clock of the TIM15 counter is fed even if the core is halted +// 1: The clock of the TIM15 counter is stopped when the core is halted +// DBG_TIM1_STOP +// TIM1 counter stopped when core is halted +// 0: The clock of the TIM1 counter is fed even if the core is halted +// 1: The clock of the TIM1 counter is stopped when the core is halted +// +DbgMCU_APB2_Fz = 0x00000000; +// + +// <<< end of configuration section >>> \ No newline at end of file diff --git a/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/EventRecorderStub.scvd b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/EventRecorderStub.scvd new file mode 100644 index 00000000..2956b296 --- /dev/null +++ b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/EventRecorderStub.scvd @@ -0,0 +1,9 @@ + + + + + + + + + diff --git a/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/RTE/_TencentOS_tiny/RTE_Components.h b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/RTE/_TencentOS_tiny/RTE_Components.h new file mode 100644 index 00000000..45b7722b --- /dev/null +++ b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/RTE/_TencentOS_tiny/RTE_Components.h @@ -0,0 +1,20 @@ + +/* + * Auto generated Run-Time-Environment Component Configuration File + * *** Do not modify ! *** + * + * Project: 'TencentOS_tiny' + * Target: 'TencentOS_tiny' + */ + +#ifndef RTE_COMPONENTS_H +#define RTE_COMPONENTS_H + + +/* + * Define the Device Header File: + */ +#define CMSIS_device_header "stm32l4xx.h" + + +#endif /* RTE_COMPONENTS_H */ diff --git a/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/TencentOS_tiny.uvoptx b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/TencentOS_tiny.uvoptx new file mode 100644 index 00000000..6257b01e --- /dev/null +++ b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/TencentOS_tiny.uvoptx @@ -0,0 +1,1252 @@ + + + + 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 + 1037 + 1 +
134238752
+ 0 + 0 + 0 + 0 + 0 + 1 + ..\..\..\..\components\fs\kv\tos_kv.c + + \\TencentOS_tiny\../../../../components/fs/kv/tos_kv.c\1037 +
+ + 1 + 0 + 770 + 1 +
134234982
+ 0 + 0 + 0 + 0 + 0 + 1 + ..\..\..\..\components\fs\kv\tos_kv.c + + \\TencentOS_tiny\../../../../components/fs/kv/tos_kv.c\770 +
+
+ + + 0 + 1 + item_hdr + + + + + 1 + 0 + 0x803d000 + 0 + + + + + 2 + 0 + 0x803d000 + 2048 + 0 + + + + + 3 + 0 + 0x803d000 + 2048 * 2 + 0 + + + + 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\stm32l4xx_it.c + stm32l4xx_it.c + 0 + 0 + + + 2 + 7 + 1 + 0 + 0 + 0 + ..\..\BSP\Src\usart.c + usart.c + 0 + 0 + + + 2 + 8 + 1 + 0 + 0 + 0 + ..\..\BSP\Src\adc.c + adc.c + 0 + 0 + + + 2 + 9 + 1 + 0 + 0 + 0 + ..\..\BSP\Src\dac.c + dac.c + 0 + 0 + + + 2 + 10 + 1 + 0 + 0 + 0 + ..\..\BSP\Src\i2c.c + i2c.c + 0 + 0 + + + 2 + 11 + 1 + 0 + 0 + 0 + ..\..\BSP\Src\spi.c + spi.c + 0 + 0 + + + 2 + 12 + 1 + 0 + 0 + 0 + ..\..\BSP\Src\quadspi.c + quadspi.c + 0 + 0 + + + + + examples + 0 + 0 + 0 + 0 + + 3 + 13 + 1 + 0 + 0 + 0 + ..\..\..\..\examples\kv\kv_sample.c + kv_sample.c + 0 + 0 + + + + + Drivers/STM32L4xx_HAL_Driver + 0 + 0 + 0 + 0 + + 4 + 14 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_tim.c + stm32l4xx_hal_tim.c + 0 + 0 + + + 4 + 15 + 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 + 16 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_uart.c + stm32l4xx_hal_uart.c + 0 + 0 + + + 4 + 17 + 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 + 18 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal.c + stm32l4xx_hal.c + 0 + 0 + + + 4 + 19 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_i2c.c + stm32l4xx_hal_i2c.c + 0 + 0 + + + 4 + 20 + 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 + 21 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_rcc.c + stm32l4xx_hal_rcc.c + 0 + 0 + + + 4 + 22 + 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 + 23 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_flash.c + stm32l4xx_hal_flash.c + 0 + 0 + + + 4 + 24 + 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 + 25 + 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 + 26 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_gpio.c + stm32l4xx_hal_gpio.c + 0 + 0 + + + 4 + 27 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dma.c + stm32l4xx_hal_dma.c + 0 + 0 + + + 4 + 28 + 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 + 29 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_pwr.c + stm32l4xx_hal_pwr.c + 0 + 0 + + + 4 + 30 + 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 + 31 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_cortex.c + stm32l4xx_hal_cortex.c + 0 + 0 + + + 4 + 32 + 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 + 33 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_adc.c + stm32l4xx_hal_adc.c + 0 + 0 + + + 4 + 34 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_dac.c + stm32l4xx_hal_dac.c + 0 + 0 + + + 4 + 35 + 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 + 36 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_spi.c + stm32l4xx_hal_spi.c + 0 + 0 + + + 4 + 37 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_spi_ex.c + stm32l4xx_hal_spi_ex.c + 0 + 0 + + + 4 + 38 + 1 + 0 + 0 + 0 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_qspi.c + stm32l4xx_hal_qspi.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\ONCHIP_FLASH\onchip_flash.c + onchip_flash.c + 0 + 0 + + + 6 + 41 + 1 + 0 + 0 + 0 + ..\..\BSP\Hardware\QSPI_FLASH\hal_qspi_flash.c + hal_qspi_flash.c + 0 + 0 + + + 6 + 42 + 1 + 0 + 0 + 0 + ..\..\BSP\Hardware\DHT11\DHT11_BUS.c + DHT11_BUS.c + 0 + 0 + + + 6 + 43 + 1 + 0 + 0 + 0 + ..\..\BSP\Hardware\OLED\oled.c + oled.c + 0 + 0 + + + 6 + 44 + 1 + 0 + 0 + 0 + ..\..\BSP\Hardware\QSPI_FLASH\qspi_flash_kv.c + qspi_flash_kv.c + 0 + 0 + + + + + kernel + 0 + 0 + 0 + 0 + + 7 + 45 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_binary_heap.c + tos_binary_heap.c + 0 + 0 + + + 7 + 46 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_char_fifo.c + tos_char_fifo.c + 0 + 0 + + + 7 + 47 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_completion.c + tos_completion.c + 0 + 0 + + + 7 + 48 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_countdownlatch.c + tos_countdownlatch.c + 0 + 0 + + + 7 + 49 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_event.c + tos_event.c + 0 + 0 + + + 7 + 50 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_global.c + tos_global.c + 0 + 0 + + + 7 + 51 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_mail_queue.c + tos_mail_queue.c + 0 + 0 + + + 7 + 52 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_message_queue.c + tos_message_queue.c + 0 + 0 + + + 7 + 53 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_mmblk.c + tos_mmblk.c + 0 + 0 + + + 7 + 54 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_mmheap.c + tos_mmheap.c + 0 + 0 + + + 7 + 55 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_mutex.c + tos_mutex.c + 0 + 0 + + + 7 + 56 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_pend.c + tos_pend.c + 0 + 0 + + + 7 + 57 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_priority_mail_queue.c + tos_priority_mail_queue.c + 0 + 0 + + + 7 + 58 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_priority_message_queue.c + tos_priority_message_queue.c + 0 + 0 + + + 7 + 59 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_priority_queue.c + tos_priority_queue.c + 0 + 0 + + + 7 + 60 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_ring_queue.c + tos_ring_queue.c + 0 + 0 + + + 7 + 61 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_robin.c + tos_robin.c + 0 + 0 + + + 7 + 62 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_sched.c + tos_sched.c + 0 + 0 + + + 7 + 63 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_sem.c + tos_sem.c + 0 + 0 + + + 7 + 64 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_sys.c + tos_sys.c + 0 + 0 + + + 7 + 65 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_task.c + tos_task.c + 0 + 0 + + + 7 + 66 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_tick.c + tos_tick.c + 0 + 0 + + + 7 + 67 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_time.c + tos_time.c + 0 + 0 + + + 7 + 68 + 1 + 0 + 0 + 0 + ..\..\..\..\kernel\core\tos_timer.c + tos_timer.c + 0 + 0 + + + + + cpu + 0 + 0 + 0 + 0 + + 8 + 69 + 2 + 0 + 0 + 0 + ..\..\..\..\arch\arm\arm-v7m\cortex-m4\armcc\port_s.S + port_s.S + 0 + 0 + + + 8 + 70 + 1 + 0 + 0 + 0 + ..\..\..\..\arch\arm\arm-v7m\common\tos_cpu.c + tos_cpu.c + 0 + 0 + + + 8 + 71 + 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 + 72 + 1 + 0 + 0 + 0 + ..\..\..\..\osal\cmsis_os\cmsis_os.c + cmsis_os.c + 0 + 0 + + + + + config + 0 + 0 + 0 + 0 + + 10 + 73 + 5 + 0 + 0 + 0 + ..\..\TOS-CONFIG\tos_config.h + tos_config.h + 0 + 0 + + + + + kv + 0 + 0 + 0 + 0 + + 11 + 74 + 1 + 0 + 0 + 0 + ..\..\..\..\components\fs\kv\tos_kv.c + tos_kv.c + 0 + 0 + + + + + ::CMSIS + 0 + 0 + 0 + 1 + + +
diff --git a/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/TencentOS_tiny.uvprojx b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/TencentOS_tiny.uvprojx new file mode 100644 index 00000000..91f4f1c5 --- /dev/null +++ b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/TencentOS_tiny.uvprojx @@ -0,0 +1,827 @@ + + + + 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,WITH_TOS_NET_ADAPTER,USE_ESP8266 + + ..\..\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\OLED;..\..\BSP\Hardware\BH1750;..\..\..\..\components\fs\kv\include + + + + 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 + + + stm32l4xx_it.c + 1 + ..\..\BSP\Src\stm32l4xx_it.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 + + + quadspi.c + 1 + ..\..\BSP\Src\quadspi.c + + + + + examples + + + kv_sample.c + 1 + ..\..\..\..\examples\kv\kv_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 + + + stm32l4xx_hal_qspi.c + 1 + ..\..\..\..\platform\vendor_bsp\st\STM32L4xx_HAL_Driver\Src\stm32l4xx_hal_qspi.c + + + + + Drivers/CMSIS + + + system_stm32l4xx.c + 1 + ..\..\BSP\Src\system_stm32l4xx.c + + + + + Hardware + + + onchip_flash.c + 1 + ..\..\BSP\Hardware\ONCHIP_FLASH\onchip_flash.c + + + hal_qspi_flash.c + 1 + ..\..\BSP\Hardware\QSPI_FLASH\hal_qspi_flash.c + + + DHT11_BUS.c + 1 + ..\..\BSP\Hardware\DHT11\DHT11_BUS.c + + + oled.c + 1 + ..\..\BSP\Hardware\OLED\oled.c + + + qspi_flash_kv.c + 1 + ..\..\BSP\Hardware\QSPI_FLASH\qspi_flash_kv.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 + + + + + config + + + tos_config.h + 5 + ..\..\TOS-CONFIG\tos_config.h + + + + + kv + + + tos_kv.c + 1 + ..\..\..\..\components\fs\kv\tos_kv.c + + + + + ::CMSIS + + + + + + + + + + + + + + + + + + +
diff --git a/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/obj/TencentOS_tiny.htm b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/obj/TencentOS_tiny.htm new file mode 100644 index 00000000..654fb924 --- /dev/null +++ b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/obj/TencentOS_tiny.htm @@ -0,0 +1,3389 @@ + + +Static Call Graph - [.\obj\TencentOS_tiny.axf] +
+

Static Call Graph for image .\obj\TencentOS_tiny.axf


+

#<CALLGRAPH># ARM Linker, 5060750: Last Updated: Thu Dec 19 15:57:53 2019 +

+

Maximum Stack Usage = 392 bytes + Unknown(Functions without stacksize, Cycles, Untraceable Function Pointers)

+Call chain for Maximum Stack Depth:

+task ⇒ tos_kv_set ⇒ kv_item_update ⇒ kv_item_save ⇒ kv_blk_search_suitable ⇒ kv_gc ⇒ kv_mgr_blk_index_rebuild ⇒ kv_mgr_index_build ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +

+

+Functions with no stack information +

+ +

+

+Mutually Recursive functions +

  • ADC1_IRQHandler   ⇒   ADC1_IRQHandler
    + +

    +

    +Function Pointers +

      +
    • ADC1_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • BusFault_Handler from stm32l4xx_it.o(i.BusFault_Handler) referenced from startup_stm32l431xx.o(RESET) +
    • CAN1_RX0_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • CAN1_RX1_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • CAN1_SCE_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • CAN1_TX_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • COMP_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • CRS_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • DMA1_Channel1_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • DMA1_Channel2_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • DMA1_Channel3_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • DMA1_Channel4_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • DMA1_Channel5_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • DMA1_Channel6_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • DMA1_Channel7_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • DMA2_Channel1_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • DMA2_Channel2_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • DMA2_Channel3_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • DMA2_Channel4_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • DMA2_Channel5_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • DMA2_Channel6_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • DMA2_Channel7_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • DebugMon_Handler from stm32l4xx_it.o(i.DebugMon_Handler) referenced from startup_stm32l431xx.o(RESET) +
    • EXTI0_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • EXTI15_10_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • EXTI1_IRQHandler from stm32l4xx_it.o(i.EXTI1_IRQHandler) referenced from startup_stm32l431xx.o(RESET) +
    • EXTI2_IRQHandler from stm32l4xx_it.o(i.EXTI2_IRQHandler) referenced from startup_stm32l431xx.o(RESET) +
    • EXTI3_IRQHandler from stm32l4xx_it.o(i.EXTI3_IRQHandler) referenced from startup_stm32l431xx.o(RESET) +
    • EXTI4_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • EXTI9_5_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • FLASH_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • FPU_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • HardFault_Handler from stm32l4xx_it.o(i.HardFault_Handler) referenced from startup_stm32l431xx.o(RESET) +
    • I2C1_ER_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • I2C1_EV_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • I2C2_ER_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • I2C2_EV_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • I2C3_ER_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • I2C3_EV_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • LPTIM1_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • LPTIM2_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • LPUART1_IRQHandler from stm32l4xx_it.o(i.LPUART1_IRQHandler) referenced from startup_stm32l431xx.o(RESET) +
    • MemManage_Handler from stm32l4xx_it.o(i.MemManage_Handler) referenced from startup_stm32l431xx.o(RESET) +
    • NMI_Handler from stm32l4xx_it.o(i.NMI_Handler) referenced from startup_stm32l431xx.o(RESET) +
    • PVD_PVM_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • PendSV_Handler from port_s.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • QUADSPI_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • RCC_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • RNG_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • RTC_Alarm_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • RTC_WKUP_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • Reset_Handler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • SAI1_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • SDMMC1_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • SPI1_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • SPI2_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • SPI3_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • SVC_Handler from stm32l4xx_it.o(i.SVC_Handler) referenced from startup_stm32l431xx.o(RESET) +
    • SWPMI1_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • SysTick_Handler from stm32l4xx_it.o(i.SysTick_Handler) referenced from startup_stm32l431xx.o(RESET) +
    • SystemInit from system_stm32l4xx.o(i.SystemInit) referenced from startup_stm32l431xx.o(.text) +
    • TAMP_STAMP_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • TIM1_BRK_TIM15_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • TIM1_CC_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • TIM1_TRG_COM_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • TIM1_UP_TIM16_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • TIM2_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • TIM6_DAC_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • TIM7_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • TSC_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • UART_DMAAbortOnError from stm32l4xx_hal_uart.o(i.UART_DMAAbortOnError) referenced from stm32l4xx_hal_uart.o(i.HAL_UART_IRQHandler) +
    • USART1_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • USART2_IRQHandler from stm32l4xx_it.o(i.USART2_IRQHandler) referenced from startup_stm32l431xx.o(RESET) +
    • USART3_IRQHandler from stm32l4xx_it.o(i.USART3_IRQHandler) referenced from startup_stm32l431xx.o(RESET) +
    • UsageFault_Handler from stm32l4xx_it.o(i.UsageFault_Handler) referenced from startup_stm32l431xx.o(RESET) +
    • WWDG_IRQHandler from startup_stm32l431xx.o(.text) referenced from startup_stm32l431xx.o(RESET) +
    • __main from entry.o(.ARM.Collect$$$$00000000) referenced from startup_stm32l431xx.o(.text) +
    • application_entry from kv_sample.o(i.application_entry) referenced from main.o(.constdata) +
    • fputc from mcu_init.o(i.fputc) referenced from printf5.o(i.__0printf$5) +
    • knl_idle_entry from tos_sys.o(i.knl_idle_entry) referenced from tos_sys.o(i.knl_idle_init) +
    • kv_item_do_fetch from tos_kv.o(i.kv_item_do_fetch) referenced from tos_kv.o(i.kv_item_do_find) +
    • kv_item_do_fetch_new_copy from tos_kv.o(i.kv_item_do_fetch_new_copy) referenced from tos_kv.o(i.kv_item_do_find_new_copy) +
    • kv_item_do_gc from tos_kv.o(i.kv_item_do_gc) referenced from tos_kv.o(i.kv_do_gc) +
    • kv_item_do_recovery from tos_kv.o(i.kv_item_do_recovery) referenced from tos_kv.o(i.kv_mgr_index_build) +
    • main from main.o(i.main) referenced from entry9a.o(.ARM.Collect$$$$0000000B) +
    • stm32l4_qspiflash_erase from qspi_flash_kv.o(i.stm32l4_qspiflash_erase) referenced 2 times from qspi_flash_kv.o(.data) +
    • stm32l4_qspiflash_read from qspi_flash_kv.o(i.stm32l4_qspiflash_read) referenced 2 times from qspi_flash_kv.o(.data) +
    • stm32l4_qspiflash_write from qspi_flash_kv.o(i.stm32l4_qspiflash_write) referenced 2 times from qspi_flash_kv.o(.data) +
    • task from kv_sample.o(i.task) referenced from kv_sample.o(.constdata) +
    • task_exit from tos_task.o(i.task_exit) referenced from tos_task.o(i.tos_task_create) +
    +

    +

    +Global Symbols +

    +

    __main (Thumb, 0 bytes, Stack size unknown bytes, entry.o(.ARM.Collect$$$$00000000)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(.text) +
    +

    _main_stk (Thumb, 0 bytes, Stack size unknown bytes, entry2.o(.ARM.Collect$$$$00000001)) + +

    _main_scatterload (Thumb, 0 bytes, Stack size unknown bytes, entry5.o(.ARM.Collect$$$$00000004)) +

    [Calls]

    • >>   __scatterload +
    + +

    __main_after_scatterload (Thumb, 0 bytes, Stack size unknown bytes, entry5.o(.ARM.Collect$$$$00000004)) +

    [Called By]

    • >>   __scatterload +
    + +

    _main_clock (Thumb, 0 bytes, Stack size unknown bytes, entry7b.o(.ARM.Collect$$$$00000008)) + +

    _main_cpp_init (Thumb, 0 bytes, Stack size unknown bytes, entry8b.o(.ARM.Collect$$$$0000000A)) + +

    _main_init (Thumb, 0 bytes, Stack size unknown bytes, entry9a.o(.ARM.Collect$$$$0000000B)) + +

    __rt_final_cpp (Thumb, 0 bytes, Stack size unknown bytes, entry10a.o(.ARM.Collect$$$$0000000D)) + +

    __rt_final_exit (Thumb, 0 bytes, Stack size unknown bytes, entry11a.o(.ARM.Collect$$$$0000000F)) + +

    Reset_Handler (Thumb, 8 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    ADC1_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +

    [Calls]

    • >>   ADC1_IRQHandler +
    +
    [Called By]
    • >>   ADC1_IRQHandler +
    +
    [Address Reference Count : 1]
    • startup_stm32l431xx.o(RESET) +
    +

    CAN1_RX0_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    CAN1_RX1_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    CAN1_SCE_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    CAN1_TX_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    COMP_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    CRS_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    DMA1_Channel1_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    DMA1_Channel2_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    DMA1_Channel3_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    DMA1_Channel4_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    DMA1_Channel5_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    DMA1_Channel6_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    DMA1_Channel7_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    DMA2_Channel1_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    DMA2_Channel2_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    DMA2_Channel3_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    DMA2_Channel4_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    DMA2_Channel5_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    DMA2_Channel6_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    DMA2_Channel7_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    EXTI0_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    EXTI15_10_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    EXTI4_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    EXTI9_5_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    FLASH_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    FPU_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    I2C1_ER_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    I2C1_EV_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    I2C2_ER_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    I2C2_EV_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    I2C3_ER_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    I2C3_EV_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    LPTIM1_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    LPTIM2_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    PVD_PVM_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    QUADSPI_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    RCC_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    RNG_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    RTC_Alarm_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    RTC_WKUP_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    SAI1_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    SDMMC1_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    SPI1_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    SPI2_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    SPI3_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    SWPMI1_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    TAMP_STAMP_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    TIM1_BRK_TIM15_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    TIM1_CC_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    TIM1_TRG_COM_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    TIM1_UP_TIM16_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    TIM2_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    TIM6_DAC_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    TIM7_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    TSC_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    USART1_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    WWDG_IRQHandler (Thumb, 0 bytes, Stack size 0 bytes, startup_stm32l431xx.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    port_int_disable (Thumb, 0 bytes, Stack size unknown bytes, port_s.o(.text), UNUSED) + +

    port_int_enable (Thumb, 0 bytes, Stack size unknown bytes, port_s.o(.text), UNUSED) + +

    port_cpsr_save (Thumb, 0 bytes, Stack size unknown bytes, port_s.o(.text)) +

    [Called By]

    • >>   tos_cpu_cpsr_save +
    + +

    port_cpsr_restore (Thumb, 0 bytes, Stack size unknown bytes, port_s.o(.text)) +

    [Called By]

    • >>   tos_cpu_cpsr_restore +
    + +

    port_clz (Thumb, 0 bytes, Stack size unknown bytes, port_s.o(.text)) +

    [Called By]

    • >>   tos_cpu_clz +
    + +

    port_sched_start (Thumb, 0 bytes, Stack size unknown bytes, port_s.o(.text)) +

    [Called By]

    • >>   cpu_sched_start +
    + +

    port_context_switch (Thumb, 0 bytes, Stack size unknown bytes, port_s.o(.text)) +

    [Called By]

    • >>   cpu_context_switch +
    + +

    port_irq_context_switch (Thumb, 0 bytes, Stack size unknown bytes, port_s.o(.text)) +

    [Called By]

    • >>   cpu_irq_context_switch +
    + +

    PendSV_Handler (Thumb, 0 bytes, Stack size unknown bytes, port_s.o(.text)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    __aeabi_uldivmod (Thumb, 98 bytes, Stack size 40 bytes, uldiv.o(.text)) +

    [Stack]

    • Max Depth = 40
    • Call Chain = __aeabi_uldivmod +
    +
    [Calls]
    • >>   __aeabi_llsr +
    • >>   __aeabi_llsl +
    +
    [Called By]
    • >>   UART_SetConfig +
    • >>   cpu_init +
    • >>   _printf_core +
    + +

    __aeabi_memcpy (Thumb, 36 bytes, Stack size 0 bytes, memcpya.o(.text)) +

    [Called By]

    • >>   tos_kv_get +
    • >>   kv_item_do_save +
    + +

    __aeabi_memcpy4 (Thumb, 0 bytes, Stack size 0 bytes, memcpya.o(.text), UNUSED) + +

    __aeabi_memcpy8 (Thumb, 0 bytes, Stack size 0 bytes, memcpya.o(.text), UNUSED) + +

    __aeabi_memset (Thumb, 14 bytes, Stack size 0 bytes, memseta.o(.text)) +

    [Called By]

    • >>   _memset$wrapper +
    • >>   __aeabi_memclr +
    + +

    __aeabi_memset4 (Thumb, 0 bytes, Stack size 0 bytes, memseta.o(.text), UNUSED) + +

    __aeabi_memset8 (Thumb, 0 bytes, Stack size 0 bytes, memseta.o(.text), UNUSED) + +

    __aeabi_memclr (Thumb, 4 bytes, Stack size 0 bytes, memseta.o(.text)) +

    [Calls]

    • >>   __aeabi_memset +
    +
    [Called By]
    • >>   kv_item_do_save +
    + +

    __aeabi_memclr4 (Thumb, 0 bytes, Stack size 0 bytes, memseta.o(.text)) +

    [Called By]

    • >>   HAL_UART_MspInit +
    • >>   SystemClock_Config +
    • >>   MX_GPIO_Init +
    • >>   tos_kv_init +
    • >>   kv_mgr_ctl_init +
    + +

    __aeabi_memclr8 (Thumb, 0 bytes, Stack size 0 bytes, memseta.o(.text), UNUSED) + +

    _memset$wrapper (Thumb, 18 bytes, Stack size 8 bytes, memseta.o(.text), UNUSED) +

    [Calls]

    • >>   __aeabi_memset +
    + +

    strlen (Thumb, 14 bytes, Stack size 0 bytes, strlen.o(.text)) +

    [Called By]

    • >>   tos_kv_set +
    • >>   tos_kv_has_key +
    • >>   tos_kv_get +
    • >>   tos_kv_del +
    • >>   kv_item_save +
    • >>   kv_item_do_save +
    • >>   kv_item_do_fetch +
    + +

    memcmp (Thumb, 26 bytes, Stack size 12 bytes, memcmp.o(.text)) +

    [Stack]

    • Max Depth = 12
    • Call Chain = memcmp +
    +
    [Called By]
    • >>   kv_item_value_is_match +
    • >>   kv_item_try_delete +
    • >>   kv_item_is_moved +
    • >>   kv_item_do_fetch_new_copy +
    • >>   kv_item_do_fetch +
    + +

    __aeabi_llsl (Thumb, 30 bytes, Stack size 0 bytes, llshl.o(.text)) +

    [Called By]

    • >>   __aeabi_uldivmod +
    + +

    _ll_shift_l (Thumb, 0 bytes, Stack size 0 bytes, llshl.o(.text), UNUSED) + +

    __aeabi_llsr (Thumb, 32 bytes, Stack size 0 bytes, llushr.o(.text)) +

    [Called By]

    • >>   __aeabi_uldivmod +
    + +

    _ll_ushift_r (Thumb, 0 bytes, Stack size 0 bytes, llushr.o(.text), UNUSED) + +

    __scatterload (Thumb, 28 bytes, Stack size 0 bytes, init.o(.text)) +

    [Calls]

    • >>   __main_after_scatterload +
    +
    [Called By]
    • >>   _main_scatterload +
    + +

    __scatterload_rt2 (Thumb, 0 bytes, Stack size 0 bytes, init.o(.text), UNUSED) + +

    __decompress (Thumb, 0 bytes, Stack size unknown bytes, __dczerorl2.o(.text), UNUSED) + +

    __decompress1 (Thumb, 86 bytes, Stack size unknown bytes, __dczerorl2.o(.text), UNUSED) + +

    BusFault_Handler (Thumb, 4 bytes, Stack size 0 bytes, stm32l4xx_it.o(i.BusFault_Handler)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    DHT11_Init (Thumb, 48 bytes, Stack size 8 bytes, dht11_bus.o(i.DHT11_Init)) +

    [Stack]

    • Max Depth = 52
    • Call Chain = DHT11_Init ⇒ DHT11_Mode_Out_PP ⇒ HAL_GPIO_Init +
    +
    [Calls]
    • >>   HAL_GPIO_WritePin +
    • >>   DHT11_Mode_Out_PP +
    +
    [Called By]
    • >>   board_init +
    + +

    DebugMon_Handler (Thumb, 2 bytes, Stack size 0 bytes, stm32l4xx_it.o(i.DebugMon_Handler)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    EXTI1_IRQHandler (Thumb, 10 bytes, Stack size 8 bytes, stm32l4xx_it.o(i.EXTI1_IRQHandler)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = EXTI1_IRQHandler ⇒ HAL_GPIO_EXTI_IRQHandler +
    +
    [Calls]
    • >>   HAL_GPIO_EXTI_IRQHandler +
    +
    [Address Reference Count : 1]
    • startup_stm32l431xx.o(RESET) +
    +

    EXTI2_IRQHandler (Thumb, 10 bytes, Stack size 8 bytes, stm32l4xx_it.o(i.EXTI2_IRQHandler)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = EXTI2_IRQHandler ⇒ HAL_GPIO_EXTI_IRQHandler +
    +
    [Calls]
    • >>   HAL_GPIO_EXTI_IRQHandler +
    +
    [Address Reference Count : 1]
    • startup_stm32l431xx.o(RESET) +
    +

    EXTI3_IRQHandler (Thumb, 10 bytes, Stack size 8 bytes, stm32l4xx_it.o(i.EXTI3_IRQHandler)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = EXTI3_IRQHandler ⇒ HAL_GPIO_EXTI_IRQHandler +
    +
    [Calls]
    • >>   HAL_GPIO_EXTI_IRQHandler +
    +
    [Address Reference Count : 1]
    • startup_stm32l431xx.o(RESET) +
    +

    Error_Handler (Thumb, 2 bytes, Stack size 0 bytes, mcu_init.o(i.Error_Handler)) +

    [Called By]

    • >>   MX_USART3_UART_Init +
    • >>   MX_USART2_UART_Init +
    • >>   SystemClock_Config +
    + +

    HAL_DMA_Abort_IT (Thumb, 92 bytes, Stack size 16 bytes, stm32l4xx_hal_dma.o(i.HAL_DMA_Abort_IT)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = HAL_DMA_Abort_IT +
    +
    [Called By]
    • >>   HAL_UART_IRQHandler +
    + +

    HAL_Delay (Thumb, 32 bytes, Stack size 16 bytes, stm32l4xx_hal.o(i.HAL_Delay)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = HAL_Delay +
    +
    [Calls]
    • >>   HAL_GetTick +
    +
    [Called By]
    • >>   OLED_Init +
    + +

    HAL_GPIO_EXTI_Callback (Thumb, 2 bytes, Stack size 0 bytes, stm32l4xx_hal_gpio.o(i.HAL_GPIO_EXTI_Callback)) +

    [Called By]

    • >>   HAL_GPIO_EXTI_IRQHandler +
    + +

    HAL_GPIO_EXTI_IRQHandler (Thumb, 24 bytes, Stack size 8 bytes, stm32l4xx_hal_gpio.o(i.HAL_GPIO_EXTI_IRQHandler)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = HAL_GPIO_EXTI_IRQHandler +
    +
    [Calls]
    • >>   HAL_GPIO_EXTI_Callback +
    +
    [Called By]
    • >>   EXTI3_IRQHandler +
    • >>   EXTI2_IRQHandler +
    • >>   EXTI1_IRQHandler +
    + +

    HAL_GPIO_Init (Thumb, 428 bytes, Stack size 20 bytes, stm32l4xx_hal_gpio.o(i.HAL_GPIO_Init)) +

    [Stack]

    • Max Depth = 20
    • Call Chain = HAL_GPIO_Init +
    +
    [Called By]
    • >>   HAL_UART_MspInit +
    • >>   MX_GPIO_Init +
    • >>   HAL_QSPI_MspInit +
    • >>   DHT11_Mode_Out_PP +
    + +

    HAL_GPIO_WritePin (Thumb, 10 bytes, Stack size 0 bytes, stm32l4xx_hal_gpio.o(i.HAL_GPIO_WritePin)) +

    [Called By]

    • >>   DHT11_Init +
    • >>   MX_GPIO_Init +
    • >>   Write_IIC_Byte +
    • >>   IIC_Wait_Ack +
    • >>   IIC_Stop +
    • >>   IIC_Start +
    + +

    HAL_GetTick (Thumb, 6 bytes, Stack size 0 bytes, stm32l4xx_hal.o(i.HAL_GetTick)) +

    [Called By]

    • >>   HAL_UART_Transmit +
    • >>   HAL_RCC_OscConfig +
    • >>   HAL_RCC_ClockConfig +
    • >>   HAL_RCCEx_PeriphCLKConfig +
    • >>   HAL_Delay +
    • >>   HAL_QSPI_Init +
    • >>   UART_WaitOnFlagUntilTimeout +
    • >>   UART_CheckIdleState +
    • >>   RCCEx_PLLSAI1_Config +
    • >>   HAL_QSPI_Transmit +
    • >>   HAL_QSPI_Receive +
    • >>   HAL_QSPI_Command +
    • >>   QSPI_WaitFlagStateUntilTimeout +
    + +

    HAL_IncTick (Thumb, 12 bytes, Stack size 0 bytes, stm32l4xx_hal.o(i.HAL_IncTick)) +

    [Called By]

    • >>   SysTick_Handler +
    + +

    HAL_Init (Thumb, 30 bytes, Stack size 8 bytes, stm32l4xx_hal.o(i.HAL_Init)) +

    [Stack]

    • Max Depth = 72
    • Call Chain = HAL_Init ⇒ HAL_InitTick ⇒ HAL_NVIC_SetPriority ⇒ __NVIC_SetPriority +
    +
    [Calls]
    • >>   HAL_MspInit +
    • >>   HAL_InitTick +
    • >>   HAL_NVIC_SetPriorityGrouping +
    +
    [Called By]
    • >>   board_init +
    + +

    HAL_InitTick (Thumb, 44 bytes, Stack size 16 bytes, stm32l4xx_hal.o(i.HAL_InitTick)) +

    [Stack]

    • Max Depth = 64
    • Call Chain = HAL_InitTick ⇒ HAL_NVIC_SetPriority ⇒ __NVIC_SetPriority +
    +
    [Calls]
    • >>   HAL_NVIC_SetPriority +
    • >>   HAL_SYSTICK_Config +
    +
    [Called By]
    • >>   HAL_RCC_OscConfig +
    • >>   HAL_RCC_ClockConfig +
    • >>   HAL_Init +
    + +

    HAL_MspInit (Thumb, 58 bytes, Stack size 8 bytes, stm32l4xx_hal_msp.o(i.HAL_MspInit)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = HAL_MspInit +
    +
    [Called By]
    • >>   HAL_Init +
    + +

    HAL_NVIC_EnableIRQ (Thumb, 32 bytes, Stack size 0 bytes, stm32l4xx_hal_cortex.o(i.HAL_NVIC_EnableIRQ)) +

    [Called By]

    • >>   HAL_UART_MspInit +
    • >>   MX_GPIO_Init +
    + +

    HAL_NVIC_SetPriority (Thumb, 124 bytes, Stack size 40 bytes, stm32l4xx_hal_cortex.o(i.HAL_NVIC_SetPriority)) +

    [Stack]

    • Max Depth = 48
    • Call Chain = HAL_NVIC_SetPriority ⇒ __NVIC_SetPriority +
    +
    [Calls]
    • >>   __NVIC_SetPriority +
    • >>   __NVIC_GetPriorityGrouping +
    +
    [Called By]
    • >>   HAL_UART_MspInit +
    • >>   MX_GPIO_Init +
    • >>   HAL_InitTick +
    + +

    HAL_NVIC_SetPriorityGrouping (Thumb, 32 bytes, Stack size 0 bytes, stm32l4xx_hal_cortex.o(i.HAL_NVIC_SetPriorityGrouping)) +

    [Called By]

    • >>   HAL_Init +
    + +

    HAL_PWREx_ControlVoltageScaling (Thumb, 128 bytes, Stack size 0 bytes, stm32l4xx_hal_pwr_ex.o(i.HAL_PWREx_ControlVoltageScaling)) +

    [Called By]

    • >>   SystemClock_Config +
    + +

    HAL_PWREx_GetVoltageRange (Thumb, 10 bytes, Stack size 0 bytes, stm32l4xx_hal_pwr_ex.o(i.HAL_PWREx_GetVoltageRange)) +

    [Called By]

    • >>   RCC_SetFlashLatencyFromMSIRange +
    + +

    HAL_PWR_EnableBkUpAccess (Thumb, 14 bytes, Stack size 0 bytes, stm32l4xx_hal_pwr.o(i.HAL_PWR_EnableBkUpAccess)) +

    [Called By]

    • >>   SystemClock_Config +
    + +

    HAL_QSPI_Command (Thumb, 164 bytes, Stack size 32 bytes, stm32l4xx_hal_qspi.o(i.HAL_QSPI_Command)) +

    [Stack]

    • Max Depth = 56
    • Call Chain = HAL_QSPI_Command ⇒ QSPI_WaitFlagStateUntilTimeout +
    +
    [Calls]
    • >>   HAL_GetTick +
    • >>   QSPI_WaitFlagStateUntilTimeout +
    • >>   QSPI_Config +
    +
    [Called By]
    • >>   QSPI_Send_CMD +
    + +

    HAL_QSPI_Init (Thumb, 206 bytes, Stack size 24 bytes, stm32l4xx_hal_qspi.o(i.HAL_QSPI_Init)) +

    [Stack]

    • Max Depth = 76
    • Call Chain = HAL_QSPI_Init ⇒ HAL_QSPI_MspInit ⇒ HAL_GPIO_Init +
    +
    [Calls]
    • >>   HAL_QSPI_MspInit +
    • >>   HAL_GetTick +
    • >>   HAL_QSPI_SetTimeout +
    • >>   QSPI_WaitFlagStateUntilTimeout +
    +
    [Called By]
    • >>   MX_QUADSPI_Init +
    + +

    HAL_QSPI_MspInit (Thumb, 76 bytes, Stack size 32 bytes, quadspi.o(i.HAL_QSPI_MspInit)) +

    [Stack]

    • Max Depth = 52
    • Call Chain = HAL_QSPI_MspInit ⇒ HAL_GPIO_Init +
    +
    [Calls]
    • >>   HAL_GPIO_Init +
    +
    [Called By]
    • >>   HAL_QSPI_Init +
    + +

    HAL_QSPI_Receive (Thumb, 228 bytes, Stack size 40 bytes, stm32l4xx_hal_qspi.o(i.HAL_QSPI_Receive)) +

    [Stack]

    • Max Depth = 64
    • Call Chain = HAL_QSPI_Receive ⇒ QSPI_WaitFlagStateUntilTimeout +
    +
    [Calls]
    • >>   HAL_GetTick +
    • >>   QSPI_WaitFlagStateUntilTimeout +
    +
    [Called By]
    • >>   QSPI_Receive +
    + +

    HAL_QSPI_SetTimeout (Thumb, 4 bytes, Stack size 0 bytes, stm32l4xx_hal_qspi.o(i.HAL_QSPI_SetTimeout)) +

    [Called By]

    • >>   HAL_QSPI_Init +
    + +

    HAL_QSPI_Transmit (Thumb, 212 bytes, Stack size 32 bytes, stm32l4xx_hal_qspi.o(i.HAL_QSPI_Transmit)) +

    [Stack]

    • Max Depth = 56
    • Call Chain = HAL_QSPI_Transmit ⇒ QSPI_WaitFlagStateUntilTimeout +
    +
    [Calls]
    • >>   HAL_GetTick +
    • >>   QSPI_WaitFlagStateUntilTimeout +
    +
    [Called By]
    • >>   QSPI_Transmit +
    + +

    HAL_RCCEx_EnableMSIPLLMode (Thumb, 14 bytes, Stack size 0 bytes, stm32l4xx_hal_rcc_ex.o(i.HAL_RCCEx_EnableMSIPLLMode)) +

    [Called By]

    • >>   SystemClock_Config +
    + +

    HAL_RCCEx_PeriphCLKConfig (Thumb, 894 bytes, Stack size 32 bytes, stm32l4xx_hal_rcc_ex.o(i.HAL_RCCEx_PeriphCLKConfig)) +

    [Stack]

    • Max Depth = 56
    • Call Chain = HAL_RCCEx_PeriphCLKConfig ⇒ RCCEx_PLLSAI1_Config +
    +
    [Calls]
    • >>   HAL_GetTick +
    • >>   RCCEx_PLLSAI1_Config +
    +
    [Called By]
    • >>   SystemClock_Config +
    + +

    HAL_RCC_ClockConfig (Thumb, 358 bytes, Stack size 24 bytes, stm32l4xx_hal_rcc.o(i.HAL_RCC_ClockConfig)) +

    [Stack]

    • Max Depth = 88
    • Call Chain = HAL_RCC_ClockConfig ⇒ HAL_InitTick ⇒ HAL_NVIC_SetPriority ⇒ __NVIC_SetPriority +
    +
    [Calls]
    • >>   HAL_RCC_GetSysClockFreq +
    • >>   HAL_GetTick +
    • >>   HAL_InitTick +
    +
    [Called By]
    • >>   SystemClock_Config +
    + +

    HAL_RCC_GetHCLKFreq (Thumb, 6 bytes, Stack size 0 bytes, stm32l4xx_hal_rcc.o(i.HAL_RCC_GetHCLKFreq)) +

    [Called By]

    • >>   HAL_RCC_GetPCLK2Freq +
    • >>   HAL_RCC_GetPCLK1Freq +
    + +

    HAL_RCC_GetPCLK1Freq (Thumb, 26 bytes, Stack size 4 bytes, stm32l4xx_hal_rcc.o(i.HAL_RCC_GetPCLK1Freq)) +

    [Stack]

    • Max Depth = 4
    • Call Chain = HAL_RCC_GetPCLK1Freq +
    +
    [Calls]
    • >>   HAL_RCC_GetHCLKFreq +
    +
    [Called By]
    • >>   UART_SetConfig +
    + +

    HAL_RCC_GetPCLK2Freq (Thumb, 26 bytes, Stack size 4 bytes, stm32l4xx_hal_rcc.o(i.HAL_RCC_GetPCLK2Freq)) +

    [Stack]

    • Max Depth = 4
    • Call Chain = HAL_RCC_GetPCLK2Freq +
    +
    [Calls]
    • >>   HAL_RCC_GetHCLKFreq +
    +
    [Called By]
    • >>   UART_SetConfig +
    + +

    HAL_RCC_GetSysClockFreq (Thumb, 266 bytes, Stack size 24 bytes, stm32l4xx_hal_rcc.o(i.HAL_RCC_GetSysClockFreq)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = HAL_RCC_GetSysClockFreq +
    +
    [Called By]
    • >>   HAL_RCC_OscConfig +
    • >>   HAL_RCC_ClockConfig +
    • >>   UART_SetConfig +
    + +

    HAL_RCC_OscConfig (Thumb, 1660 bytes, Stack size 32 bytes, stm32l4xx_hal_rcc.o(i.HAL_RCC_OscConfig)) +

    [Stack]

    • Max Depth = 96
    • Call Chain = HAL_RCC_OscConfig ⇒ HAL_InitTick ⇒ HAL_NVIC_SetPriority ⇒ __NVIC_SetPriority +
    +
    [Calls]
    • >>   HAL_RCC_GetSysClockFreq +
    • >>   HAL_GetTick +
    • >>   RCC_SetFlashLatencyFromMSIRange +
    • >>   HAL_InitTick +
    +
    [Called By]
    • >>   SystemClock_Config +
    + +

    HAL_SYSTICK_Config (Thumb, 52 bytes, Stack size 16 bytes, stm32l4xx_hal_cortex.o(i.HAL_SYSTICK_Config)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = HAL_SYSTICK_Config ⇒ __NVIC_SetPriority +
    +
    [Calls]
    • >>   __NVIC_SetPriority +
    +
    [Called By]
    • >>   HAL_InitTick +
    + +

    HAL_UARTEx_WakeupCallback (Thumb, 2 bytes, Stack size 0 bytes, stm32l4xx_hal_uart_ex.o(i.HAL_UARTEx_WakeupCallback)) +

    [Called By]

    • >>   HAL_UART_IRQHandler +
    + +

    HAL_UART_ErrorCallback (Thumb, 2 bytes, Stack size 0 bytes, stm32l4xx_hal_uart.o(i.HAL_UART_ErrorCallback)) +

    [Called By]

    • >>   HAL_UART_IRQHandler +
    • >>   UART_DMAAbortOnError +
    + +

    HAL_UART_IRQHandler (Thumb, 392 bytes, Stack size 24 bytes, stm32l4xx_hal_uart.o(i.HAL_UART_IRQHandler)) +

    [Stack]

    • Max Depth = 40
    • Call Chain = HAL_UART_IRQHandler ⇒ HAL_DMA_Abort_IT +
    +
    [Calls]
    • >>   HAL_UART_ErrorCallback +
    • >>   HAL_UARTEx_WakeupCallback +
    • >>   HAL_DMA_Abort_IT +
    • >>   UART_EndTransmit_IT +
    • >>   UART_EndRxTransfer +
    +
    [Called By]
    • >>   USART3_IRQHandler +
    • >>   USART2_IRQHandler +
    • >>   LPUART1_IRQHandler +
    + +

    HAL_UART_Init (Thumb, 120 bytes, Stack size 8 bytes, stm32l4xx_hal_uart.o(i.HAL_UART_Init)) +

    [Stack]

    • Max Depth = 88
    • Call Chain = HAL_UART_Init ⇒ HAL_UART_MspInit ⇒ HAL_NVIC_SetPriority ⇒ __NVIC_SetPriority +
    +
    [Calls]
    • >>   HAL_UART_MspInit +
    • >>   UART_SetConfig +
    • >>   UART_CheckIdleState +
    • >>   UART_AdvFeatureConfig +
    +
    [Called By]
    • >>   MX_USART3_UART_Init +
    • >>   MX_USART2_UART_Init +
    + +

    HAL_UART_MspInit (Thumb, 342 bytes, Stack size 32 bytes, usart.o(i.HAL_UART_MspInit)) +

    [Stack]

    • Max Depth = 80
    • Call Chain = HAL_UART_MspInit ⇒ HAL_NVIC_SetPriority ⇒ __NVIC_SetPriority +
    +
    [Calls]
    • >>   HAL_NVIC_SetPriority +
    • >>   HAL_NVIC_EnableIRQ +
    • >>   HAL_GPIO_Init +
    • >>   __aeabi_memclr4 +
    +
    [Called By]
    • >>   HAL_UART_Init +
    + +

    HAL_UART_Transmit (Thumb, 200 bytes, Stack size 32 bytes, stm32l4xx_hal_uart.o(i.HAL_UART_Transmit)) +

    [Stack]

    • Max Depth = 56
    • Call Chain = HAL_UART_Transmit ⇒ UART_WaitOnFlagUntilTimeout +
    +
    [Calls]
    • >>   HAL_GetTick +
    • >>   UART_WaitOnFlagUntilTimeout +
    +
    [Called By]
    • >>   fputc +
    + +

    HAL_UART_TxCpltCallback (Thumb, 2 bytes, Stack size 0 bytes, stm32l4xx_hal_uart.o(i.HAL_UART_TxCpltCallback)) +

    [Called By]

    • >>   UART_EndTransmit_IT +
    + +

    HardFault_Handler (Thumb, 4 bytes, Stack size 0 bytes, stm32l4xx_it.o(i.HardFault_Handler)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    IIC_Start (Thumb, 48 bytes, Stack size 8 bytes, oled.o(i.IIC_Start)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = IIC_Start +
    +
    [Calls]
    • >>   HAL_GPIO_WritePin +
    +
    [Called By]
    • >>   Write_IIC_Data +
    • >>   Write_IIC_Command +
    + +

    IIC_Stop (Thumb, 36 bytes, Stack size 8 bytes, oled.o(i.IIC_Stop)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = IIC_Stop +
    +
    [Calls]
    • >>   HAL_GPIO_WritePin +
    +
    [Called By]
    • >>   Write_IIC_Data +
    • >>   Write_IIC_Command +
    + +

    IIC_Wait_Ack (Thumb, 28 bytes, Stack size 8 bytes, oled.o(i.IIC_Wait_Ack)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = IIC_Wait_Ack +
    +
    [Calls]
    • >>   HAL_GPIO_WritePin +
    +
    [Called By]
    • >>   Write_IIC_Data +
    • >>   Write_IIC_Command +
    + +

    LPUART1_IRQHandler (Thumb, 10 bytes, Stack size 8 bytes, stm32l4xx_it.o(i.LPUART1_IRQHandler)) +

    [Stack]

    • Max Depth = 48
    • Call Chain = LPUART1_IRQHandler ⇒ HAL_UART_IRQHandler ⇒ HAL_DMA_Abort_IT +
    +
    [Calls]
    • >>   HAL_UART_IRQHandler +
    +
    [Address Reference Count : 1]
    • startup_stm32l431xx.o(RESET) +
    +

    MX_GPIO_Init (Thumb, 316 bytes, Stack size 32 bytes, gpio.o(i.MX_GPIO_Init)) +

    [Stack]

    • Max Depth = 80
    • Call Chain = MX_GPIO_Init ⇒ HAL_NVIC_SetPriority ⇒ __NVIC_SetPriority +
    +
    [Calls]
    • >>   HAL_NVIC_SetPriority +
    • >>   HAL_NVIC_EnableIRQ +
    • >>   HAL_GPIO_WritePin +
    • >>   HAL_GPIO_Init +
    • >>   __aeabi_memclr4 +
    +
    [Called By]
    • >>   board_init +
    + +

    MX_QUADSPI_Init (Thumb, 52 bytes, Stack size 8 bytes, quadspi.o(i.MX_QUADSPI_Init)) +

    [Stack]

    • Max Depth = 84
    • Call Chain = MX_QUADSPI_Init ⇒ HAL_QSPI_Init ⇒ HAL_QSPI_MspInit ⇒ HAL_GPIO_Init +
    +
    [Calls]
    • >>   HAL_QSPI_Init +
    +
    [Called By]
    • >>   task +
    + +

    MX_USART2_UART_Init (Thumb, 56 bytes, Stack size 8 bytes, usart.o(i.MX_USART2_UART_Init)) +

    [Stack]

    • Max Depth = 96
    • Call Chain = MX_USART2_UART_Init ⇒ HAL_UART_Init ⇒ HAL_UART_MspInit ⇒ HAL_NVIC_SetPriority ⇒ __NVIC_SetPriority +
    +
    [Calls]
    • >>   HAL_UART_Init +
    • >>   Error_Handler +
    +
    [Called By]
    • >>   board_init +
    + +

    MX_USART3_UART_Init (Thumb, 56 bytes, Stack size 8 bytes, usart.o(i.MX_USART3_UART_Init)) +

    [Stack]

    • Max Depth = 96
    • Call Chain = MX_USART3_UART_Init ⇒ HAL_UART_Init ⇒ HAL_UART_MspInit ⇒ HAL_NVIC_SetPriority ⇒ __NVIC_SetPriority +
    +
    [Calls]
    • >>   HAL_UART_Init +
    • >>   Error_Handler +
    +
    [Called By]
    • >>   board_init +
    + +

    MemManage_Handler (Thumb, 4 bytes, Stack size 0 bytes, stm32l4xx_it.o(i.MemManage_Handler)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    NMI_Handler (Thumb, 2 bytes, Stack size 0 bytes, stm32l4xx_it.o(i.NMI_Handler)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    OLED_Clear (Thumb, 62 bytes, Stack size 16 bytes, oled.o(i.OLED_Clear)) +

    [Stack]

    • Max Depth = 64
    • Call Chain = OLED_Clear ⇒ OLED_WR_Byte ⇒ Write_IIC_Data ⇒ Write_IIC_Byte +
    +
    [Calls]
    • >>   OLED_WR_Byte +
    +
    [Called By]
    • >>   OLED_Init +
    • >>   board_init +
    + +

    OLED_Init (Thumb, 198 bytes, Stack size 8 bytes, oled.o(i.OLED_Init)) +

    [Stack]

    • Max Depth = 72
    • Call Chain = OLED_Init ⇒ OLED_Clear ⇒ OLED_WR_Byte ⇒ Write_IIC_Data ⇒ Write_IIC_Byte +
    +
    [Calls]
    • >>   OLED_Clear +
    • >>   HAL_Delay +
    • >>   OLED_WR_Byte +
    +
    [Called By]
    • >>   board_init +
    + +

    OLED_Set_Pos (Thumb, 40 bytes, Stack size 16 bytes, oled.o(i.OLED_Set_Pos)) +

    [Stack]

    • Max Depth = 64
    • Call Chain = OLED_Set_Pos ⇒ OLED_WR_Byte ⇒ Write_IIC_Data ⇒ Write_IIC_Byte +
    +
    [Calls]
    • >>   OLED_WR_Byte +
    +
    [Called By]
    • >>   OLED_ShowChinese +
    • >>   OLED_ShowChar +
    + +

    OLED_ShowChar (Thumb, 154 bytes, Stack size 32 bytes, oled.o(i.OLED_ShowChar)) +

    [Stack]

    • Max Depth = 96
    • Call Chain = OLED_ShowChar ⇒ OLED_Set_Pos ⇒ OLED_WR_Byte ⇒ Write_IIC_Data ⇒ Write_IIC_Byte +
    +
    [Calls]
    • >>   OLED_WR_Byte +
    • >>   OLED_Set_Pos +
    +
    [Called By]
    • >>   OLED_ShowString +
    + +

    OLED_ShowChinese (Thumb, 98 bytes, Stack size 24 bytes, oled.o(i.OLED_ShowChinese)) +

    [Stack]

    • Max Depth = 88
    • Call Chain = OLED_ShowChinese ⇒ OLED_Set_Pos ⇒ OLED_WR_Byte ⇒ Write_IIC_Data ⇒ Write_IIC_Byte +
    +
    [Calls]
    • >>   OLED_WR_Byte +
    • >>   OLED_Set_Pos +
    +
    [Called By]
    • >>   board_init +
    + +

    OLED_ShowString (Thumb, 58 bytes, Stack size 24 bytes, oled.o(i.OLED_ShowString)) +

    [Stack]

    • Max Depth = 120
    • Call Chain = OLED_ShowString ⇒ OLED_ShowChar ⇒ OLED_Set_Pos ⇒ OLED_WR_Byte ⇒ Write_IIC_Data ⇒ Write_IIC_Byte +
    +
    [Calls]
    • >>   OLED_ShowChar +
    +
    [Called By]
    • >>   board_init +
    + +

    OLED_WR_Byte (Thumb, 24 bytes, Stack size 16 bytes, oled.o(i.OLED_WR_Byte)) +

    [Stack]

    • Max Depth = 48
    • Call Chain = OLED_WR_Byte ⇒ Write_IIC_Data ⇒ Write_IIC_Byte +
    +
    [Calls]
    • >>   Write_IIC_Data +
    • >>   Write_IIC_Command +
    +
    [Called By]
    • >>   OLED_ShowChinese +
    • >>   OLED_Init +
    • >>   OLED_Clear +
    • >>   OLED_ShowChar +
    • >>   OLED_Set_Pos +
    + +

    QSPI_Receive (Thumb, 36 bytes, Stack size 16 bytes, hal_qspi_flash_1.o(i.QSPI_Receive)) +

    [Stack]

    • Max Depth = 80
    • Call Chain = QSPI_Receive ⇒ HAL_QSPI_Receive ⇒ QSPI_WaitFlagStateUntilTimeout +
    +
    [Calls]
    • >>   HAL_QSPI_Receive +
    +
    [Called By]
    • >>   hal_spi_flash_read +
    • >>   prv_spi_flash_wait_write_end +
    + +

    QSPI_Send_CMD (Thumb, 70 bytes, Stack size 88 bytes, hal_qspi_flash_1.o(i.QSPI_Send_CMD)) +

    [Stack]

    • Max Depth = 144
    • Call Chain = QSPI_Send_CMD ⇒ HAL_QSPI_Command ⇒ QSPI_WaitFlagStateUntilTimeout +
    +
    [Calls]
    • >>   HAL_QSPI_Command +
    +
    [Called By]
    • >>   prv_spi_flash_erase_sector +
    • >>   hal_spi_flash_read +
    • >>   prv_spi_flash_write_page +
    • >>   prv_spi_flash_write_enable +
    • >>   prv_spi_flash_wait_write_end +
    + +

    QSPI_Transmit (Thumb, 36 bytes, Stack size 16 bytes, hal_qspi_flash_1.o(i.QSPI_Transmit)) +

    [Stack]

    • Max Depth = 72
    • Call Chain = QSPI_Transmit ⇒ HAL_QSPI_Transmit ⇒ QSPI_WaitFlagStateUntilTimeout +
    +
    [Calls]
    • >>   HAL_QSPI_Transmit +
    +
    [Called By]
    • >>   prv_spi_flash_write_page +
    + +

    SVC_Handler (Thumb, 2 bytes, Stack size 0 bytes, stm32l4xx_it.o(i.SVC_Handler)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    SysTick_Handler (Thumb, 26 bytes, Stack size 8 bytes, stm32l4xx_it.o(i.SysTick_Handler)) +

    [Stack]

    • Max Depth = 104 + Unknown Stack Size +
    • Call Chain = SysTick_Handler ⇒ tos_tick_handler ⇒ tick_update ⇒ pend_task_wakeup ⇒ readyqueue_add ⇒ readyqueue_add_tail ⇒ tos_list_add_tail +
    +
    [Calls]
    • >>   tos_tick_handler +
    • >>   tos_knl_is_running +
    • >>   tos_knl_irq_leave +
    • >>   tos_knl_irq_enter +
    • >>   HAL_IncTick +
    +
    [Address Reference Count : 1]
    • startup_stm32l431xx.o(RESET) +
    +

    SystemClock_Config (Thumb, 214 bytes, Stack size 184 bytes, mcu_init.o(i.SystemClock_Config)) +

    [Stack]

    • Max Depth = 280
    • Call Chain = SystemClock_Config ⇒ HAL_RCC_OscConfig ⇒ HAL_InitTick ⇒ HAL_NVIC_SetPriority ⇒ __NVIC_SetPriority +
    +
    [Calls]
    • >>   HAL_RCC_OscConfig +
    • >>   HAL_RCC_ClockConfig +
    • >>   HAL_RCCEx_PeriphCLKConfig +
    • >>   HAL_RCCEx_EnableMSIPLLMode +
    • >>   HAL_PWR_EnableBkUpAccess +
    • >>   HAL_PWREx_ControlVoltageScaling +
    • >>   Error_Handler +
    • >>   __aeabi_memclr4 +
    +
    [Called By]
    • >>   board_init +
    + +

    SystemInit (Thumb, 68 bytes, Stack size 0 bytes, system_stm32l4xx.o(i.SystemInit)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(.text) +
    +

    UART_AdvFeatureConfig (Thumb, 248 bytes, Stack size 0 bytes, stm32l4xx_hal_uart.o(i.UART_AdvFeatureConfig)) +

    [Called By]

    • >>   HAL_UART_Init +
    + +

    UART_CheckIdleState (Thumb, 116 bytes, Stack size 16 bytes, stm32l4xx_hal_uart.o(i.UART_CheckIdleState)) +

    [Stack]

    • Max Depth = 40
    • Call Chain = UART_CheckIdleState ⇒ UART_WaitOnFlagUntilTimeout +
    +
    [Calls]
    • >>   HAL_GetTick +
    • >>   UART_WaitOnFlagUntilTimeout +
    +
    [Called By]
    • >>   HAL_UART_Init +
    + +

    UART_SetConfig (Thumb, 1000 bytes, Stack size 40 bytes, stm32l4xx_hal_uart.o(i.UART_SetConfig)) +

    [Stack]

    • Max Depth = 80
    • Call Chain = UART_SetConfig ⇒ __aeabi_uldivmod +
    +
    [Calls]
    • >>   HAL_RCC_GetSysClockFreq +
    • >>   HAL_RCC_GetPCLK2Freq +
    • >>   HAL_RCC_GetPCLK1Freq +
    • >>   __aeabi_uldivmod +
    +
    [Called By]
    • >>   HAL_UART_Init +
    + +

    UART_WaitOnFlagUntilTimeout (Thumb, 108 bytes, Stack size 24 bytes, stm32l4xx_hal_uart.o(i.UART_WaitOnFlagUntilTimeout)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = UART_WaitOnFlagUntilTimeout +
    +
    [Calls]
    • >>   HAL_GetTick +
    +
    [Called By]
    • >>   HAL_UART_Transmit +
    • >>   UART_CheckIdleState +
    + +

    USART2_IRQHandler (Thumb, 10 bytes, Stack size 8 bytes, stm32l4xx_it.o(i.USART2_IRQHandler)) +

    [Stack]

    • Max Depth = 48
    • Call Chain = USART2_IRQHandler ⇒ HAL_UART_IRQHandler ⇒ HAL_DMA_Abort_IT +
    +
    [Calls]
    • >>   HAL_UART_IRQHandler +
    +
    [Address Reference Count : 1]
    • startup_stm32l431xx.o(RESET) +
    +

    USART3_IRQHandler (Thumb, 10 bytes, Stack size 8 bytes, stm32l4xx_it.o(i.USART3_IRQHandler)) +

    [Stack]

    • Max Depth = 48
    • Call Chain = USART3_IRQHandler ⇒ HAL_UART_IRQHandler ⇒ HAL_DMA_Abort_IT +
    +
    [Calls]
    • >>   HAL_UART_IRQHandler +
    +
    [Address Reference Count : 1]
    • startup_stm32l431xx.o(RESET) +
    +

    UsageFault_Handler (Thumb, 4 bytes, Stack size 0 bytes, stm32l4xx_it.o(i.UsageFault_Handler)) +
    [Address Reference Count : 1]

    • startup_stm32l431xx.o(RESET) +
    +

    Write_IIC_Byte (Thumb, 96 bytes, Stack size 24 bytes, oled.o(i.Write_IIC_Byte)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = Write_IIC_Byte +
    +
    [Calls]
    • >>   HAL_GPIO_WritePin +
    +
    [Called By]
    • >>   Write_IIC_Data +
    • >>   Write_IIC_Command +
    + +

    Write_IIC_Command (Thumb, 44 bytes, Stack size 8 bytes, oled.o(i.Write_IIC_Command)) +

    [Stack]

    • Max Depth = 32
    • Call Chain = Write_IIC_Command ⇒ Write_IIC_Byte +
    +
    [Calls]
    • >>   Write_IIC_Byte +
    • >>   IIC_Wait_Ack +
    • >>   IIC_Stop +
    • >>   IIC_Start +
    +
    [Called By]
    • >>   OLED_WR_Byte +
    + +

    Write_IIC_Data (Thumb, 44 bytes, Stack size 8 bytes, oled.o(i.Write_IIC_Data)) +

    [Stack]

    • Max Depth = 32
    • Call Chain = Write_IIC_Data ⇒ Write_IIC_Byte +
    +
    [Calls]
    • >>   Write_IIC_Byte +
    • >>   IIC_Wait_Ack +
    • >>   IIC_Stop +
    • >>   IIC_Start +
    +
    [Called By]
    • >>   OLED_WR_Byte +
    + +

    __0printf$5 (Thumb, 22 bytes, Stack size 24 bytes, printf5.o(i.__0printf$5), UNUSED) +

    [Calls]

    • >>   _printf_core +
    + +

    __1printf$5 (Thumb, 0 bytes, Stack size 24 bytes, printf5.o(i.__0printf$5), UNUSED) + +

    __2printf (Thumb, 0 bytes, Stack size 24 bytes, printf5.o(i.__0printf$5)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = __2printf +
    +
    [Called By]
    • >>   main +
    • >>   tos_kv_walkthru +
    • >>   tos_kv_init +
    • >>   task +
    • >>   disp_value +
    • >>   kv_u8_disp +
    • >>   kv_block_walkthru +
    + +

    __scatterload_copy (Thumb, 14 bytes, Stack size unknown bytes, handlers.o(i.__scatterload_copy), UNUSED) + +

    __scatterload_null (Thumb, 2 bytes, Stack size unknown bytes, handlers.o(i.__scatterload_null), UNUSED) + +

    __scatterload_zeroinit (Thumb, 14 bytes, Stack size unknown bytes, handlers.o(i.__scatterload_zeroinit), UNUSED) + +

    application_entry (Thumb, 14 bytes, Stack size 8 bytes, kv_sample.o(i.application_entry)) +

    [Stack]

    • Max Depth = 120 + Unknown Stack Size +
    • Call Chain = application_entry ⇒ osThreadCreate ⇒ tos_task_create ⇒ readyqueue_add_tail ⇒ tos_list_add_tail +
    +
    [Calls]
    • >>   osThreadCreate +
    +
    [Address Reference Count : 1]
    • main.o(.constdata) +
    +

    board_init (Thumb, 110 bytes, Stack size 8 bytes, mcu_init.o(i.board_init)) +

    [Stack]

    • Max Depth = 288
    • Call Chain = board_init ⇒ SystemClock_Config ⇒ HAL_RCC_OscConfig ⇒ HAL_InitTick ⇒ HAL_NVIC_SetPriority ⇒ __NVIC_SetPriority +
    +
    [Calls]
    • >>   OLED_ShowString +
    • >>   OLED_ShowChinese +
    • >>   OLED_Init +
    • >>   OLED_Clear +
    • >>   MX_USART3_UART_Init +
    • >>   MX_USART2_UART_Init +
    • >>   HAL_Init +
    • >>   DHT11_Init +
    • >>   SystemClock_Config +
    • >>   MX_GPIO_Init +
    +
    [Called By]
    • >>   main +
    + +

    cpu_context_switch (Thumb, 8 bytes, Stack size 8 bytes, tos_cpu.o(i.cpu_context_switch)) +

    [Stack]

    • Max Depth = 8 + Unknown Stack Size +
    • Call Chain = cpu_context_switch +
    +
    [Calls]
    • >>   port_context_switch +
    +
    [Called By]
    • >>   knl_sched +
    + +

    cpu_init (Thumb, 30 bytes, Stack size 8 bytes, tos_cpu.o(i.cpu_init)) +

    [Stack]

    • Max Depth = 48
    • Call Chain = cpu_init ⇒ __aeabi_uldivmod +
    +
    [Calls]
    • >>   cpu_systick_init +
    • >>   __aeabi_uldivmod +
    +
    [Called By]
    • >>   tos_knl_init +
    + +

    cpu_irq_context_switch (Thumb, 8 bytes, Stack size 8 bytes, tos_cpu.o(i.cpu_irq_context_switch)) +

    [Stack]

    • Max Depth = 8 + Unknown Stack Size +
    • Call Chain = cpu_irq_context_switch +
    +
    [Calls]
    • >>   port_irq_context_switch +
    +
    [Called By]
    • >>   tos_knl_irq_leave +
    + +

    cpu_sched_start (Thumb, 4 bytes, Stack size 0 bytes, tos_cpu.o(i.cpu_sched_start)) +

    [Calls]

    • >>   port_sched_start +
    +
    [Called By]
    • >>   tos_knl_start +
    + +

    cpu_systick_init (Thumb, 18 bytes, Stack size 8 bytes, tos_cpu.o(i.cpu_systick_init)) +

    [Stack]

    • Max Depth = 32
    • Call Chain = cpu_systick_init ⇒ port_systick_config ⇒ __NVIC_SetPriority +
    +
    [Calls]
    • >>   port_systick_priority_set +
    • >>   port_systick_config +
    +
    [Called By]
    • >>   cpu_init +
    + +

    cpu_task_stk_init (Thumb, 216 bytes, Stack size 20 bytes, tos_cpu.o(i.cpu_task_stk_init)) +

    [Stack]

    • Max Depth = 20
    • Call Chain = cpu_task_stk_init +
    +
    [Called By]
    • >>   tos_task_create +
    + +

    disp_value (Thumb, 48 bytes, Stack size 16 bytes, kv_sample.o(i.disp_value)) +

    [Stack]

    • Max Depth = 40
    • Call Chain = disp_value ⇒ __2printf +
    +
    [Calls]
    • >>   __2printf +
    +
    [Called By]
    • >>   task +
    + +

    fputc (Thumb, 42 bytes, Stack size 16 bytes, mcu_init.o(i.fputc)) +

    [Stack]

    • Max Depth = 72
    • Call Chain = fputc ⇒ HAL_UART_Transmit ⇒ UART_WaitOnFlagUntilTimeout +
    +
    [Calls]
    • >>   HAL_UART_Transmit +
    +
    [Address Reference Count : 1]
    • printf5.o(i.__0printf$5) +
    +

    hal_spi_flash_erase (Thumb, 80 bytes, Stack size 24 bytes, hal_qspi_flash_1.o(i.hal_spi_flash_erase)) +

    [Stack]

    • Max Depth = 216
    • Call Chain = hal_spi_flash_erase ⇒ prv_spi_flash_erase_sector ⇒ prv_spi_flash_wait_write_end ⇒ QSPI_Send_CMD ⇒ HAL_QSPI_Command ⇒ QSPI_WaitFlagStateUntilTimeout +
    +
    [Calls]
    • >>   prv_spi_flash_erase_sector +
    +
    [Called By]
    • >>   stm32l4_qspiflash_erase +
    + +

    hal_spi_flash_read (Thumb, 84 bytes, Stack size 40 bytes, hal_qspi_flash_1.o(i.hal_spi_flash_read)) +

    [Stack]

    • Max Depth = 184
    • Call Chain = hal_spi_flash_read ⇒ QSPI_Send_CMD ⇒ HAL_QSPI_Command ⇒ QSPI_WaitFlagStateUntilTimeout +
    +
    [Calls]
    • >>   QSPI_Send_CMD +
    • >>   QSPI_Receive +
    +
    [Called By]
    • >>   stm32l4_qspiflash_read +
    + +

    hal_spi_flash_write (Thumb, 466 bytes, Stack size 64 bytes, hal_qspi_flash_1.o(i.hal_spi_flash_write)) +

    [Stack]

    • Max Depth = 264
    • Call Chain = hal_spi_flash_write ⇒ prv_spi_flash_write_page ⇒ prv_spi_flash_wait_write_end ⇒ QSPI_Send_CMD ⇒ HAL_QSPI_Command ⇒ QSPI_WaitFlagStateUntilTimeout +
    +
    [Calls]
    • >>   prv_spi_flash_write_page +
    +
    [Called By]
    • >>   stm32l4_qspiflash_write +
    + +

    knl_idle_init (Thumb, 38 bytes, Stack size 24 bytes, tos_sys.o(i.knl_idle_init)) +

    [Stack]

    • Max Depth = 96 + Unknown Stack Size +
    • Call Chain = knl_idle_init ⇒ tos_task_create ⇒ readyqueue_add_tail ⇒ tos_list_add_tail +
    +
    [Calls]
    • >>   tos_task_create +
    +
    [Called By]
    • >>   tos_knl_init +
    + +

    knl_is_idle (Thumb, 16 bytes, Stack size 0 bytes, tos_sys.o(i.knl_is_idle)) +

    [Called By]

    • >>   task_do_destroy +
    • >>   tos_task_create +
    + +

    knl_is_inirq (Thumb, 14 bytes, Stack size 0 bytes, tos_sys.o(i.knl_is_inirq)) +

    [Called By]

    • >>   tos_knl_irq_leave +
    • >>   knl_sched +
    • >>   tos_task_prio_change +
    • >>   tos_mutex_post +
    • >>   tos_mutex_pend_timed +
    • >>   tos_mutex_create +
    • >>   tos_task_destroy +
    • >>   tos_task_create +
    • >>   tos_knl_sched_unlock +
    • >>   tos_knl_sched_lock +
    + +

    knl_is_sched_locked (Thumb, 14 bytes, Stack size 0 bytes, tos_sys.o(i.knl_is_sched_locked)) +

    [Called By]

    • >>   tos_knl_irq_leave +
    • >>   knl_sched +
    • >>   tos_mutex_pend_timed +
    • >>   tos_task_destroy +
    • >>   tos_knl_sched_unlock +
    + +

    knl_is_self (Thumb, 18 bytes, Stack size 0 bytes, tos_sys.o(i.knl_is_self)) +

    [Called By]

    • >>   tos_knl_irq_leave +
    • >>   knl_sched +
    • >>   tos_task_prio_change +
    • >>   tos_mutex_post +
    • >>   tos_mutex_pend_timed +
    • >>   tos_task_destroy +
    + +

    knl_sched (Thumb, 94 bytes, Stack size 8 bytes, tos_sys.o(i.knl_sched)) +

    [Stack]

    • Max Depth = 16 + Unknown Stack Size +
    • Call Chain = knl_sched ⇒ tos_cpu_cpsr_save +
    +
    [Calls]
    • >>   tos_knl_is_running +
    • >>   knl_is_sched_locked +
    • >>   knl_is_inirq +
    • >>   tos_cpu_cpsr_save +
    • >>   tos_cpu_cpsr_restore +
    • >>   knl_is_self +
    • >>   cpu_context_switch +
    • >>   readyqueue_highest_ready_task_get +
    +
    [Called By]
    • >>   tos_task_prio_change +
    • >>   tos_mutex_post +
    • >>   tos_mutex_pend_timed +
    • >>   task_do_destroy +
    • >>   tos_task_create +
    • >>   tos_knl_sched_unlock +
    + +

    main (Thumb, 32 bytes, Stack size 8 bytes, main.o(i.main)) +

    [Stack]

    • Max Depth = 296 + Unknown Stack Size +
    • Call Chain = main ⇒ board_init ⇒ SystemClock_Config ⇒ HAL_RCC_OscConfig ⇒ HAL_InitTick ⇒ HAL_NVIC_SetPriority ⇒ __NVIC_SetPriority +
    +
    [Calls]
    • >>   osThreadCreate +
    • >>   osKernelStart +
    • >>   osKernelInitialize +
    • >>   board_init +
    • >>   __2printf +
    +
    [Address Reference Count : 1]
    • entry9a.o(.ARM.Collect$$$$0000000B) +
    +

    mmheap_init_with_pool (Thumb, 20 bytes, Stack size 16 bytes, tos_mmheap.o(i.mmheap_init_with_pool)) +

    [Stack]

    • Max Depth = 112 + Unknown Stack Size +
    • Call Chain = mmheap_init_with_pool ⇒ tos_mmheap_pool_add ⇒ blk_insert ⇒ mapping_insert ⇒ __fls ⇒ generic_fls ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   tos_mmheap_pool_add +
    • >>   mmheap_ctl_init +
    +
    [Called By]
    • >>   tos_knl_init +
    + +

    mutex_release (Thumb, 20 bytes, Stack size 8 bytes, tos_mutex.o(i.mutex_release)) +

    [Stack]

    • Max Depth = 88 + Unknown Stack Size +
    • Call Chain = mutex_release ⇒ pend_wakeup_all ⇒ pend_task_wakeup ⇒ readyqueue_add ⇒ readyqueue_add_tail ⇒ tos_list_add_tail +
    +
    [Calls]
    • >>   pend_wakeup_all +
    • >>   mutex_old_owner_release +
    +
    [Called By]
    • >>   task_mutex_release +
    + +

    osKernelInitialize (Thumb, 14 bytes, Stack size 8 bytes, cmsis_os.o(i.osKernelInitialize)) +

    [Stack]

    • Max Depth = 128 + Unknown Stack Size +
    • Call Chain = osKernelInitialize ⇒ tos_knl_init ⇒ mmheap_init_with_pool ⇒ tos_mmheap_pool_add ⇒ blk_insert ⇒ mapping_insert ⇒ __fls ⇒ generic_fls ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   tos_knl_init +
    • >>   errno_knl2cmsis +
    +
    [Called By]
    • >>   main +
    + +

    osKernelStart (Thumb, 14 bytes, Stack size 8 bytes, cmsis_os.o(i.osKernelStart)) +

    [Stack]

    • Max Depth = 16 + Unknown Stack Size +
    • Call Chain = osKernelStart ⇒ tos_knl_start +
    +
    [Calls]
    • >>   tos_knl_start +
    • >>   errno_knl2cmsis +
    +
    [Called By]
    • >>   main +
    + +

    osThreadCreate (Thumb, 66 bytes, Stack size 40 bytes, cmsis_os.o(i.osThreadCreate)) +

    [Stack]

    • Max Depth = 112 + Unknown Stack Size +
    • Call Chain = osThreadCreate ⇒ tos_task_create ⇒ readyqueue_add_tail ⇒ tos_list_add_tail +
    +
    [Calls]
    • >>   tos_task_create +
    • >>   priority_cmsis2knl +
    +
    [Called By]
    • >>   main +
    • >>   application_entry +
    + +

    pend_highest_pending_prio_get (Thumb, 32 bytes, Stack size 16 bytes, tos_pend.o(i.pend_highest_pending_prio_get)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = pend_highest_pending_prio_get +
    +
    [Calls]
    • >>   tos_list_empty +
    +
    [Called By]
    • >>   tos_mutex_post +
    • >>   task_highest_pending_prio_get +
    + +

    pend_highest_pending_task_get (Thumb, 8 bytes, Stack size 0 bytes, tos_pend.o(i.pend_highest_pending_task_get)) +

    [Called By]

    • >>   tos_mutex_post +
    + +

    pend_is_nopending (Thumb, 12 bytes, Stack size 8 bytes, tos_pend.o(i.pend_is_nopending)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = pend_is_nopending +
    +
    [Calls]
    • >>   tos_list_empty +
    +
    [Called By]
    • >>   tos_mutex_post +
    + +

    pend_list_adjust (Thumb, 22 bytes, Stack size 8 bytes, tos_pend.o(i.pend_list_adjust)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = pend_list_adjust ⇒ pend_list_add +
    +
    [Calls]
    • >>   tos_list_del +
    • >>   pend_list_add +
    +
    [Called By]
    • >>   tos_task_prio_change +
    + +

    pend_list_remove (Thumb, 30 bytes, Stack size 8 bytes, tos_pend.o(i.pend_list_remove)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = pend_list_remove +
    +
    [Calls]
    • >>   tos_list_del +
    +
    [Called By]
    • >>   pend_task_wakeup +
    • >>   task_do_destroy +
    + +

    pend_object_init (Thumb, 12 bytes, Stack size 8 bytes, tos_pend.o(i.pend_object_init)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = pend_object_init +
    +
    [Calls]
    • >>   tos_list_init +
    +
    [Called By]
    • >>   tos_mutex_create +
    + +

    pend_state2errno (Thumb, 46 bytes, Stack size 0 bytes, tos_pend.o(i.pend_state2errno)) +

    [Called By]

    • >>   tos_mutex_pend_timed +
    + +

    pend_task_block (Thumb, 60 bytes, Stack size 24 bytes, tos_pend.o(i.pend_task_block)) +

    [Stack]

    • Max Depth = 104 + Unknown Stack Size +
    • Call Chain = pend_task_block ⇒ tick_list_add ⇒ tick_task_place ⇒ tos_cpu_cpsr_save +
    +
    [Calls]
    • >>   tick_list_add +
    • >>   readyqueue_remove +
    • >>   pend_list_add +
    +
    [Called By]
    • >>   tos_mutex_pend_timed +
    + +

    pend_task_wakeup (Thumb, 64 bytes, Stack size 16 bytes, tos_pend.o(i.pend_task_wakeup)) +

    [Stack]

    • Max Depth = 56 + Unknown Stack Size +
    • Call Chain = pend_task_wakeup ⇒ readyqueue_add ⇒ readyqueue_add_tail ⇒ tos_list_add_tail +
    +
    [Calls]
    • >>   tick_list_remove +
    • >>   readyqueue_add +
    • >>   pend_list_remove +
    +
    [Called By]
    • >>   pend_wakeup_all +
    • >>   pend_wakeup_one +
    • >>   tick_update +
    + +

    pend_wakeup_all (Thumb, 36 bytes, Stack size 24 bytes, tos_pend.o(i.pend_wakeup_all)) +

    [Stack]

    • Max Depth = 80 + Unknown Stack Size +
    • Call Chain = pend_wakeup_all ⇒ pend_task_wakeup ⇒ readyqueue_add ⇒ readyqueue_add_tail ⇒ tos_list_add_tail +
    +
    [Calls]
    • >>   pend_task_wakeup +
    +
    [Called By]
    • >>   mutex_release +
    + +

    pend_wakeup_one (Thumb, 20 bytes, Stack size 16 bytes, tos_pend.o(i.pend_wakeup_one)) +

    [Stack]

    • Max Depth = 72 + Unknown Stack Size +
    • Call Chain = pend_wakeup_one ⇒ pend_task_wakeup ⇒ readyqueue_add ⇒ readyqueue_add_tail ⇒ tos_list_add_tail +
    +
    [Calls]
    • >>   pend_task_wakeup +
    +
    [Called By]
    • >>   tos_mutex_post +
    + +

    port_systick_config (Thumb, 50 bytes, Stack size 16 bytes, port_c.o(i.port_systick_config)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = port_systick_config ⇒ __NVIC_SetPriority +
    +
    [Calls]
    • >>   __NVIC_SetPriority +
    +
    [Called By]
    • >>   cpu_systick_init +
    + +

    port_systick_priority_set (Thumb, 16 bytes, Stack size 8 bytes, port_c.o(i.port_systick_priority_set)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = port_systick_priority_set ⇒ __NVIC_SetPriority +
    +
    [Calls]
    • >>   __NVIC_SetPriority +
    +
    [Called By]
    • >>   cpu_systick_init +
    + +

    prv_spi_flash_erase_sector (Thumb, 50 bytes, Stack size 24 bytes, hal_qspi_flash_1.o(i.prv_spi_flash_erase_sector)) +

    [Stack]

    • Max Depth = 192
    • Call Chain = prv_spi_flash_erase_sector ⇒ prv_spi_flash_wait_write_end ⇒ QSPI_Send_CMD ⇒ HAL_QSPI_Command ⇒ QSPI_WaitFlagStateUntilTimeout +
    +
    [Calls]
    • >>   QSPI_Send_CMD +
    • >>   prv_spi_flash_write_enable +
    • >>   prv_spi_flash_wait_write_end +
    +
    [Called By]
    • >>   hal_spi_flash_erase +
    + +

    readyqueue_add (Thumb, 32 bytes, Stack size 8 bytes, tos_sched.o(i.readyqueue_add)) +

    [Stack]

    • Max Depth = 40
    • Call Chain = readyqueue_add ⇒ readyqueue_add_tail ⇒ tos_list_add_tail +
    +
    [Calls]
    • >>   readyqueue_add_tail +
    • >>   readyqueue_add_head +
    +
    [Called By]
    • >>   pend_task_wakeup +
    + +

    readyqueue_add_head (Thumb, 48 bytes, Stack size 24 bytes, tos_sched.o(i.readyqueue_add_head)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = readyqueue_add_head +
    +
    [Calls]
    • >>   tos_list_empty +
    • >>   readyqueue_prio_mark +
    • >>   _list_add +
    +
    [Called By]
    • >>   readyqueue_add +
    • >>   tos_task_prio_change +
    + +

    readyqueue_add_tail (Thumb, 38 bytes, Stack size 16 bytes, tos_sched.o(i.readyqueue_add_tail)) +

    [Stack]

    • Max Depth = 32
    • Call Chain = readyqueue_add_tail ⇒ tos_list_add_tail +
    +
    [Calls]
    • >>   tos_list_empty +
    • >>   tos_list_add_tail +
    • >>   readyqueue_prio_mark +
    +
    [Called By]
    • >>   readyqueue_add +
    • >>   tos_task_prio_change +
    • >>   tos_task_create +
    + +

    readyqueue_highest_ready_task_get (Thumb, 18 bytes, Stack size 0 bytes, tos_sched.o(i.readyqueue_highest_ready_task_get)) +

    [Called By]

    • >>   tos_knl_irq_leave +
    • >>   knl_sched +
    • >>   tos_knl_start +
    + +

    readyqueue_init (Thumb, 60 bytes, Stack size 0 bytes, tos_sched.o(i.readyqueue_init)) +

    [Called By]

    • >>   tos_knl_init +
    + +

    readyqueue_remove (Thumb, 94 bytes, Stack size 16 bytes, tos_sched.o(i.readyqueue_remove)) +

    [Stack]

    • Max Depth = 40 + Unknown Stack Size +
    • Call Chain = readyqueue_remove ⇒ readyqueue_prio_highest_get ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   tos_list_empty +
    • >>   readyqueue_prio_highest_get +
    • >>   _list_del +
    +
    [Called By]
    • >>   pend_task_block +
    • >>   tos_task_prio_change +
    • >>   task_do_destroy +
    + +

    stm32l4_qspiflash_erase (Thumb, 16 bytes, Stack size 16 bytes, qspi_flash_kv.o(i.stm32l4_qspiflash_erase)) +

    [Stack]

    • Max Depth = 232
    • Call Chain = stm32l4_qspiflash_erase ⇒ hal_spi_flash_erase ⇒ prv_spi_flash_erase_sector ⇒ prv_spi_flash_wait_write_end ⇒ QSPI_Send_CMD ⇒ HAL_QSPI_Command ⇒ QSPI_WaitFlagStateUntilTimeout +
    +
    [Calls]
    • >>   hal_spi_flash_erase +
    +
    [Address Reference Count : 1]
    • qspi_flash_kv.o(.data) +
    +

    stm32l4_qspiflash_read (Thumb, 20 bytes, Stack size 16 bytes, qspi_flash_kv.o(i.stm32l4_qspiflash_read)) +

    [Stack]

    • Max Depth = 200
    • Call Chain = stm32l4_qspiflash_read ⇒ hal_spi_flash_read ⇒ QSPI_Send_CMD ⇒ HAL_QSPI_Command ⇒ QSPI_WaitFlagStateUntilTimeout +
    +
    [Calls]
    • >>   hal_spi_flash_read +
    +
    [Address Reference Count : 1]
    • qspi_flash_kv.o(.data) +
    +

    stm32l4_qspiflash_write (Thumb, 22 bytes, Stack size 24 bytes, qspi_flash_kv.o(i.stm32l4_qspiflash_write)) +

    [Stack]

    • Max Depth = 288
    • Call Chain = stm32l4_qspiflash_write ⇒ hal_spi_flash_write ⇒ prv_spi_flash_write_page ⇒ prv_spi_flash_wait_write_end ⇒ QSPI_Send_CMD ⇒ HAL_QSPI_Command ⇒ QSPI_WaitFlagStateUntilTimeout +
    +
    [Calls]
    • >>   hal_spi_flash_write +
    +
    [Address Reference Count : 1]
    • qspi_flash_kv.o(.data) +
    +

    task (Thumb, 256 bytes, Stack size 64 bytes, kv_sample.o(i.task)) +

    [Stack]

    • Max Depth = 392 + Unknown Stack Size +
    • Call Chain = task ⇒ tos_kv_set ⇒ kv_item_update ⇒ kv_item_save ⇒ kv_blk_search_suitable ⇒ kv_gc ⇒ kv_mgr_blk_index_rebuild ⇒ kv_mgr_index_build ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   tos_kv_walkthru +
    • >>   tos_kv_set +
    • >>   tos_kv_init +
    • >>   tos_kv_has_key +
    • >>   tos_kv_get +
    • >>   tos_kv_del +
    • >>   disp_value +
    • >>   MX_QUADSPI_Init +
    • >>   __2printf +
    +
    [Address Reference Count : 1]
    • kv_sample.o(.constdata) +
    +

    task_free_all (Thumb, 66 bytes, Stack size 24 bytes, tos_task.o(i.task_free_all)) +

    [Stack]

    • Max Depth = 136 + Unknown Stack Size +
    • Call Chain = task_free_all ⇒ task_free ⇒ tos_mmheap_free ⇒ blk_merge_prev ⇒ blk_remove ⇒ mapping_insert ⇒ __fls ⇒ generic_fls ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   tos_cpu_cpsr_save +
    • >>   tos_cpu_cpsr_restore +
    • >>   tos_list_del +
    • >>   task_free +
    +
    [Called By]
    • >>   knl_idle_entry +
    + +

    tick_list_add (Thumb, 32 bytes, Stack size 16 bytes, tos_tick.o(i.tick_list_add)) +

    [Stack]

    • Max Depth = 80 + Unknown Stack Size +
    • Call Chain = tick_list_add ⇒ tick_task_place ⇒ tos_cpu_cpsr_save +
    +
    [Calls]
    • >>   tick_task_place +
    +
    [Called By]
    • >>   pend_task_block +
    + +

    tick_list_remove (Thumb, 24 bytes, Stack size 8 bytes, tos_tick.o(i.tick_list_remove)) +

    [Stack]

    • Max Depth = 32 + Unknown Stack Size +
    • Call Chain = tick_list_remove ⇒ tick_task_takeoff ⇒ tos_cpu_cpsr_save +
    +
    [Calls]
    • >>   tick_task_takeoff +
    +
    [Called By]
    • >>   pend_task_wakeup +
    • >>   task_do_destroy +
    + +

    tick_update (Thumb, 180 bytes, Stack size 32 bytes, tos_tick.o(i.tick_update)) +

    [Stack]

    • Max Depth = 88 + Unknown Stack Size +
    • Call Chain = tick_update ⇒ pend_task_wakeup ⇒ readyqueue_add ⇒ readyqueue_add_tail ⇒ tos_list_add_tail +
    +
    [Calls]
    • >>   pend_task_wakeup +
    • >>   tos_cpu_cpsr_save +
    • >>   tos_cpu_cpsr_restore +
    • >>   tos_list_empty +
    +
    [Called By]
    • >>   tos_tick_handler +
    + +

    timer_init (Thumb, 4 bytes, Stack size 0 bytes, tos_timer.o(i.timer_init)) +

    [Called By]

    • >>   tos_knl_init +
    + +

    timer_update (Thumb, 118 bytes, Stack size 16 bytes, tos_timer.o(i.timer_update)) +

    [Stack]

    • Max Depth = 48 + Unknown Stack Size +
    • Call Chain = timer_update ⇒ timer_takeoff ⇒ tos_cpu_cpsr_save +
    +
    [Calls]
    • >>   tos_knl_sched_unlock +
    • >>   tos_knl_sched_lock +
    • >>   timer_takeoff +
    • >>   timer_place +
    +
    [Called By]
    • >>   tos_tick_handler +
    + +

    tos_cpu_clz (Thumb, 12 bytes, Stack size 8 bytes, tos_cpu.o(i.tos_cpu_clz)) +

    [Stack]

    • Max Depth = 8 + Unknown Stack Size +
    • Call Chain = tos_cpu_clz +
    +
    [Calls]
    • >>   port_clz +
    +
    [Called By]
    • >>   generic_fls +
    • >>   readyqueue_prio_highest_get +
    + +

    tos_cpu_cpsr_restore (Thumb, 12 bytes, Stack size 8 bytes, tos_cpu.o(i.tos_cpu_cpsr_restore)) +

    [Stack]

    • Max Depth = 8 + Unknown Stack Size +
    • Call Chain = tos_cpu_cpsr_restore +
    +
    [Calls]
    • >>   port_cpsr_restore +
    +
    [Called By]
    • >>   tos_knl_irq_leave +
    • >>   knl_sched +
    • >>   tos_task_prio_change +
    • >>   tos_mutex_post +
    • >>   tos_mutex_pend_timed +
    • >>   tick_task_takeoff +
    • >>   tick_task_place +
    • >>   task_do_destroy +
    • >>   tos_task_create +
    • >>   task_free_all +
    • >>   tos_knl_sched_unlock +
    • >>   tos_knl_sched_lock +
    • >>   timer_takeoff +
    • >>   timer_place +
    • >>   tick_update +
    + +

    tos_cpu_cpsr_save (Thumb, 8 bytes, Stack size 8 bytes, tos_cpu.o(i.tos_cpu_cpsr_save)) +

    [Stack]

    • Max Depth = 8 + Unknown Stack Size +
    • Call Chain = tos_cpu_cpsr_save +
    +
    [Calls]
    • >>   port_cpsr_save +
    +
    [Called By]
    • >>   tos_knl_irq_leave +
    • >>   knl_sched +
    • >>   tos_task_prio_change +
    • >>   tos_mutex_post +
    • >>   tos_mutex_pend_timed +
    • >>   tick_task_takeoff +
    • >>   tick_task_place +
    • >>   task_do_destroy +
    • >>   tos_task_create +
    • >>   task_free_all +
    • >>   tos_knl_sched_unlock +
    • >>   tos_knl_sched_lock +
    • >>   timer_takeoff +
    • >>   timer_place +
    • >>   tick_update +
    + +

    tos_knl_init (Thumb, 56 bytes, Stack size 8 bytes, tos_sys.o(i.tos_knl_init)) +

    [Stack]

    • Max Depth = 120 + Unknown Stack Size +
    • Call Chain = tos_knl_init ⇒ mmheap_init_with_pool ⇒ tos_mmheap_pool_add ⇒ blk_insert ⇒ mapping_insert ⇒ __fls ⇒ generic_fls ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   mmheap_init_with_pool +
    • >>   timer_init +
    • >>   cpu_init +
    • >>   knl_idle_init +
    • >>   readyqueue_init +
    +
    [Called By]
    • >>   osKernelInitialize +
    + +

    tos_knl_irq_enter (Thumb, 42 bytes, Stack size 4 bytes, tos_sys.o(i.tos_knl_irq_enter)) +

    [Stack]

    • Max Depth = 4
    • Call Chain = tos_knl_irq_enter +
    +
    [Calls]
    • >>   tos_knl_is_running +
    +
    [Called By]
    • >>   SysTick_Handler +
    + +

    tos_knl_irq_leave (Thumb, 134 bytes, Stack size 8 bytes, tos_sys.o(i.tos_knl_irq_leave)) +

    [Stack]

    • Max Depth = 16 + Unknown Stack Size +
    • Call Chain = tos_knl_irq_leave ⇒ tos_cpu_cpsr_save +
    +
    [Calls]
    • >>   tos_knl_is_running +
    • >>   knl_is_sched_locked +
    • >>   knl_is_inirq +
    • >>   tos_cpu_cpsr_save +
    • >>   tos_cpu_cpsr_restore +
    • >>   knl_is_self +
    • >>   cpu_irq_context_switch +
    • >>   readyqueue_highest_ready_task_get +
    +
    [Called By]
    • >>   SysTick_Handler +
    + +

    tos_knl_is_running (Thumb, 14 bytes, Stack size 0 bytes, tos_sys.o(i.tos_knl_is_running)) +

    [Called By]

    • >>   tos_tick_handler +
    • >>   tos_knl_irq_leave +
    • >>   tos_knl_irq_enter +
    • >>   SysTick_Handler +
    • >>   knl_sched +
    • >>   tos_task_create +
    • >>   tos_knl_start +
    • >>   tos_knl_sched_unlock +
    • >>   tos_knl_sched_lock +
    • >>   kv_unlock +
    • >>   kv_lock +
    + +

    tos_knl_sched_lock (Thumb, 88 bytes, Stack size 8 bytes, tos_sys.o(i.tos_knl_sched_lock)) +

    [Stack]

    • Max Depth = 16 + Unknown Stack Size +
    • Call Chain = tos_knl_sched_lock ⇒ tos_cpu_cpsr_save +
    +
    [Calls]
    • >>   tos_knl_is_running +
    • >>   knl_is_inirq +
    • >>   tos_cpu_cpsr_save +
    • >>   tos_cpu_cpsr_restore +
    +
    [Called By]
    • >>   timer_update +
    + +

    tos_knl_sched_unlock (Thumb, 90 bytes, Stack size 8 bytes, tos_sys.o(i.tos_knl_sched_unlock)) +

    [Stack]

    • Max Depth = 24 + Unknown Stack Size +
    • Call Chain = tos_knl_sched_unlock ⇒ knl_sched ⇒ tos_cpu_cpsr_save +
    +
    [Calls]
    • >>   tos_knl_is_running +
    • >>   knl_sched +
    • >>   knl_is_sched_locked +
    • >>   knl_is_inirq +
    • >>   tos_cpu_cpsr_save +
    • >>   tos_cpu_cpsr_restore +
    +
    [Called By]
    • >>   timer_update +
    + +

    tos_knl_start (Thumb, 52 bytes, Stack size 8 bytes, tos_sys.o(i.tos_knl_start)) +

    [Stack]

    • Max Depth = 8 + Unknown Stack Size +
    • Call Chain = tos_knl_start +
    +
    [Calls]
    • >>   tos_knl_is_running +
    • >>   cpu_sched_start +
    • >>   readyqueue_highest_ready_task_get +
    +
    [Called By]
    • >>   osKernelStart +
    + +

    tos_kv_del (Thumb, 68 bytes, Stack size 16 bytes, tos_kv.o(i.tos_kv_del)) +

    [Stack]

    • Max Depth = 216 + Unknown Stack Size +
    • Call Chain = tos_kv_del ⇒ kv_item_find ⇒ kv_item_do_find ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_unlock +
    • >>   kv_lock +
    • >>   kv_item_free +
    • >>   kv_item_find +
    • >>   kv_item_delete +
    • >>   strlen +
    +
    [Called By]
    • >>   task +
    + +

    tos_kv_get (Thumb, 114 bytes, Stack size 32 bytes, tos_kv.o(i.tos_kv_get)) +

    [Stack]

    • Max Depth = 232 + Unknown Stack Size +
    • Call Chain = tos_kv_get ⇒ kv_item_find ⇒ kv_item_do_find ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_unlock +
    • >>   kv_lock +
    • >>   kv_item_free +
    • >>   kv_item_find +
    • >>   strlen +
    • >>   __aeabi_memcpy +
    +
    [Called By]
    • >>   task +
    + +

    tos_kv_has_key (Thumb, 52 bytes, Stack size 16 bytes, tos_kv.o(i.tos_kv_has_key)) +

    [Stack]

    • Max Depth = 216 + Unknown Stack Size +
    • Call Chain = tos_kv_has_key ⇒ kv_item_find ⇒ kv_item_do_find ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_unlock +
    • >>   kv_lock +
    • >>   kv_item_find +
    • >>   strlen +
    +
    [Called By]
    • >>   task +
    + +

    tos_kv_init (Thumb, 98 bytes, Stack size 16 bytes, tos_kv.o(i.tos_kv_init)) +

    [Stack]

    • Max Depth = 216 + Unknown Stack Size +
    • Call Chain = tos_kv_init ⇒ kv_mgr_workspace_locate ⇒ kv_mgr_blk_index_rebuild ⇒ kv_mgr_index_build ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_param_verify +
    • >>   kv_mgr_workspace_locate +
    • >>   kv_mgr_ctl_init +
    • >>   kv_mgr_ctl_build +
    • >>   kv_flash_ctl_init +
    • >>   __2printf +
    • >>   __aeabi_memclr4 +
    +
    [Called By]
    • >>   task +
    + +

    tos_kv_set (Thumb, 100 bytes, Stack size 24 bytes, tos_kv.o(i.tos_kv_set)) +

    [Stack]

    • Max Depth = 328 + Unknown Stack Size +
    • Call Chain = tos_kv_set ⇒ kv_item_update ⇒ kv_item_save ⇒ kv_blk_search_suitable ⇒ kv_gc ⇒ kv_mgr_blk_index_rebuild ⇒ kv_mgr_index_build ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_unlock +
    • >>   kv_lock +
    • >>   kv_item_update +
    • >>   kv_item_save +
    • >>   kv_item_free +
    • >>   kv_item_find +
    • >>   strlen +
    +
    [Called By]
    • >>   task +
    + +

    tos_kv_walkthru (Thumb, 156 bytes, Stack size 24 bytes, tos_kv.o(i.tos_kv_walkthru)) +

    [Stack]

    • Max Depth = 208 + Unknown Stack Size +
    • Call Chain = tos_kv_walkthru ⇒ kv_block_walkthru ⇒ kv_item_body_read ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_block_walkthru +
    • >>   kv_blk_hdr_read +
    • >>   __2printf +
    +
    [Called By]
    • >>   task +
    + +

    tos_mmheap_alloc (Thumb, 38 bytes, Stack size 16 bytes, tos_mmheap.o(i.tos_mmheap_alloc)) +

    [Stack]

    • Max Depth = 128 + Unknown Stack Size +
    • Call Chain = tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   blk_prepare_used +
    • >>   blk_locate_free +
    • >>   adjust_request_size +
    +
    [Called By]
    • >>   kv_mgr_ctl_init +
    • >>   kv_item_walkthru +
    • >>   kv_item_try_delete +
    • >>   kv_item_do_save +
    • >>   kv_item_body_read +
    • >>   kv_block_walkthru +
    + +

    tos_mmheap_free (Thumb, 48 bytes, Stack size 16 bytes, tos_mmheap.o(i.tos_mmheap_free)) +

    [Stack]

    • Max Depth = 104 + Unknown Stack Size +
    • Call Chain = tos_mmheap_free ⇒ blk_merge_prev ⇒ blk_remove ⇒ mapping_insert ⇒ __fls ⇒ generic_fls ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   blk_merge_prev +
    • >>   blk_merge_next +
    • >>   blk_mark_as_free +
    • >>   blk_insert +
    +
    [Called By]
    • >>   task_free +
    • >>   kv_item_try_delete +
    • >>   kv_item_is_moved +
    • >>   kv_item_free +
    • >>   kv_item_do_save +
    • >>   kv_item_body_read +
    + +

    tos_mmheap_pool_add (Thumb, 182 bytes, Stack size 24 bytes, tos_mmheap.o(i.tos_mmheap_pool_add)) +

    [Stack]

    • Max Depth = 96 + Unknown Stack Size +
    • Call Chain = tos_mmheap_pool_add ⇒ blk_insert ⇒ mapping_insert ⇒ __fls ⇒ generic_fls ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   offset_to_blk +
    • >>   mmheap_pool_is_exist +
    • >>   blk_set_used +
    • >>   blk_set_size +
    • >>   blk_set_prev_used +
    • >>   blk_set_prev_free +
    • >>   blk_set_free +
    • >>   blk_link_next +
    • >>   blk_insert +
    +
    [Called By]
    • >>   mmheap_init_with_pool +
    + +

    tos_mutex_create (Thumb, 86 bytes, Stack size 8 bytes, tos_mutex.o(i.tos_mutex_create)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = tos_mutex_create ⇒ pend_object_init +
    +
    [Calls]
    • >>   pend_object_init +
    • >>   knl_is_inirq +
    +
    [Called By]
    • >>   kv_mgr_ctl_init +
    + +

    tos_mutex_pend (Thumb, 18 bytes, Stack size 8 bytes, tos_mutex.o(i.tos_mutex_pend)) +

    [Stack]

    • Max Depth = 136 + Unknown Stack Size +
    • Call Chain = tos_mutex_pend ⇒ tos_mutex_pend_timed ⇒ pend_task_block ⇒ tick_list_add ⇒ tick_task_place ⇒ tos_cpu_cpsr_save +
    +
    [Calls]
    • >>   tos_mutex_pend_timed +
    +
    [Called By]
    • >>   kv_lock +
    + +

    tos_mutex_pend_timed (Thumb, 288 bytes, Stack size 24 bytes, tos_mutex.o(i.tos_mutex_pend_timed)) +

    [Stack]

    • Max Depth = 128 + Unknown Stack Size +
    • Call Chain = tos_mutex_pend_timed ⇒ pend_task_block ⇒ tick_list_add ⇒ tick_task_place ⇒ tos_cpu_cpsr_save +
    +
    [Calls]
    • >>   pend_task_block +
    • >>   pend_state2errno +
    • >>   knl_sched +
    • >>   knl_is_sched_locked +
    • >>   knl_is_inirq +
    • >>   tos_cpu_cpsr_save +
    • >>   tos_cpu_cpsr_restore +
    • >>   tos_task_prio_change +
    • >>   knl_is_self +
    • >>   mutex_fresh_owner_mark +
    • >>   knl_object_verify +
    +
    [Called By]
    • >>   tos_mutex_pend +
    + +

    tos_mutex_post (Thumb, 238 bytes, Stack size 32 bytes, tos_mutex.o(i.tos_mutex_post)) +

    [Stack]

    • Max Depth = 112 + Unknown Stack Size +
    • Call Chain = tos_mutex_post ⇒ mutex_old_owner_release ⇒ tos_task_prio_change ⇒ readyqueue_remove ⇒ readyqueue_prio_highest_get ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   pend_is_nopending +
    • >>   knl_sched +
    • >>   knl_is_inirq +
    • >>   tos_cpu_cpsr_save +
    • >>   tos_cpu_cpsr_restore +
    • >>   tos_task_prio_change +
    • >>   pend_wakeup_one +
    • >>   pend_highest_pending_task_get +
    • >>   pend_highest_pending_prio_get +
    • >>   knl_is_self +
    • >>   mutex_old_owner_release +
    • >>   mutex_fresh_owner_mark +
    • >>   knl_object_verify +
    +
    [Called By]
    • >>   kv_unlock +
    + +

    tos_task_create (Thumb, 294 bytes, Stack size 40 bytes, tos_task.o(i.tos_task_create)) +

    [Stack]

    • Max Depth = 72 + Unknown Stack Size +
    • Call Chain = tos_task_create ⇒ readyqueue_add_tail ⇒ tos_list_add_tail +
    +
    [Calls]
    • >>   tos_knl_is_running +
    • >>   knl_sched +
    • >>   knl_is_inirq +
    • >>   tos_cpu_cpsr_save +
    • >>   tos_cpu_cpsr_restore +
    • >>   cpu_task_stk_init +
    • >>   tos_list_add +
    • >>   task_reset +
    • >>   knl_is_idle +
    • >>   readyqueue_add_tail +
    +
    [Called By]
    • >>   osThreadCreate +
    • >>   knl_idle_init +
    + +

    tos_task_destroy (Thumb, 112 bytes, Stack size 8 bytes, tos_task.o(i.tos_task_destroy)) +

    [Stack]

    • Max Depth = 128 + Unknown Stack Size +
    • Call Chain = tos_task_destroy ⇒ task_do_destroy ⇒ task_mutex_release ⇒ mutex_release ⇒ pend_wakeup_all ⇒ pend_task_wakeup ⇒ readyqueue_add ⇒ readyqueue_add_tail ⇒ tos_list_add_tail +
    +
    [Calls]
    • >>   knl_is_sched_locked +
    • >>   knl_is_inirq +
    • >>   knl_is_self +
    • >>   task_do_destroy +
    • >>   knl_object_verify +
    +
    [Called By]
    • >>   task_exit +
    + +

    tos_task_prio_change (Thumb, 248 bytes, Stack size 24 bytes, tos_task.o(i.tos_task_prio_change)) +

    [Stack]

    • Max Depth = 64 + Unknown Stack Size +
    • Call Chain = tos_task_prio_change ⇒ readyqueue_remove ⇒ readyqueue_prio_highest_get ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   knl_sched +
    • >>   knl_is_inirq +
    • >>   tos_cpu_cpsr_save +
    • >>   tos_cpu_cpsr_restore +
    • >>   readyqueue_remove +
    • >>   pend_list_adjust +
    • >>   knl_is_self +
    • >>   tos_list_empty +
    • >>   task_state_is_ready +
    • >>   task_highest_pending_prio_get +
    • >>   knl_object_verify +
    • >>   readyqueue_add_tail +
    • >>   readyqueue_add_head +
    +
    [Called By]
    • >>   tos_mutex_post +
    • >>   tos_mutex_pend_timed +
    • >>   mutex_old_owner_release +
    + +

    tos_tick_handler (Thumb, 34 bytes, Stack size 8 bytes, tos_tick.o(i.tos_tick_handler)) +

    [Stack]

    • Max Depth = 96 + Unknown Stack Size +
    • Call Chain = tos_tick_handler ⇒ tick_update ⇒ pend_task_wakeup ⇒ readyqueue_add ⇒ readyqueue_add_tail ⇒ tos_list_add_tail +
    +
    [Calls]
    • >>   tos_knl_is_running +
    • >>   timer_update +
    • >>   tick_update +
    +
    [Called By]
    • >>   SysTick_Handler +
    +

    +

    +Local Symbols +

    +

    UART_DMAAbortOnError (Thumb, 24 bytes, Stack size 16 bytes, stm32l4xx_hal_uart.o(i.UART_DMAAbortOnError)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = UART_DMAAbortOnError +
    +
    [Calls]
    • >>   HAL_UART_ErrorCallback +
    +
    [Address Reference Count : 1]
    • stm32l4xx_hal_uart.o(i.HAL_UART_IRQHandler) +
    +

    UART_EndRxTransfer (Thumb, 36 bytes, Stack size 0 bytes, stm32l4xx_hal_uart.o(i.UART_EndRxTransfer)) +

    [Called By]

    • >>   HAL_UART_IRQHandler +
    + +

    UART_EndTransmit_IT (Thumb, 34 bytes, Stack size 8 bytes, stm32l4xx_hal_uart.o(i.UART_EndTransmit_IT)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = UART_EndTransmit_IT +
    +
    [Calls]
    • >>   HAL_UART_TxCpltCallback +
    +
    [Called By]
    • >>   HAL_UART_IRQHandler +
    + +

    RCC_SetFlashLatencyFromMSIRange (Thumb, 148 bytes, Stack size 24 bytes, stm32l4xx_hal_rcc.o(i.RCC_SetFlashLatencyFromMSIRange)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = RCC_SetFlashLatencyFromMSIRange +
    +
    [Calls]
    • >>   HAL_PWREx_GetVoltageRange +
    +
    [Called By]
    • >>   HAL_RCC_OscConfig +
    + +

    RCCEx_PLLSAI1_Config (Thumb, 376 bytes, Stack size 24 bytes, stm32l4xx_hal_rcc_ex.o(i.RCCEx_PLLSAI1_Config)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = RCCEx_PLLSAI1_Config +
    +
    [Calls]
    • >>   HAL_GetTick +
    +
    [Called By]
    • >>   HAL_RCCEx_PeriphCLKConfig +
    + +

    __NVIC_GetPriorityGrouping (Thumb, 10 bytes, Stack size 0 bytes, stm32l4xx_hal_cortex.o(i.__NVIC_GetPriorityGrouping)) +

    [Called By]

    • >>   HAL_NVIC_SetPriority +
    + +

    __NVIC_SetPriority (Thumb, 32 bytes, Stack size 8 bytes, stm32l4xx_hal_cortex.o(i.__NVIC_SetPriority)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = __NVIC_SetPriority +
    +
    [Called By]
    • >>   HAL_NVIC_SetPriority +
    • >>   HAL_SYSTICK_Config +
    + +

    QSPI_Config (Thumb, 488 bytes, Stack size 8 bytes, stm32l4xx_hal_qspi.o(i.QSPI_Config)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = QSPI_Config +
    +
    [Called By]
    • >>   HAL_QSPI_Command +
    + +

    QSPI_WaitFlagStateUntilTimeout (Thumb, 76 bytes, Stack size 24 bytes, stm32l4xx_hal_qspi.o(i.QSPI_WaitFlagStateUntilTimeout)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = QSPI_WaitFlagStateUntilTimeout +
    +
    [Calls]
    • >>   HAL_GetTick +
    +
    [Called By]
    • >>   HAL_QSPI_Init +
    • >>   HAL_QSPI_Transmit +
    • >>   HAL_QSPI_Receive +
    • >>   HAL_QSPI_Command +
    + +

    prv_spi_flash_wait_write_end (Thumb, 52 bytes, Stack size 24 bytes, hal_qspi_flash_1.o(i.prv_spi_flash_wait_write_end)) +

    [Stack]

    • Max Depth = 168
    • Call Chain = prv_spi_flash_wait_write_end ⇒ QSPI_Send_CMD ⇒ HAL_QSPI_Command ⇒ QSPI_WaitFlagStateUntilTimeout +
    +
    [Calls]
    • >>   QSPI_Send_CMD +
    • >>   QSPI_Receive +
    +
    [Called By]
    • >>   prv_spi_flash_erase_sector +
    • >>   prv_spi_flash_write_page +
    + +

    prv_spi_flash_write_enable (Thumb, 26 bytes, Stack size 16 bytes, hal_qspi_flash_1.o(i.prv_spi_flash_write_enable)) +

    [Stack]

    • Max Depth = 160
    • Call Chain = prv_spi_flash_write_enable ⇒ QSPI_Send_CMD ⇒ HAL_QSPI_Command ⇒ QSPI_WaitFlagStateUntilTimeout +
    +
    [Calls]
    • >>   QSPI_Send_CMD +
    +
    [Called By]
    • >>   prv_spi_flash_erase_sector +
    • >>   prv_spi_flash_write_page +
    + +

    prv_spi_flash_write_page (Thumb, 62 bytes, Stack size 32 bytes, hal_qspi_flash_1.o(i.prv_spi_flash_write_page)) +

    [Stack]

    • Max Depth = 200
    • Call Chain = prv_spi_flash_write_page ⇒ prv_spi_flash_wait_write_end ⇒ QSPI_Send_CMD ⇒ HAL_QSPI_Command ⇒ QSPI_WaitFlagStateUntilTimeout +
    +
    [Calls]
    • >>   QSPI_Transmit +
    • >>   QSPI_Send_CMD +
    • >>   prv_spi_flash_write_enable +
    • >>   prv_spi_flash_wait_write_end +
    +
    [Called By]
    • >>   hal_spi_flash_write +
    + +

    DHT11_Mode_Out_PP (Thumb, 30 bytes, Stack size 24 bytes, dht11_bus.o(i.DHT11_Mode_Out_PP)) +

    [Stack]

    • Max Depth = 44
    • Call Chain = DHT11_Mode_Out_PP ⇒ HAL_GPIO_Init +
    +
    [Calls]
    • >>   HAL_GPIO_Init +
    +
    [Called By]
    • >>   DHT11_Init +
    + +

    __ffs (Thumb, 20 bytes, Stack size 8 bytes, tos_mmheap.o(i.__ffs)) +

    [Stack]

    • Max Depth = 24 + Unknown Stack Size +
    • Call Chain = __ffs ⇒ generic_fls ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   generic_fls +
    +
    [Called By]
    • >>   blk_search_suitable +
    + +

    __fls (Thumb, 14 bytes, Stack size 8 bytes, tos_mmheap.o(i.__fls)) +

    [Stack]

    • Max Depth = 24 + Unknown Stack Size +
    • Call Chain = __fls ⇒ generic_fls ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   generic_fls +
    +
    [Called By]
    • >>   mapping_search +
    • >>   mapping_insert +
    + +

    adjust_request_size (Thumb, 46 bytes, Stack size 8 bytes, tos_mmheap.o(i.adjust_request_size)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = adjust_request_size +
    +
    [Called By]
    • >>   tos_mmheap_alloc +
    + +

    blk_absorb (Thumb, 30 bytes, Stack size 16 bytes, tos_mmheap.o(i.blk_absorb)) +

    [Stack]

    • Max Depth = 56
    • Call Chain = blk_absorb ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   blk_size +
    • >>   blk_link_next +
    +
    [Called By]
    • >>   blk_merge_prev +
    • >>   blk_merge_next +
    + +

    blk_can_split (Thumb, 28 bytes, Stack size 16 bytes, tos_mmheap.o(i.blk_can_split)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = blk_can_split +
    +
    [Calls]
    • >>   blk_size +
    +
    [Called By]
    • >>   blk_trim_free +
    + +

    blk_insert (Thumb, 32 bytes, Stack size 24 bytes, tos_mmheap.o(i.blk_insert)) +

    [Stack]

    • Max Depth = 72 + Unknown Stack Size +
    • Call Chain = blk_insert ⇒ mapping_insert ⇒ __fls ⇒ generic_fls ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   mapping_insert +
    • >>   insert_free_block +
    • >>   blk_size +
    +
    [Called By]
    • >>   tos_mmheap_free +
    • >>   tos_mmheap_pool_add +
    • >>   blk_trim_free +
    + +

    blk_link_next (Thumb, 18 bytes, Stack size 16 bytes, tos_mmheap.o(i.blk_link_next)) +

    [Stack]

    • Max Depth = 40
    • Call Chain = blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   blk_next +
    +
    [Called By]
    • >>   tos_mmheap_pool_add +
    • >>   blk_trim_free +
    • >>   blk_mark_as_free +
    • >>   blk_absorb +
    + +

    blk_locate_free (Thumb, 58 bytes, Stack size 24 bytes, tos_mmheap.o(i.blk_locate_free)) +

    [Stack]

    • Max Depth = 96 + Unknown Stack Size +
    • Call Chain = blk_locate_free ⇒ mapping_search ⇒ mapping_insert ⇒ __fls ⇒ generic_fls ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   remove_free_block +
    • >>   mapping_search +
    • >>   blk_search_suitable +
    +
    [Called By]
    • >>   tos_mmheap_alloc +
    + +

    blk_mark_as_free (Thumb, 26 bytes, Stack size 16 bytes, tos_mmheap.o(i.blk_mark_as_free)) +

    [Stack]

    • Max Depth = 56
    • Call Chain = blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   blk_set_prev_free +
    • >>   blk_set_free +
    • >>   blk_link_next +
    +
    [Called By]
    • >>   tos_mmheap_free +
    • >>   blk_split +
    + +

    blk_mark_as_used (Thumb, 26 bytes, Stack size 16 bytes, tos_mmheap.o(i.blk_mark_as_used)) +

    [Stack]

    • Max Depth = 40
    • Call Chain = blk_mark_as_used ⇒ blk_next +
    +
    [Calls]
    • >>   blk_set_used +
    • >>   blk_set_prev_used +
    • >>   blk_next +
    +
    [Called By]
    • >>   blk_prepare_used +
    + +

    blk_merge_next (Thumb, 42 bytes, Stack size 16 bytes, tos_mmheap.o(i.blk_merge_next)) +

    [Stack]

    • Max Depth = 88 + Unknown Stack Size +
    • Call Chain = blk_merge_next ⇒ blk_remove ⇒ mapping_insert ⇒ __fls ⇒ generic_fls ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   blk_remove +
    • >>   blk_next +
    • >>   blk_absorb +
    +
    [Called By]
    • >>   tos_mmheap_free +
    + +

    blk_merge_prev (Thumb, 40 bytes, Stack size 16 bytes, tos_mmheap.o(i.blk_merge_prev)) +

    [Stack]

    • Max Depth = 88 + Unknown Stack Size +
    • Call Chain = blk_merge_prev ⇒ blk_remove ⇒ mapping_insert ⇒ __fls ⇒ generic_fls ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   blk_remove +
    • >>   blk_absorb +
    +
    [Called By]
    • >>   tos_mmheap_free +
    + +

    blk_next (Thumb, 36 bytes, Stack size 24 bytes, tos_mmheap.o(i.blk_next)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = blk_next +
    +
    [Calls]
    • >>   offset_to_blk +
    • >>   blk_to_ptr +
    • >>   blk_size +
    +
    [Called By]
    • >>   blk_merge_next +
    • >>   blk_mark_as_used +
    • >>   blk_link_next +
    + +

    blk_prepare_used (Thumb, 34 bytes, Stack size 16 bytes, tos_mmheap.o(i.blk_prepare_used)) +

    [Stack]

    • Max Depth = 112 + Unknown Stack Size +
    • Call Chain = blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   blk_trim_free +
    • >>   blk_to_ptr +
    • >>   blk_mark_as_used +
    +
    [Called By]
    • >>   tos_mmheap_alloc +
    + +

    blk_remove (Thumb, 32 bytes, Stack size 24 bytes, tos_mmheap.o(i.blk_remove)) +

    [Stack]

    • Max Depth = 72 + Unknown Stack Size +
    • Call Chain = blk_remove ⇒ mapping_insert ⇒ __fls ⇒ generic_fls ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   remove_free_block +
    • >>   mapping_insert +
    • >>   blk_size +
    +
    [Called By]
    • >>   blk_merge_prev +
    • >>   blk_merge_next +
    + +

    blk_search_suitable (Thumb, 104 bytes, Stack size 32 bytes, tos_mmheap.o(i.blk_search_suitable)) +

    [Stack]

    • Max Depth = 56 + Unknown Stack Size +
    • Call Chain = blk_search_suitable ⇒ __ffs ⇒ generic_fls ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   __ffs +
    +
    [Called By]
    • >>   blk_locate_free +
    + +

    blk_set_free (Thumb, 10 bytes, Stack size 0 bytes, tos_mmheap.o(i.blk_set_free)) +

    [Called By]

    • >>   tos_mmheap_pool_add +
    • >>   blk_mark_as_free +
    + +

    blk_set_prev_free (Thumb, 10 bytes, Stack size 0 bytes, tos_mmheap.o(i.blk_set_prev_free)) +

    [Called By]

    • >>   tos_mmheap_pool_add +
    • >>   blk_trim_free +
    • >>   blk_mark_as_free +
    + +

    blk_set_prev_used (Thumb, 10 bytes, Stack size 0 bytes, tos_mmheap.o(i.blk_set_prev_used)) +

    [Called By]

    • >>   tos_mmheap_pool_add +
    • >>   blk_mark_as_used +
    + +

    blk_set_size (Thumb, 12 bytes, Stack size 0 bytes, tos_mmheap.o(i.blk_set_size)) +

    [Called By]

    • >>   tos_mmheap_pool_add +
    • >>   blk_split +
    + +

    blk_set_used (Thumb, 10 bytes, Stack size 0 bytes, tos_mmheap.o(i.blk_set_used)) +

    [Called By]

    • >>   tos_mmheap_pool_add +
    • >>   blk_mark_as_used +
    + +

    blk_size (Thumb, 10 bytes, Stack size 0 bytes, tos_mmheap.o(i.blk_size)) +

    [Called By]

    • >>   blk_split +
    • >>   blk_remove +
    • >>   blk_next +
    • >>   blk_insert +
    • >>   blk_can_split +
    • >>   blk_absorb +
    + +

    blk_split (Thumb, 62 bytes, Stack size 24 bytes, tos_mmheap.o(i.blk_split)) +

    [Stack]

    • Max Depth = 80
    • Call Chain = blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   offset_to_blk +
    • >>   blk_to_ptr +
    • >>   blk_size +
    • >>   blk_set_size +
    • >>   blk_mark_as_free +
    +
    [Called By]
    • >>   blk_trim_free +
    + +

    blk_to_ptr (Thumb, 8 bytes, Stack size 0 bytes, tos_mmheap.o(i.blk_to_ptr)) +

    [Called By]

    • >>   blk_split +
    • >>   blk_prepare_used +
    • >>   blk_next +
    + +

    blk_trim_free (Thumb, 46 bytes, Stack size 16 bytes, tos_mmheap.o(i.blk_trim_free)) +

    [Stack]

    • Max Depth = 96 + Unknown Stack Size +
    • Call Chain = blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   blk_split +
    • >>   blk_set_prev_free +
    • >>   blk_link_next +
    • >>   blk_insert +
    • >>   blk_can_split +
    +
    [Called By]
    • >>   blk_prepare_used +
    + +

    generic_fls (Thumb, 16 bytes, Stack size 8 bytes, tos_mmheap.o(i.generic_fls)) +

    [Stack]

    • Max Depth = 16 + Unknown Stack Size +
    • Call Chain = generic_fls ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   tos_cpu_clz +
    +
    [Called By]
    • >>   __fls +
    • >>   __ffs +
    + +

    insert_free_block (Thumb, 74 bytes, Stack size 12 bytes, tos_mmheap.o(i.insert_free_block)) +

    [Stack]

    • Max Depth = 12
    • Call Chain = insert_free_block +
    +
    [Called By]
    • >>   blk_insert +
    + +

    mapping_insert (Thumb, 58 bytes, Stack size 24 bytes, tos_mmheap.o(i.mapping_insert)) +

    [Stack]

    • Max Depth = 48 + Unknown Stack Size +
    • Call Chain = mapping_insert ⇒ __fls ⇒ generic_fls ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   __fls +
    +
    [Called By]
    • >>   mapping_search +
    • >>   blk_remove +
    • >>   blk_insert +
    + +

    mapping_search (Thumb, 46 bytes, Stack size 24 bytes, tos_mmheap.o(i.mapping_search)) +

    [Stack]

    • Max Depth = 72 + Unknown Stack Size +
    • Call Chain = mapping_search ⇒ mapping_insert ⇒ __fls ⇒ generic_fls ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   mapping_insert +
    • >>   __fls +
    +
    [Called By]
    • >>   blk_locate_free +
    + +

    mmheap_ctl_init (Thumb, 88 bytes, Stack size 0 bytes, tos_mmheap.o(i.mmheap_ctl_init)) +

    [Called By]

    • >>   mmheap_init_with_pool +
    + +

    mmheap_pool_is_exist (Thumb, 38 bytes, Stack size 0 bytes, tos_mmheap.o(i.mmheap_pool_is_exist)) +

    [Called By]

    • >>   tos_mmheap_pool_add +
    + +

    offset_to_blk (Thumb, 6 bytes, Stack size 0 bytes, tos_mmheap.o(i.offset_to_blk)) +

    [Called By]

    • >>   tos_mmheap_pool_add +
    • >>   blk_split +
    • >>   blk_next +
    + +

    remove_free_block (Thumb, 92 bytes, Stack size 16 bytes, tos_mmheap.o(i.remove_free_block)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = remove_free_block +
    +
    [Called By]
    • >>   blk_remove +
    • >>   blk_locate_free +
    + +

    knl_object_verify (Thumb, 16 bytes, Stack size 0 bytes, tos_mutex.o(i.knl_object_verify)) +

    [Called By]

    • >>   tos_mutex_post +
    • >>   tos_mutex_pend_timed +
    + +

    mutex_fresh_owner_mark (Thumb, 40 bytes, Stack size 8 bytes, tos_mutex.o(i.mutex_fresh_owner_mark)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = mutex_fresh_owner_mark +
    +
    [Called By]
    • >>   tos_mutex_post +
    • >>   tos_mutex_pend_timed +
    + +

    mutex_old_owner_release (Thumb, 74 bytes, Stack size 16 bytes, tos_mutex.o(i.mutex_old_owner_release)) +

    [Stack]

    • Max Depth = 80 + Unknown Stack Size +
    • Call Chain = mutex_old_owner_release ⇒ tos_task_prio_change ⇒ readyqueue_remove ⇒ readyqueue_prio_highest_get ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   tos_task_prio_change +
    +
    [Called By]
    • >>   tos_mutex_post +
    • >>   mutex_release +
    + +

    pend_list_add (Thumb, 68 bytes, Stack size 16 bytes, tos_pend.o(i.pend_list_add)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = pend_list_add +
    +
    [Called By]
    • >>   pend_task_block +
    • >>   pend_list_adjust +
    + +

    tos_list_del (Thumb, 12 bytes, Stack size 0 bytes, tos_pend.o(i.tos_list_del)) +

    [Called By]

    • >>   pend_list_remove +
    • >>   pend_list_adjust +
    + +

    tos_list_empty (Thumb, 16 bytes, Stack size 0 bytes, tos_pend.o(i.tos_list_empty)) +

    [Called By]

    • >>   pend_is_nopending +
    • >>   pend_highest_pending_prio_get +
    + +

    tos_list_init (Thumb, 6 bytes, Stack size 0 bytes, tos_pend.o(i.tos_list_init)) +

    [Called By]

    • >>   pend_object_init +
    + +

    _list_add (Thumb, 10 bytes, Stack size 0 bytes, tos_sched.o(i._list_add)) +

    [Called By]

    • >>   readyqueue_add_head +
    • >>   tos_list_add_tail +
    + +

    _list_del (Thumb, 6 bytes, Stack size 0 bytes, tos_sched.o(i._list_del)) +

    [Called By]

    • >>   readyqueue_remove +
    + +

    readyqueue_prio_highest_get (Thumb, 36 bytes, Stack size 16 bytes, tos_sched.o(i.readyqueue_prio_highest_get)) +

    [Stack]

    • Max Depth = 24 + Unknown Stack Size +
    • Call Chain = readyqueue_prio_highest_get ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   tos_cpu_clz +
    +
    [Called By]
    • >>   readyqueue_remove +
    + +

    readyqueue_prio_mark (Thumb, 56 bytes, Stack size 0 bytes, tos_sched.o(i.readyqueue_prio_mark)) +

    [Called By]

    • >>   readyqueue_add_tail +
    • >>   readyqueue_add_head +
    + +

    tos_list_add_tail (Thumb, 18 bytes, Stack size 16 bytes, tos_sched.o(i.tos_list_add_tail)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = tos_list_add_tail +
    +
    [Calls]
    • >>   _list_add +
    +
    [Called By]
    • >>   readyqueue_add_tail +
    + +

    tos_list_empty (Thumb, 16 bytes, Stack size 0 bytes, tos_sched.o(i.tos_list_empty)) +

    [Called By]

    • >>   readyqueue_remove +
    • >>   readyqueue_add_tail +
    • >>   readyqueue_add_head +
    + +

    knl_idle_entry (Thumb, 10 bytes, Stack size 0 bytes, tos_sys.o(i.knl_idle_entry)) +

    [Stack]

    • Max Depth = 136 + Unknown Stack Size +
    • Call Chain = knl_idle_entry ⇒ task_free_all ⇒ task_free ⇒ tos_mmheap_free ⇒ blk_merge_prev ⇒ blk_remove ⇒ mapping_insert ⇒ __fls ⇒ generic_fls ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   task_free_all +
    +
    [Address Reference Count : 1]
    • tos_sys.o(i.knl_idle_init) +
    +

    knl_object_verify (Thumb, 16 bytes, Stack size 0 bytes, tos_task.o(i.knl_object_verify)) +

    [Called By]

    • >>   tos_task_prio_change +
    • >>   tos_task_destroy +
    + +

    task_do_destroy (Thumb, 132 bytes, Stack size 16 bytes, tos_task.o(i.task_do_destroy)) +

    [Stack]

    • Max Depth = 120 + Unknown Stack Size +
    • Call Chain = task_do_destroy ⇒ task_mutex_release ⇒ mutex_release ⇒ pend_wakeup_all ⇒ pend_task_wakeup ⇒ readyqueue_add ⇒ readyqueue_add_tail ⇒ tos_list_add_tail +
    +
    [Calls]
    • >>   knl_sched +
    • >>   tos_cpu_cpsr_save +
    • >>   tos_cpu_cpsr_restore +
    • >>   tick_list_remove +
    • >>   readyqueue_remove +
    • >>   pend_list_remove +
    • >>   tos_list_empty +
    • >>   tos_list_del +
    • >>   task_state_is_ready +
    • >>   task_reset +
    • >>   task_mutex_release +
    • >>   knl_is_idle +
    +
    [Called By]
    • >>   tos_task_destroy +
    + +

    task_exit (Thumb, 10 bytes, Stack size 8 bytes, tos_task.o(i.task_exit)) +

    [Stack]

    • Max Depth = 136 + Unknown Stack Size +
    • Call Chain = task_exit ⇒ tos_task_destroy ⇒ task_do_destroy ⇒ task_mutex_release ⇒ mutex_release ⇒ pend_wakeup_all ⇒ pend_task_wakeup ⇒ readyqueue_add ⇒ readyqueue_add_tail ⇒ tos_list_add_tail +
    +
    [Calls]
    • >>   tos_task_destroy +
    +
    [Address Reference Count : 1]
    • tos_task.o(i.tos_task_create) +
    +

    task_free (Thumb, 18 bytes, Stack size 8 bytes, tos_task.o(i.task_free)) +

    [Stack]

    • Max Depth = 112 + Unknown Stack Size +
    • Call Chain = task_free ⇒ tos_mmheap_free ⇒ blk_merge_prev ⇒ blk_remove ⇒ mapping_insert ⇒ __fls ⇒ generic_fls ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   tos_mmheap_free +
    +
    [Called By]
    • >>   task_free_all +
    + +

    task_highest_pending_prio_get (Thumb, 48 bytes, Stack size 24 bytes, tos_task.o(i.task_highest_pending_prio_get)) +

    [Stack]

    • Max Depth = 40
    • Call Chain = task_highest_pending_prio_get ⇒ pend_highest_pending_prio_get +
    +
    [Calls]
    • >>   pend_highest_pending_prio_get +
    +
    [Called By]
    • >>   tos_task_prio_change +
    + +

    task_mutex_release (Thumb, 32 bytes, Stack size 16 bytes, tos_task.o(i.task_mutex_release)) +

    [Stack]

    • Max Depth = 104 + Unknown Stack Size +
    • Call Chain = task_mutex_release ⇒ mutex_release ⇒ pend_wakeup_all ⇒ pend_task_wakeup ⇒ readyqueue_add ⇒ readyqueue_add_tail ⇒ tos_list_add_tail +
    +
    [Calls]
    • >>   mutex_release +
    +
    [Called By]
    • >>   task_do_destroy +
    + +

    task_reset (Thumb, 80 bytes, Stack size 8 bytes, tos_task.o(i.task_reset)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = task_reset +
    +
    [Calls]
    • >>   tos_list_init +
    +
    [Called By]
    • >>   task_do_destroy +
    • >>   tos_task_create +
    + +

    task_state_is_ready (Thumb, 14 bytes, Stack size 0 bytes, tos_task.o(i.task_state_is_ready)) +

    [Called By]

    • >>   tos_task_prio_change +
    • >>   task_do_destroy +
    + +

    tos_list_add (Thumb, 14 bytes, Stack size 0 bytes, tos_task.o(i.tos_list_add)) +

    [Called By]

    • >>   tos_task_create +
    + +

    tos_list_del (Thumb, 12 bytes, Stack size 0 bytes, tos_task.o(i.tos_list_del)) +

    [Called By]

    • >>   task_do_destroy +
    • >>   task_free_all +
    + +

    tos_list_empty (Thumb, 16 bytes, Stack size 0 bytes, tos_task.o(i.tos_list_empty)) +

    [Called By]

    • >>   tos_task_prio_change +
    • >>   task_do_destroy +
    + +

    tos_list_init (Thumb, 6 bytes, Stack size 0 bytes, tos_task.o(i.tos_list_init)) +

    [Called By]

    • >>   task_reset +
    + +

    tick_task_place (Thumb, 184 bytes, Stack size 56 bytes, tos_tick.o(i.tick_task_place)) +

    [Stack]

    • Max Depth = 64 + Unknown Stack Size +
    • Call Chain = tick_task_place ⇒ tos_cpu_cpsr_save +
    +
    [Calls]
    • >>   tos_cpu_cpsr_save +
    • >>   tos_cpu_cpsr_restore +
    +
    [Called By]
    • >>   tick_list_add +
    + +

    tick_task_takeoff (Thumb, 126 bytes, Stack size 16 bytes, tos_tick.o(i.tick_task_takeoff)) +

    [Stack]

    • Max Depth = 24 + Unknown Stack Size +
    • Call Chain = tick_task_takeoff ⇒ tos_cpu_cpsr_save +
    +
    [Calls]
    • >>   tos_cpu_cpsr_save +
    • >>   tos_cpu_cpsr_restore +
    • >>   tos_list_empty +
    +
    [Called By]
    • >>   tick_list_remove +
    + +

    tos_list_empty (Thumb, 16 bytes, Stack size 0 bytes, tos_tick.o(i.tos_list_empty)) +

    [Called By]

    • >>   tick_task_takeoff +
    • >>   tick_update +
    + +

    timer_place (Thumb, 130 bytes, Stack size 24 bytes, tos_timer.o(i.timer_place)) +

    [Stack]

    • Max Depth = 32 + Unknown Stack Size +
    • Call Chain = timer_place ⇒ tos_cpu_cpsr_save +
    +
    [Calls]
    • >>   tos_cpu_cpsr_save +
    • >>   tos_cpu_cpsr_restore +
    +
    [Called By]
    • >>   timer_update +
    + +

    timer_takeoff (Thumb, 110 bytes, Stack size 24 bytes, tos_timer.o(i.timer_takeoff)) +

    [Stack]

    • Max Depth = 32 + Unknown Stack Size +
    • Call Chain = timer_takeoff ⇒ tos_cpu_cpsr_save +
    +
    [Calls]
    • >>   tos_cpu_cpsr_save +
    • >>   tos_cpu_cpsr_restore +
    +
    [Called By]
    • >>   timer_update +
    + +

    __NVIC_SetPriority (Thumb, 32 bytes, Stack size 8 bytes, port_c.o(i.__NVIC_SetPriority)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = __NVIC_SetPriority +
    +
    [Called By]
    • >>   port_systick_priority_set +
    • >>   port_systick_config +
    + +

    errno_knl2cmsis (Thumb, 12 bytes, Stack size 0 bytes, cmsis_os.o(i.errno_knl2cmsis)) +

    [Called By]

    • >>   osKernelStart +
    • >>   osKernelInitialize +
    + +

    priority_cmsis2knl (Thumb, 18 bytes, Stack size 0 bytes, cmsis_os.o(i.priority_cmsis2knl)) +

    [Called By]

    • >>   osThreadCreate +
    + +

    kv_blk_flags_add (Thumb, 58 bytes, Stack size 12 bytes, tos_kv.o(i.kv_blk_flags_add)) +

    [Stack]

    • Max Depth = 12
    • Call Chain = kv_blk_flags_add +
    +
    [Called By]
    • >>   kv_mgr_ctl_build +
    • >>   kv_blk_set_inuse +
    • >>   kv_blk_set_dirty +
    + +

    kv_blk_flags_get (Thumb, 30 bytes, Stack size 0 bytes, tos_kv.o(i.kv_blk_flags_get)) +

    [Called By]

    • >>   kv_gc +
    • >>   kv_blk_is_inuse +
    • >>   kv_blk_is_hanging +
    • >>   kv_blk_is_fresh +
    • >>   kv_blk_is_bad +
    + +

    kv_blk_flags_rmv (Thumb, 58 bytes, Stack size 12 bytes, tos_kv.o(i.kv_blk_flags_rmv)) +

    [Stack]

    • Max Depth = 12
    • Call Chain = kv_blk_flags_rmv +
    +
    [Called By]
    • >>   kv_mgr_blk_index_rebuild +
    • >>   kv_blk_reset_inuse +
    • >>   kv_blk_reset_fresh +
    + +

    kv_blk_flags_set (Thumb, 30 bytes, Stack size 8 bytes, tos_kv.o(i.kv_blk_flags_set)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = kv_blk_flags_set +
    +
    [Called By]
    • >>   kv_blk_set_fresh +
    • >>   kv_blk_set_bad +
    + +

    kv_blk_format (Thumb, 42 bytes, Stack size 8 bytes, tos_kv.o(i.kv_blk_format)) +

    [Stack]

    • Max Depth = 48
    • Call Chain = kv_blk_format ⇒ kv_flash_wunit_modify ⇒ kv_flash_write +
    +
    [Calls]
    • >>   kv_flash_wunit_modify +
    • >>   kv_flash_blk_erase +
    • >>   kv_blk_set_fresh +
    +
    [Called By]
    • >>   kv_mgr_ctl_build +
    • >>   kv_gc +
    + +

    kv_blk_freesz_get (Thumb, 32 bytes, Stack size 0 bytes, tos_kv.o(i.kv_blk_freesz_get)) +

    [Called By]

    • >>   kv_item_save +
    • >>   kv_item_do_gc +
    • >>   kv_blk_search_suitable +
    • >>   kv_blk_search_inuse +
    • >>   kv_blk_is_full +
    • >>   kv_blk_freesz_reduce +
    + +

    kv_blk_freesz_reduce (Thumb, 24 bytes, Stack size 16 bytes, tos_kv.o(i.kv_blk_freesz_reduce)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = kv_blk_freesz_reduce ⇒ kv_blk_freesz_set +
    +
    [Calls]
    • >>   kv_blk_freesz_set +
    • >>   kv_blk_freesz_get +
    +
    [Called By]
    • >>   kv_item_save +
    • >>   kv_item_do_gc +
    + +

    kv_blk_freesz_set (Thumb, 32 bytes, Stack size 8 bytes, tos_kv.o(i.kv_blk_freesz_set)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = kv_blk_freesz_set +
    +
    [Called By]
    • >>   kv_item_walkthru +
    • >>   kv_blk_set_fresh +
    • >>   kv_blk_freesz_reduce +
    + +

    kv_blk_hdr_read (Thumb, 18 bytes, Stack size 16 bytes, tos_kv.o(i.kv_blk_hdr_read)) +

    [Stack]

    • Max Depth = 32
    • Call Chain = kv_blk_hdr_read ⇒ kv_flash_read +
    +
    [Calls]
    • >>   kv_flash_read +
    +
    [Called By]
    • >>   tos_kv_walkthru +
    • >>   kv_mgr_ctl_build +
    + +

    kv_blk_is_bad (Thumb, 16 bytes, Stack size 8 bytes, tos_kv.o(i.kv_blk_is_bad)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = kv_blk_is_bad +
    +
    [Calls]
    • >>   kv_blk_flags_get +
    +
    [Called By]
    • >>   kv_item_find_new_copy +
    • >>   kv_item_find +
    + +

    kv_blk_is_fresh (Thumb, 16 bytes, Stack size 8 bytes, tos_kv.o(i.kv_blk_is_fresh)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = kv_blk_is_fresh +
    +
    [Calls]
    • >>   kv_blk_flags_get +
    +
    [Called By]
    • >>   kv_mgr_workspace_locate +
    • >>   kv_item_save +
    • >>   kv_item_find_new_copy +
    • >>   kv_item_find +
    • >>   kv_blk_set_fresh +
    • >>   kv_blk_reset_fresh +
    • >>   kv_blk_next_fresh +
    + +

    kv_blk_is_full (Thumb, 38 bytes, Stack size 8 bytes, tos_kv.o(i.kv_blk_is_full)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = kv_blk_is_full +
    +
    [Calls]
    • >>   kv_blk_freesz_get +
    +
    [Called By]
    • >>   kv_item_save +
    • >>   kv_gc +
    + +

    kv_blk_is_hanging (Thumb, 16 bytes, Stack size 8 bytes, tos_kv.o(i.kv_blk_is_hanging)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = kv_blk_is_hanging +
    +
    [Calls]
    • >>   kv_blk_flags_get +
    +
    [Called By]
    • >>   kv_mgr_ctl_build +
    • >>   kv_mgr_blk_index_rebuild +
    + +

    kv_blk_is_inuse (Thumb, 16 bytes, Stack size 8 bytes, tos_kv.o(i.kv_blk_is_inuse)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = kv_blk_is_inuse +
    +
    [Calls]
    • >>   kv_blk_flags_get +
    +
    [Called By]
    • >>   kv_mgr_workspace_locate +
    • >>   kv_blk_set_inuse +
    • >>   kv_blk_search_inuse +
    • >>   kv_blk_reset_inuse +
    + +

    kv_blk_next_fresh (Thumb, 118 bytes, Stack size 8 bytes, tos_kv.o(i.kv_blk_next_fresh)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = kv_blk_next_fresh ⇒ kv_blk_is_fresh +
    +
    [Calls]
    • >>   kv_blk_is_fresh +
    +
    [Called By]
    • >>   kv_gc +
    • >>   kv_blk_search_suitable +
    + +

    kv_blk_reset_fresh (Thumb, 34 bytes, Stack size 8 bytes, tos_kv.o(i.kv_blk_reset_fresh)) +

    [Stack]

    • Max Depth = 20
    • Call Chain = kv_blk_reset_fresh ⇒ kv_blk_flags_rmv +
    +
    [Calls]
    • >>   kv_blk_is_fresh +
    • >>   kv_blk_flags_rmv +
    +
    [Called By]
    • >>   kv_item_save +
    • >>   kv_gc +
    + +

    kv_blk_reset_inuse (Thumb, 34 bytes, Stack size 8 bytes, tos_kv.o(i.kv_blk_reset_inuse)) +

    [Stack]

    • Max Depth = 20
    • Call Chain = kv_blk_reset_inuse ⇒ kv_blk_flags_rmv +
    +
    [Calls]
    • >>   kv_blk_is_inuse +
    • >>   kv_blk_flags_rmv +
    +
    [Called By]
    • >>   kv_item_walkthru +
    • >>   kv_item_save +
    • >>   kv_gc +
    + +

    kv_blk_search_inuse (Thumb, 130 bytes, Stack size 16 bytes, tos_kv.o(i.kv_blk_search_inuse)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = kv_blk_search_inuse ⇒ kv_blk_is_inuse +
    +
    [Calls]
    • >>   kv_blk_is_inuse +
    • >>   kv_blk_freesz_get +
    +
    [Called By]
    • >>   kv_blk_search_suitable +
    + +

    kv_blk_search_suitable (Thumb, 150 bytes, Stack size 16 bytes, tos_kv.o(i.kv_blk_search_suitable)) +

    [Stack]

    • Max Depth = 232 + Unknown Stack Size +
    • Call Chain = kv_blk_search_suitable ⇒ kv_gc ⇒ kv_mgr_blk_index_rebuild ⇒ kv_mgr_index_build ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_gc +
    • >>   kv_blk_search_inuse +
    • >>   kv_blk_next_fresh +
    • >>   kv_blk_freesz_get +
    +
    [Called By]
    • >>   kv_item_save +
    + +

    kv_blk_set_bad (Thumb, 14 bytes, Stack size 8 bytes, tos_kv.o(i.kv_blk_set_bad)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = kv_blk_set_bad ⇒ kv_blk_flags_set +
    +
    [Calls]
    • >>   kv_blk_flags_set +
    +
    [Called By]
    • >>   kv_mgr_ctl_build +
    • >>   kv_gc +
    + +

    kv_blk_set_dirty (Thumb, 14 bytes, Stack size 8 bytes, tos_kv.o(i.kv_blk_set_dirty)) +

    [Stack]

    • Max Depth = 20
    • Call Chain = kv_blk_set_dirty ⇒ kv_blk_flags_add +
    +
    [Calls]
    • >>   kv_blk_flags_add +
    +
    [Called By]
    • >>   kv_item_walkthru +
    • >>   kv_item_delete_aux +
    + +

    kv_blk_set_fresh (Thumb, 64 bytes, Stack size 8 bytes, tos_kv.o(i.kv_blk_set_fresh)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = kv_blk_set_fresh ⇒ kv_blk_is_fresh +
    +
    [Calls]
    • >>   kv_blk_is_fresh +
    • >>   kv_blk_freesz_set +
    • >>   kv_blk_flags_set +
    +
    [Called By]
    • >>   kv_item_walkthru +
    • >>   kv_blk_format +
    + +

    kv_blk_set_inuse (Thumb, 34 bytes, Stack size 8 bytes, tos_kv.o(i.kv_blk_set_inuse)) +

    [Stack]

    • Max Depth = 20
    • Call Chain = kv_blk_set_inuse ⇒ kv_blk_flags_add +
    +
    [Calls]
    • >>   kv_blk_is_inuse +
    • >>   kv_blk_flags_add +
    +
    [Called By]
    • >>   kv_item_walkthru +
    • >>   kv_item_save +
    • >>   kv_gc +
    + +

    kv_block_walkthru (Thumb, 666 bytes, Stack size 40 bytes, tos_kv.o(i.kv_block_walkthru)) +

    [Stack]

    • Max Depth = 184 + Unknown Stack Size +
    • Call Chain = kv_block_walkthru ⇒ kv_item_body_read ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   tos_mmheap_alloc +
    • >>   kv_u8_disp +
    • >>   kv_item_hdr_verify +
    • >>   kv_item_hdr_read +
    • >>   kv_item_free +
    • >>   kv_item_body_verify +
    • >>   kv_item_body_read +
    • >>   __2printf +
    +
    [Called By]
    • >>   tos_kv_walkthru +
    + +

    kv_checksum_crc8 (Thumb, 58 bytes, Stack size 12 bytes, tos_kv.o(i.kv_checksum_crc8)) +

    [Stack]

    • Max Depth = 12
    • Call Chain = kv_checksum_crc8 +
    +
    [Called By]
    • >>   kv_item_do_save +
    • >>   kv_item_body_verify +
    + +

    kv_do_gc (Thumb, 18 bytes, Stack size 8 bytes, tos_kv.o(i.kv_do_gc)) +

    [Stack]

    • Max Depth = 176 + Unknown Stack Size +
    • Call Chain = kv_do_gc ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_item_walkthru +
    +
    [Called By]
    • >>   kv_gc +
    + +

    kv_flash_blk_erase (Thumb, 22 bytes, Stack size 8 bytes, tos_kv.o(i.kv_flash_blk_erase)) +

    [Stack]

    • Max Depth = 24
    • Call Chain = kv_flash_blk_erase ⇒ kv_flash_erase +
    +
    [Calls]
    • >>   kv_flash_erase +
    +
    [Called By]
    • >>   kv_blk_format +
    + +

    kv_flash_ctl_init (Thumb, 78 bytes, Stack size 12 bytes, tos_kv.o(i.kv_flash_ctl_init)) +

    [Stack]

    • Max Depth = 12
    • Call Chain = kv_flash_ctl_init +
    +
    [Called By]
    • >>   tos_kv_init +
    + +

    kv_flash_erase (Thumb, 28 bytes, Stack size 16 bytes, tos_kv.o(i.kv_flash_erase)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = kv_flash_erase +
    +
    [Called By]
    • >>   kv_flash_blk_erase +
    + +

    kv_flash_read (Thumb, 32 bytes, Stack size 16 bytes, tos_kv.o(i.kv_flash_read)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = kv_flash_read +
    +
    [Called By]
    • >>   kv_item_try_delete +
    • >>   kv_item_hdr_read +
    • >>   kv_item_body_read +
    • >>   kv_blk_hdr_read +
    + +

    kv_flash_write (Thumb, 32 bytes, Stack size 16 bytes, tos_kv.o(i.kv_flash_write)) +

    [Stack]

    • Max Depth = 16
    • Call Chain = kv_flash_write +
    +
    [Called By]
    • >>   kv_item_write +
    • >>   kv_item_hdr_write +
    • >>   kv_flash_wunit_modify +
    + +

    kv_flash_wunit_modify (Thumb, 18 bytes, Stack size 24 bytes, tos_kv.o(i.kv_flash_wunit_modify)) +

    [Stack]

    • Max Depth = 40
    • Call Chain = kv_flash_wunit_modify ⇒ kv_flash_write +
    +
    [Calls]
    • >>   kv_flash_write +
    +
    [Called By]
    • >>   kv_item_hdr_write +
    • >>   kv_item_do_delete +
    • >>   kv_blk_format +
    + +

    kv_gc (Thumb, 162 bytes, Stack size 24 bytes, tos_kv.o(i.kv_gc)) +

    [Stack]

    • Max Depth = 216 + Unknown Stack Size +
    • Call Chain = kv_gc ⇒ kv_mgr_blk_index_rebuild ⇒ kv_mgr_index_build ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_mgr_blk_index_rebuild +
    • >>   kv_do_gc +
    • >>   kv_blk_set_inuse +
    • >>   kv_blk_set_bad +
    • >>   kv_blk_reset_inuse +
    • >>   kv_blk_reset_fresh +
    • >>   kv_blk_next_fresh +
    • >>   kv_blk_is_full +
    • >>   kv_blk_format +
    • >>   kv_blk_flags_get +
    +
    [Called By]
    • >>   kv_blk_search_suitable +
    + +

    kv_item_body_read (Thumb, 108 bytes, Stack size 16 bytes, tos_kv.o(i.kv_item_body_read)) +

    [Stack]

    • Max Depth = 144 + Unknown Stack Size +
    • Call Chain = kv_item_body_read ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   tos_mmheap_free +
    • >>   tos_mmheap_alloc +
    • >>   kv_flash_read +
    +
    [Called By]
    • >>   kv_item_is_moved +
    • >>   kv_item_do_recovery +
    • >>   kv_item_do_gc +
    • >>   kv_item_do_fetch_new_copy +
    • >>   kv_item_do_fetch +
    • >>   kv_block_walkthru +
    + +

    kv_item_body_verify (Thumb, 30 bytes, Stack size 8 bytes, tos_kv.o(i.kv_item_body_verify)) +

    [Stack]

    • Max Depth = 20
    • Call Chain = kv_item_body_verify ⇒ kv_checksum_crc8 +
    +
    [Calls]
    • >>   kv_checksum_crc8 +
    +
    [Called By]
    • >>   kv_item_do_recovery +
    • >>   kv_block_walkthru +
    + +

    kv_item_delete (Thumb, 12 bytes, Stack size 8 bytes, tos_kv.o(i.kv_item_delete)) +

    [Stack]

    • Max Depth = 64
    • Call Chain = kv_item_delete ⇒ kv_item_delete_aux ⇒ kv_item_do_delete ⇒ kv_flash_wunit_modify ⇒ kv_flash_write +
    +
    [Calls]
    • >>   kv_item_delete_aux +
    +
    [Called By]
    • >>   tos_kv_del +
    • >>   kv_item_update +
    • >>   kv_item_do_recovery +
    + +

    kv_item_delete_aux (Thumb, 56 bytes, Stack size 8 bytes, tos_kv.o(i.kv_item_delete_aux)) +

    [Stack]

    • Max Depth = 56
    • Call Chain = kv_item_delete_aux ⇒ kv_item_do_delete ⇒ kv_flash_wunit_modify ⇒ kv_flash_write +
    +
    [Calls]
    • >>   kv_item_do_delete +
    • >>   kv_blk_set_dirty +
    +
    [Called By]
    • >>   kv_item_try_delete +
    • >>   kv_item_delete +
    + +

    kv_item_do_delete (Thumb, 18 bytes, Stack size 8 bytes, tos_kv.o(i.kv_item_do_delete)) +

    [Stack]

    • Max Depth = 48
    • Call Chain = kv_item_do_delete ⇒ kv_flash_wunit_modify ⇒ kv_flash_write +
    +
    [Calls]
    • >>   kv_flash_wunit_modify +
    +
    [Called By]
    • >>   kv_item_walkthru +
    • >>   kv_item_delete_aux +
    + +

    kv_item_do_fetch (Thumb, 60 bytes, Stack size 24 bytes, tos_kv.o(i.kv_item_do_fetch)) +

    [Stack]

    • Max Depth = 168 + Unknown Stack Size +
    • Call Chain = kv_item_do_fetch ⇒ kv_item_body_read ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_item_body_read +
    • >>   memcmp +
    • >>   strlen +
    +
    [Address Reference Count : 1]
    • tos_kv.o(i.kv_item_do_find) +
    +

    kv_item_do_fetch_new_copy (Thumb, 76 bytes, Stack size 40 bytes, tos_kv.o(i.kv_item_do_fetch_new_copy)) +

    [Stack]

    • Max Depth = 184 + Unknown Stack Size +
    • Call Chain = kv_item_do_fetch_new_copy ⇒ kv_item_body_read ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_item_body_read +
    • >>   memcmp +
    +
    [Address Reference Count : 1]
    • tos_kv.o(i.kv_item_do_find_new_copy) +
    +

    kv_item_do_find (Thumb, 28 bytes, Stack size 16 bytes, tos_kv.o(i.kv_item_do_find)) +

    [Stack]

    • Max Depth = 184 + Unknown Stack Size +
    • Call Chain = kv_item_do_find ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_item_walkthru +
    +
    [Called By]
    • >>   kv_item_find +
    + +

    kv_item_do_find_new_copy (Thumb, 28 bytes, Stack size 16 bytes, tos_kv.o(i.kv_item_do_find_new_copy)) +

    [Stack]

    • Max Depth = 184 + Unknown Stack Size +
    • Call Chain = kv_item_do_find_new_copy ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_item_walkthru +
    +
    [Called By]
    • >>   kv_item_find_new_copy +
    + +

    kv_item_do_gc (Thumb, 136 bytes, Stack size 24 bytes, tos_kv.o(i.kv_item_do_gc)) +

    [Stack]

    • Max Depth = 168 + Unknown Stack Size +
    • Call Chain = kv_item_do_gc ⇒ kv_item_body_read ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_item_write +
    • >>   kv_item_body_read +
    • >>   kv_blk_freesz_reduce +
    • >>   kv_blk_freesz_get +
    +
    [Address Reference Count : 1]
    • tos_kv.o(i.kv_do_gc) +
    +

    kv_item_do_recovery (Thumb, 78 bytes, Stack size 16 bytes, tos_kv.o(i.kv_item_do_recovery)) +

    [Stack]

    • Max Depth = 192 + Unknown Stack Size +
    • Call Chain = kv_item_do_recovery ⇒ kv_item_try_delete ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_item_try_delete +
    • >>   kv_item_delete +
    • >>   kv_item_body_verify +
    • >>   kv_item_body_read +
    +
    [Address Reference Count : 1]
    • tos_kv.o(i.kv_mgr_index_build) +
    +

    kv_item_do_save (Thumb, 152 bytes, Stack size 64 bytes, tos_kv.o(i.kv_item_do_save)) +

    [Stack]

    • Max Depth = 192 + Unknown Stack Size +
    • Call Chain = kv_item_do_save ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   tos_mmheap_free +
    • >>   tos_mmheap_alloc +
    • >>   kv_item_write +
    • >>   kv_checksum_crc8 +
    • >>   strlen +
    • >>   __aeabi_memclr +
    • >>   __aeabi_memcpy +
    +
    [Called By]
    • >>   kv_item_save +
    + +

    kv_item_find (Thumb, 74 bytes, Stack size 16 bytes, tos_kv.o(i.kv_item_find)) +

    [Stack]

    • Max Depth = 200 + Unknown Stack Size +
    • Call Chain = kv_item_find ⇒ kv_item_do_find ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_item_do_find +
    • >>   kv_blk_is_fresh +
    • >>   kv_blk_is_bad +
    +
    [Called By]
    • >>   tos_kv_set +
    • >>   tos_kv_has_key +
    • >>   tos_kv_get +
    • >>   tos_kv_del +
    + +

    kv_item_find_new_copy (Thumb, 74 bytes, Stack size 16 bytes, tos_kv.o(i.kv_item_find_new_copy)) +

    [Stack]

    • Max Depth = 200 + Unknown Stack Size +
    • Call Chain = kv_item_find_new_copy ⇒ kv_item_do_find_new_copy ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_item_do_find_new_copy +
    • >>   kv_blk_is_fresh +
    • >>   kv_blk_is_bad +
    +
    [Called By]
    • >>   kv_item_fix +
    + +

    kv_item_fix (Thumb, 32 bytes, Stack size 16 bytes, tos_kv.o(i.kv_item_fix)) +

    [Stack]

    • Max Depth = 216 + Unknown Stack Size +
    • Call Chain = kv_item_fix ⇒ kv_item_find_new_copy ⇒ kv_item_do_find_new_copy ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_item_free +
    • >>   kv_item_find_new_copy +
    +
    [Called By]
    • >>   kv_item_save +
    + +

    kv_item_free (Thumb, 22 bytes, Stack size 8 bytes, tos_kv.o(i.kv_item_free)) +

    [Stack]

    • Max Depth = 112 + Unknown Stack Size +
    • Call Chain = kv_item_free ⇒ tos_mmheap_free ⇒ blk_merge_prev ⇒ blk_remove ⇒ mapping_insert ⇒ __fls ⇒ generic_fls ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   tos_mmheap_free +
    +
    [Called By]
    • >>   tos_kv_set +
    • >>   tos_kv_get +
    • >>   tos_kv_del +
    • >>   kv_item_walkthru +
    • >>   kv_item_fix +
    • >>   kv_block_walkthru +
    + +

    kv_item_hdr_read (Thumb, 18 bytes, Stack size 16 bytes, tos_kv.o(i.kv_item_hdr_read)) +

    [Stack]

    • Max Depth = 32
    • Call Chain = kv_item_hdr_read ⇒ kv_flash_read +
    +
    [Calls]
    • >>   kv_flash_read +
    +
    [Called By]
    • >>   kv_item_walkthru +
    • >>   kv_item_try_delete +
    • >>   kv_item_is_moved +
    • >>   kv_block_walkthru +
    + +

    kv_item_hdr_verify (Thumb, 144 bytes, Stack size 20 bytes, tos_kv.o(i.kv_item_hdr_verify)) +

    [Stack]

    • Max Depth = 20
    • Call Chain = kv_item_hdr_verify +
    +
    [Called By]
    • >>   kv_item_walkthru +
    • >>   kv_block_walkthru +
    + +

    kv_item_hdr_write (Thumb, 62 bytes, Stack size 24 bytes, tos_kv.o(i.kv_item_hdr_write)) +

    [Stack]

    • Max Depth = 64
    • Call Chain = kv_item_hdr_write ⇒ kv_flash_wunit_modify ⇒ kv_flash_write +
    +
    [Calls]
    • >>   kv_flash_wunit_modify +
    • >>   kv_flash_write +
    +
    [Called By]
    • >>   kv_item_write +
    + +

    kv_item_is_moved (Thumb, 90 bytes, Stack size 48 bytes, tos_kv.o(i.kv_item_is_moved)) +

    [Stack]

    • Max Depth = 192 + Unknown Stack Size +
    • Call Chain = kv_item_is_moved ⇒ kv_item_body_read ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   tos_mmheap_free +
    • >>   kv_item_hdr_read +
    • >>   kv_item_body_read +
    • >>   memcmp +
    +
    [Called By]
    • >>   kv_item_save +
    + +

    kv_item_save (Thumb, 208 bytes, Stack size 48 bytes, tos_kv.o(i.kv_item_save)) +

    [Stack]

    • Max Depth = 280 + Unknown Stack Size +
    • Call Chain = kv_item_save ⇒ kv_blk_search_suitable ⇒ kv_gc ⇒ kv_mgr_blk_index_rebuild ⇒ kv_mgr_index_build ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_item_is_moved +
    • >>   kv_item_fix +
    • >>   kv_item_do_save +
    • >>   kv_blk_set_inuse +
    • >>   kv_blk_search_suitable +
    • >>   kv_blk_reset_inuse +
    • >>   kv_blk_reset_fresh +
    • >>   kv_blk_is_full +
    • >>   kv_blk_is_fresh +
    • >>   kv_blk_freesz_reduce +
    • >>   kv_blk_freesz_get +
    • >>   strlen +
    +
    [Called By]
    • >>   tos_kv_set +
    • >>   kv_item_update +
    + +

    kv_item_try_delete (Thumb, 174 bytes, Stack size 48 bytes, tos_kv.o(i.kv_item_try_delete)) +

    [Stack]

    • Max Depth = 176 + Unknown Stack Size +
    • Call Chain = kv_item_try_delete ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   tos_mmheap_free +
    • >>   tos_mmheap_alloc +
    • >>   kv_item_hdr_read +
    • >>   kv_item_delete_aux +
    • >>   kv_flash_read +
    • >>   memcmp +
    +
    [Called By]
    • >>   kv_item_do_recovery +
    + +

    kv_item_update (Thumb, 58 bytes, Stack size 24 bytes, tos_kv.o(i.kv_item_update)) +

    [Stack]

    • Max Depth = 304 + Unknown Stack Size +
    • Call Chain = kv_item_update ⇒ kv_item_save ⇒ kv_blk_search_suitable ⇒ kv_gc ⇒ kv_mgr_blk_index_rebuild ⇒ kv_mgr_index_build ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_item_value_is_match +
    • >>   kv_item_save +
    • >>   kv_item_delete +
    +
    [Called By]
    • >>   tos_kv_set +
    + +

    kv_item_value_is_match (Thumb, 50 bytes, Stack size 24 bytes, tos_kv.o(i.kv_item_value_is_match)) +

    [Stack]

    • Max Depth = 36
    • Call Chain = kv_item_value_is_match ⇒ memcmp +
    +
    [Calls]
    • >>   memcmp +
    +
    [Called By]
    • >>   kv_item_update +
    + +

    kv_item_walkthru (Thumb, 486 bytes, Stack size 40 bytes, tos_kv.o(i.kv_item_walkthru)) +

    [Stack]

    • Max Depth = 168 + Unknown Stack Size +
    • Call Chain = kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   tos_mmheap_alloc +
    • >>   kv_item_hdr_verify +
    • >>   kv_item_hdr_read +
    • >>   kv_item_free +
    • >>   kv_item_do_delete +
    • >>   kv_blk_set_inuse +
    • >>   kv_blk_set_fresh +
    • >>   kv_blk_set_dirty +
    • >>   kv_blk_reset_inuse +
    • >>   kv_blk_freesz_set +
    +
    [Called By]
    • >>   kv_mgr_index_build +
    • >>   kv_item_do_find_new_copy +
    • >>   kv_item_do_find +
    • >>   kv_do_gc +
    + +

    kv_item_write (Thumb, 54 bytes, Stack size 24 bytes, tos_kv.o(i.kv_item_write)) +

    [Stack]

    • Max Depth = 88
    • Call Chain = kv_item_write ⇒ kv_item_hdr_write ⇒ kv_flash_wunit_modify ⇒ kv_flash_write +
    +
    [Calls]
    • >>   kv_item_hdr_write +
    • >>   kv_flash_write +
    +
    [Called By]
    • >>   kv_item_do_save +
    • >>   kv_item_do_gc +
    + +

    kv_lock (Thumb, 16 bytes, Stack size 8 bytes, tos_kv.o(i.kv_lock)) +

    [Stack]

    • Max Depth = 144 + Unknown Stack Size +
    • Call Chain = kv_lock ⇒ tos_mutex_pend ⇒ tos_mutex_pend_timed ⇒ pend_task_block ⇒ tick_list_add ⇒ tick_task_place ⇒ tos_cpu_cpsr_save +
    +
    [Calls]
    • >>   tos_knl_is_running +
    • >>   tos_mutex_pend +
    +
    [Called By]
    • >>   tos_kv_set +
    • >>   tos_kv_has_key +
    • >>   tos_kv_get +
    • >>   tos_kv_del +
    + +

    kv_mgr_blk_index_rebuild (Thumb, 88 bytes, Stack size 16 bytes, tos_kv.o(i.kv_mgr_blk_index_rebuild)) +

    [Stack]

    • Max Depth = 192 + Unknown Stack Size +
    • Call Chain = kv_mgr_blk_index_rebuild ⇒ kv_mgr_index_build ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_mgr_index_build +
    • >>   kv_blk_is_hanging +
    • >>   kv_blk_flags_rmv +
    +
    [Called By]
    • >>   kv_mgr_workspace_locate +
    • >>   kv_gc +
    + +

    kv_mgr_ctl_build (Thumb, 128 bytes, Stack size 24 bytes, tos_kv.o(i.kv_mgr_ctl_build)) +

    [Stack]

    • Max Depth = 200 + Unknown Stack Size +
    • Call Chain = kv_mgr_ctl_build ⇒ kv_mgr_index_build ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_mgr_index_build +
    • >>   kv_blk_set_bad +
    • >>   kv_blk_is_hanging +
    • >>   kv_blk_hdr_read +
    • >>   kv_blk_format +
    • >>   kv_blk_flags_add +
    +
    [Called By]
    • >>   tos_kv_init +
    + +

    kv_mgr_ctl_init (Thumb, 72 bytes, Stack size 8 bytes, tos_kv.o(i.kv_mgr_ctl_init)) +

    [Stack]

    • Max Depth = 136 + Unknown Stack Size +
    • Call Chain = kv_mgr_ctl_init ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   tos_mmheap_alloc +
    • >>   tos_mutex_create +
    • >>   __aeabi_memclr4 +
    +
    [Called By]
    • >>   tos_kv_init +
    + +

    kv_mgr_index_build (Thumb, 18 bytes, Stack size 8 bytes, tos_kv.o(i.kv_mgr_index_build)) +

    [Stack]

    • Max Depth = 176 + Unknown Stack Size +
    • Call Chain = kv_mgr_index_build ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_item_walkthru +
    +
    [Called By]
    • >>   kv_mgr_ctl_build +
    • >>   kv_mgr_blk_index_rebuild +
    + +

    kv_mgr_workspace_locate (Thumb, 102 bytes, Stack size 8 bytes, tos_kv.o(i.kv_mgr_workspace_locate)) +

    [Stack]

    • Max Depth = 200 + Unknown Stack Size +
    • Call Chain = kv_mgr_workspace_locate ⇒ kv_mgr_blk_index_rebuild ⇒ kv_mgr_index_build ⇒ kv_item_walkthru ⇒ tos_mmheap_alloc ⇒ blk_prepare_used ⇒ blk_trim_free ⇒ blk_split ⇒ blk_mark_as_free ⇒ blk_link_next ⇒ blk_next +
    +
    [Calls]
    • >>   kv_mgr_blk_index_rebuild +
    • >>   kv_blk_is_inuse +
    • >>   kv_blk_is_fresh +
    +
    [Called By]
    • >>   tos_kv_init +
    + +

    kv_param_verify (Thumb, 60 bytes, Stack size 8 bytes, tos_kv.o(i.kv_param_verify)) +

    [Stack]

    • Max Depth = 8
    • Call Chain = kv_param_verify +
    +
    [Called By]
    • >>   tos_kv_init +
    + +

    kv_u8_disp (Thumb, 40 bytes, Stack size 16 bytes, tos_kv.o(i.kv_u8_disp)) +

    [Stack]

    • Max Depth = 40
    • Call Chain = kv_u8_disp ⇒ __2printf +
    +
    [Calls]
    • >>   __2printf +
    +
    [Called By]
    • >>   kv_block_walkthru +
    + +

    kv_unlock (Thumb, 16 bytes, Stack size 8 bytes, tos_kv.o(i.kv_unlock)) +

    [Stack]

    • Max Depth = 120 + Unknown Stack Size +
    • Call Chain = kv_unlock ⇒ tos_mutex_post ⇒ mutex_old_owner_release ⇒ tos_task_prio_change ⇒ readyqueue_remove ⇒ readyqueue_prio_highest_get ⇒ tos_cpu_clz +
    +
    [Calls]
    • >>   tos_knl_is_running +
    • >>   tos_mutex_post +
    +
    [Called By]
    • >>   tos_kv_set +
    • >>   tos_kv_has_key +
    • >>   tos_kv_get +
    • >>   tos_kv_del +
    + +

    _printf_core (Thumb, 658 bytes, Stack size 104 bytes, printf5.o(i._printf_core), UNUSED) +

    [Calls]

    • >>   __aeabi_uldivmod +
    +
    [Called By]
    • >>   __0printf$5 +
    +

    +

    +Undefined Global Symbols +


    diff --git a/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/obj/TencentOS_tiny.sct b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/obj/TencentOS_tiny.sct new file mode 100644 index 00000000..66acf7f8 --- /dev/null +++ b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/obj/TencentOS_tiny.sct @@ -0,0 +1,16 @@ +; ************************************************************* +; *** Scatter-Loading Description File generated by uVision *** +; ************************************************************* + +LR_IROM1 0x08000000 0x00040000 { ; load region size_region + ER_IROM1 0x08000000 0x00040000 { ; load address = execution address + *.o (RESET, +First) + *(InRoot$$Sections) + .ANY (+RO) + .ANY (+XO) + } + RW_IRAM1 0x20000000 0x00010000 { ; RW data + .ANY (+RW +ZI) + } +} + diff --git a/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/startup_stm32l431xx.s b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/startup_stm32l431xx.s new file mode 100644 index 00000000..6a5c15a5 --- /dev/null +++ b/board/TencentOS_tiny_EVB_MX_Plus/KEIL/kv/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/fs/kv/include/tos_kv.h b/components/fs/kv/include/tos_kv.h new file mode 100644 index 00000000..2caf0d47 --- /dev/null +++ b/components/fs/kv/include/tos_kv.h @@ -0,0 +1,333 @@ +/*---------------------------------------------------------------------------- + * Tencent is pleased to support the open source community by making TencentOS + * available. + * + * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * If you have downloaded a copy of the TencentOS binary from Tencent, please + * note that the TencentOS binary is licensed under the BSD 3-Clause License. + * + * If you have downloaded a copy of the TencentOS source code from Tencent, + * please note that TencentOS source code is licensed under the BSD 3-Clause + * License, except for the third-party components listed below which are + * subject to different license terms. Your integration of TencentOS into your + * own projects may require compliance with the BSD 3-Clause License, as well + * as the other licenses applicable to the third-party components included + * within TencentOS. + *---------------------------------------------------------------------------*/ + +#ifndef _TOS_KV_H_ +#define _TOS_KV_H_ + +#include "tos.h" +#include "tos_kv_err.h" +#include "tos_kv_flash.h" + +/* the max length of write unit, DOUBLEWORD, 64-bit + a better way is to change kv_wunit_t according the the flash program type by precompile, + if to do this, should let user config the flash program type as a macro, and that is not so friendly. + we typedef kv_wunit_t as uint64_t, so the user can focus on the code rather than how to use kv. + (althrough there may cause some waste of flash space, just a little, but much more comfortable for coding) + */ +typedef uint64_t kv_wunit_t; + +typedef uint8_t kv_byte_t; // byte +typedef uint16_t kv_hword_t; // half word +typedef uint32_t kv_word_t; // word +typedef uint64_t kv_dword_t; // double word + +/* + add delete no more space + fresh -----> inuse --------> dirty | inuse ---------------> dirty + + add no more space + fresh -----> inuse ---------------> NONE + + if bad, probably the flash block is broken, no more try to use. + if hanging, maybe another chance to rebuild index. + there is a situation: dirty | hanging +*/ +#define KV_BLK_FLAG_FRESH 0x01 /* a totally virgin block */ +#define KV_BLK_FLAG_INUSE 0x02 /* in-use */ +#define KV_BLK_FLAG_DIRTY 0x04 /* has discarded item inside */ +#define KV_BLK_FLAG_BAD 0x08 /* bad block, maybe device error */ +#define KV_BLK_FLAG_HANGING 0x10 /* index building failed, we mark a hanging flag here, and will give another chance to do a retry */ + +#define KV_FLASH_START (kv_ctl.flash_ctl.flash_start) +#define KV_FLASH_SIZE (kv_ctl.flash_ctl.flash_size) +#define KV_FLASH_END (KV_FLASH_START + KV_FLASH_SIZE) +#define KV_FLASH_SECTOR_SIZE_LOG2 (kv_ctl.flash_ctl.sector_size_log2) +#define KV_FLASH_SECTOR_SIZE (1 << KV_FLASH_SECTOR_SIZE_LOG2) +#define KV_FLASH_WRITE_ALIGN (kv_ctl.flash_ctl.flash_write_align) + +#define KV_FLASH_WRITE ((kv_flash_write_t)(kv_ctl.flash_ctl.flash_drv.write)) +#define KV_FLASH_READ ((kv_flash_read_t)(kv_ctl.flash_ctl.flash_drv.read)) +#define KV_FLASH_ERASE ((kv_flash_erase_t)(kv_ctl.flash_ctl.flash_drv.erase)) + +#define KV_IS_ALINGED(v, align) ((v) % (align) == 0) +#define KV_IS_ALINGED_LOG2(v, align_log2) KV_IS_ALINGED(v, (1 << (align_log2))) +#define KV_ALIGN_UP(v, align) (((v) + ((align) - 1)) & ~((align) - 1)) +#define KV_ALIGN_DOWN(v, align) ((v) - ((v) & ((align) - 1))) +#define KV_ADDR_OF_FIELD(addr, type, field) (addr + TOS_OFFSET_OF_FIELD(type, field)) + +#define KV_ALIGNED_SIZE(len) KV_ALIGN_UP(len, KV_FLASH_WRITE_ALIGN) + +#define KV_MGR_LOCK (&kv_ctl.mgr_ctl.kv_lock) +#define KV_MGR_BLK_NUM_FRESH (kv_ctl.mgr_ctl.blk_info.num_fresh) +#define KV_MGR_BLK_NUM_INUSE (kv_ctl.mgr_ctl.blk_info.num_inuse) +#define KV_MGR_BLK_NUM_HANGING (kv_ctl.mgr_ctl.blk_info.num_hanging) +#define KV_MGR_BLK_NUM_TOTAL (kv_ctl.mgr_ctl.blk_info.num_total) +#define KV_MGR_BLK_DETAIL (kv_ctl.mgr_ctl.blk_info.blk_detail) +#define KV_MGR_WORKSPACE (kv_ctl.mgr_ctl.workspace) + +#define KV_NO_WRITEABLE_BLK() (KV_MGR_BLK_NUM_INUSE == 0 && KV_MGR_BLK_NUM_FRESH == 0) + +#define KV_ITEM_HDR_MAGIC 0xABCD1234DCBA4321 +#define KV_ITEM_DISCARDED 0x0F0F0F0F0F0F0F0F +#define KV_ITEM_IS_DISCARDED(item_hdr) ((item_hdr)->discarded_flag == KV_ITEM_DISCARDED) +#define KV_ITEM_IS_LEGAL(item_hdr) ((item_hdr)->magic == KV_ITEM_HDR_MAGIC) +#define KV_ITEM_IS_FRESH(item_hdr) ((item_hdr)->magic == (kv_wunit_t)-1 && \ + (item_hdr)->discarded_flag == (kv_wunit_t)-1 && \ + (item_hdr)->checksum == (uint8_t)-1 && \ + (item_hdr)->k_len == (uint8_t)-1 && \ + (item_hdr)->v_len == (uint16_t)-1 && \ + (item_hdr)->prev_pos == (uint32_t)-1) + +#define KV_ITEM_ADDR2BLK(item_start) (KV_ALIGN_DOWN((item_start) - KV_FLASH_START, KV_BLK_SIZE) + KV_FLASH_START) +#define KV_ITEM_HDR_SIZE KV_ALIGNED_SIZE(sizeof(kv_item_hdr_t)) +#define KV_ITEM_BODY_SIZE(k_len, v_len) KV_ALIGNED_SIZE(k_len + v_len) +#define KV_ITEM_SIZE(k_len, v_len) (KV_ITEM_HDR_SIZE + KV_ITEM_BODY_SIZE(k_len, v_len)) +#define KV_ITEM_SIZE_OF_ITEM(item) KV_ITEM_SIZE(item->hdr.k_len, item->hdr.v_len) +#define KV_ITEM_SIZE_OF_BODY(item) KV_ITEM_BODY_SIZE(item->hdr.k_len, item->hdr.v_len) +#define KV_ITEM_ADDR_OF_BODY(item) (item->pos + KV_ITEM_HDR_SIZE) + +#define KV_BLK_HDR_MAGIC 0x1234ABCD4321DCBA +#define KV_BLK_IS_LEGAL(blk_hdr) ((blk_hdr)->magic == KV_BLK_HDR_MAGIC) +#define KV_BLK_INVALID ((uint32_t)-1) +#define KV_BLK_HDR_SIZE KV_ALIGNED_SIZE(sizeof(kv_blk_hdr_t)) +#define KV_BLK_SIZE (KV_FLASH_SECTOR_SIZE) +#define KV_BLK_FRESH_SIZE (KV_BLK_SIZE - KV_BLK_HDR_SIZE) +#define KV_BLK_END(blk_start) (blk_start + KV_BLK_SIZE) +#define KV_BLK_USABLE_ADDR(blk_start) (KV_BLK_END(blk_start) - kv_blk_freesz_get(blk_start)) +#define KV_BLK_ADDR2IDX(blk_start) ((blk_start - KV_FLASH_START) / KV_BLK_SIZE) +#define KV_BLK_FIRST_ITEM(blk_start) (blk_start + KV_BLK_HDR_SIZE) +#define KV_BLK_NEXT(blk_start) (blk_start + KV_BLK_SIZE >= KV_FLASH_END ? KV_FLASH_START : blk_start + KV_BLK_SIZE) + +#define KV_BLK_FOREACH_FROM(cur_blk, start_blk) \ + for (cur_blk = KV_BLK_NEXT(start_blk); \ + cur_blk != start_blk; \ + cur_blk = KV_BLK_NEXT(cur_blk)) + +#define KV_BLK_FOREACH(cur_blk) \ + for (cur_blk = KV_FLASH_START; \ + cur_blk < KV_FLASH_END; \ + cur_blk += KV_BLK_SIZE) + +typedef struct kv_flash_control_st { + uint8_t sector_size_log2; + uint8_t flash_write_align; + uint32_t flash_start; + uint32_t flash_size; + + kv_flash_drv_t flash_drv; +} kv_flash_ctl_t; + +typedef struct kv_blk_detail_st { + uint8_t blk_flags; /*< flags indicating the status of the blk, see KV_BLK_FLAG_* */ + uint32_t free_size; /*< how many usable flash left */ +} kv_blk_detail_t; + +typedef struct kv_blk_info_st { + uint16_t num_inuse; + uint16_t num_fresh; + uint16_t num_hanging; + uint16_t num_total; + + kv_blk_detail_t *blk_detail; +} kv_blk_info_t; + +typedef struct kv_manager_control_st { + uint32_t workspace; + kv_blk_info_t blk_info; + + k_mutex_t kv_lock; +} kv_mgr_ctl_t; + +typedef struct kv_control_st { + kv_flash_ctl_t flash_ctl; + kv_mgr_ctl_t mgr_ctl; +} kv_ctl_t; + +typedef struct kv_block_header_st { + kv_wunit_t magic; /*< is this block formatted? */ +} __PACKED__ kv_blk_hdr_t; + +typedef struct kv_item_header_st { + kv_wunit_t discarded_flag; /*< is this item a discarded one, deleted or updated */ + kv_wunit_t magic; /*< for item header integrity verification */ + uint8_t checksum; /*< checksum for key/value buffer */ + uint8_t k_len; /*< key length */ + uint16_t v_len; /*< value length */ + uint32_t prev_pos; /*< previous position of this item + if meet a power down while updating an item, and we have saved the new item, + but do not get a chance to delete the old one(we have two copy of the item with + the same key on flash), we should do the real delete when system is power on next time */ +} __PACKED__ kv_item_hdr_t; + +typedef struct kv_item_st { + kv_item_hdr_t hdr; /*< item header */ + uint32_t pos; /*< where this item is */ + uint8_t *body; /*< item body: key/value buffer */ +} kv_item_t; + +__STATIC__ kv_ctl_t kv_ctl; + +__STATIC_INLINE__ void kv_blk_freesz_set(uint32_t blk_start, uint32_t free_size) +{ + KV_MGR_BLK_DETAIL[KV_BLK_ADDR2IDX(blk_start)].free_size = free_size; +} + +__STATIC_INLINE__ uint32_t kv_blk_freesz_get(uint32_t blk_start) +{ + return KV_MGR_BLK_DETAIL[KV_BLK_ADDR2IDX(blk_start)].free_size; +} + +__STATIC_INLINE__ void kv_blk_freesz_reduce(uint32_t blk_start, uint32_t size_reduced) +{ + kv_blk_freesz_set(blk_start, kv_blk_freesz_get(blk_start) - size_reduced); +} + +__STATIC_INLINE__ int kv_blk_is_full(uint32_t blk_start) +{ + return kv_blk_freesz_get(blk_start) <= KV_ITEM_HDR_SIZE; +} + +__STATIC_INLINE__ void kv_blk_flags_set(uint32_t blk_start, uint8_t blk_flags) +{ + KV_MGR_BLK_DETAIL[KV_BLK_ADDR2IDX(blk_start)].blk_flags = blk_flags; +} + +__STATIC_INLINE__ uint8_t kv_blk_flags_get(uint32_t blk_start) +{ + return KV_MGR_BLK_DETAIL[KV_BLK_ADDR2IDX(blk_start)].blk_flags; +} + +__STATIC_INLINE__ void kv_blk_flags_add(uint32_t blk_start, uint8_t blk_flags) +{ + KV_MGR_BLK_DETAIL[KV_BLK_ADDR2IDX(blk_start)].blk_flags |= blk_flags; +} + +__STATIC_INLINE__ void kv_blk_flags_rmv(uint32_t blk_start, uint8_t blk_flags) +{ + KV_MGR_BLK_DETAIL[KV_BLK_ADDR2IDX(blk_start)].blk_flags &= ~blk_flags; +} + +__STATIC_INLINE__ int kv_blk_is_fresh(uint32_t blk_start) +{ + return kv_blk_flags_get(blk_start) & KV_BLK_FLAG_FRESH; +} + +__STATIC_INLINE__ int kv_blk_is_inuse(uint32_t blk_start) +{ + return kv_blk_flags_get(blk_start) & KV_BLK_FLAG_INUSE; +} + +__STATIC_INLINE__ int kv_blk_is_dirty(uint32_t blk_start) +{ + return kv_blk_flags_get(blk_start) & KV_BLK_FLAG_DIRTY; +} + +__STATIC_INLINE__ int kv_blk_is_bad(uint32_t blk_start) +{ + return kv_blk_flags_get(blk_start) & KV_BLK_FLAG_BAD; +} + +__STATIC_INLINE__ int kv_blk_is_hanging(uint32_t blk_start) +{ + return kv_blk_flags_get(blk_start) & KV_BLK_FLAG_HANGING; +} + +__STATIC_INLINE__ void kv_blk_set_fresh(uint32_t blk_start) +{ + if (!kv_blk_is_fresh(blk_start)) { + ++KV_MGR_BLK_NUM_FRESH; + } + + kv_blk_freesz_set(blk_start, KV_BLK_FRESH_SIZE); + kv_blk_flags_set(blk_start, KV_BLK_FLAG_FRESH); +} + +__STATIC_INLINE__ void kv_blk_set_inuse(uint32_t blk_start) +{ + if (!kv_blk_is_inuse(blk_start)) { + ++KV_MGR_BLK_NUM_INUSE; + } + + kv_blk_flags_add(blk_start, KV_BLK_FLAG_INUSE); +} + +__STATIC_INLINE__ void kv_blk_set_dirty(uint32_t blk_start) +{ + kv_blk_flags_add(blk_start, KV_BLK_FLAG_DIRTY); +} + +__STATIC_INLINE__ void kv_blk_set_bad(uint32_t blk_start) +{ + kv_blk_flags_set(blk_start, KV_BLK_FLAG_BAD); +} + +__STATIC_INLINE__ void kv_blk_set_hanging(uint32_t blk_start) +{ + if (!kv_blk_is_hanging(blk_start)) { + ++KV_MGR_BLK_NUM_HANGING; + } + + kv_blk_flags_add(blk_start, KV_BLK_FLAG_HANGING); +} + +__STATIC_INLINE__ void kv_blk_reset_fresh(uint32_t blk_start) +{ + if (kv_blk_is_fresh(blk_start)) { + --KV_MGR_BLK_NUM_FRESH; + } + + kv_blk_flags_rmv(blk_start, KV_BLK_FLAG_FRESH); +} + +__STATIC_INLINE__ void kv_blk_reset_inuse(uint32_t blk_start) +{ + if (kv_blk_is_inuse(blk_start)) { + --KV_MGR_BLK_NUM_INUSE; + } + + kv_blk_flags_rmv(blk_start, KV_BLK_FLAG_INUSE); +} + +__STATIC_INLINE__ void kv_blk_reset_hanging(uint32_t blk_start) +{ + if (kv_blk_is_hanging(blk_start)) { + --KV_MGR_BLK_NUM_HANGING; + } + + kv_blk_flags_rmv(blk_start, KV_BLK_FLAG_HANGING); +} + +typedef kv_err_t (*kv_item_walker_t)(kv_item_t *item, const void *patten); + +__API__ kv_err_t tos_kv_init(kv_flash_drv_t *flash_drv, kv_flash_prop_t *flash_prop); + +__API__ kv_err_t tos_kv_deinit(void); + +__API__ kv_err_t tos_kv_set(const char *key, const void *value, size_t v_len); + +__API__ kv_err_t tos_kv_get(const char *key, void *value_buf, size_t value_buf_size, size_t *v_len); + +__API__ int tos_kv_has_key(const char *key); + +__API__ kv_err_t tos_kv_del(const char *key); + +__DEBUG__ kv_err_t tos_kv_walkthru(void); + +__STATIC__ kv_err_t kv_gc(void); + +#endif /* _TOS_KV_H_ */ + diff --git a/components/fs/kv/include/tos_kv_err.h b/components/fs/kv/include/tos_kv_err.h new file mode 100644 index 00000000..62b4b4b8 --- /dev/null +++ b/components/fs/kv/include/tos_kv_err.h @@ -0,0 +1,52 @@ +/*---------------------------------------------------------------------------- + * Tencent is pleased to support the open source community by making TencentOS + * available. + * + * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * If you have downloaded a copy of the TencentOS binary from Tencent, please + * note that the TencentOS binary is licensed under the BSD 3-Clause License. + * + * If you have downloaded a copy of the TencentOS source code from Tencent, + * please note that TencentOS source code is licensed under the BSD 3-Clause + * License, except for the third-party components listed below which are + * subject to different license terms. Your integration of TencentOS into your + * own projects may require compliance with the BSD 3-Clause License, as well + * as the other licenses applicable to the third-party components included + * within TencentOS. + *---------------------------------------------------------------------------*/ + +#ifndef _TOS_KV_ERR_H_ +#define _TOS_KV_ERR_H_ + +typedef enum kv_err_en { + KV_ERR_NONE = 0u, + + KV_ERR_BUF_TOO_SHORT = 10u, + KV_ERR_BLK_STATUS_ERROR, + + KV_ERR_DATA_FETCH_FAILED = 20u, + + KV_ERR_FLASH_ERASE_FAILED = 30u, + KV_ERR_FLASH_READ_FAILED, + KV_ERR_FLASH_WRITE_FAILED, + + KV_ERR_GC_NOTHING = 40u, + + KV_ERR_INTERNAL_ERROR = 50u, + KV_ERR_INSUFFICIENT_SPACE, + KV_ERR_INVALID_PARAM, + KV_ERR_INVALID_ITEM, + + KV_ERR_NEXT_LOOP = 60u, + KV_ERR_NOT_EXIST, + KV_ERR_NO_WRITEABLE_BLK, + + KV_ERR_OUT_OF_MEMORY = 70u, + + KV_ERR_POS_FIX_FAILED =80u, + + KV_ERR_SIZE_EXCEEDED = 90u, +} kv_err_t; + +#endif /* _TOS_KV_ERR_H_ */ + diff --git a/components/fs/kv/include/tos_kv_flash.h b/components/fs/kv/include/tos_kv_flash.h new file mode 100644 index 00000000..1f209a77 --- /dev/null +++ b/components/fs/kv/include/tos_kv_flash.h @@ -0,0 +1,46 @@ +/*---------------------------------------------------------------------------- + * Tencent is pleased to support the open source community by making TencentOS + * available. + * + * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * If you have downloaded a copy of the TencentOS binary from Tencent, please + * note that the TencentOS binary is licensed under the BSD 3-Clause License. + * + * If you have downloaded a copy of the TencentOS source code from Tencent, + * please note that TencentOS source code is licensed under the BSD 3-Clause + * License, except for the third-party components listed below which are + * subject to different license terms. Your integration of TencentOS into your + * own projects may require compliance with the BSD 3-Clause License, as well + * as the other licenses applicable to the third-party components included + * within TencentOS. + *---------------------------------------------------------------------------*/ + +#ifndef _TOS_KV_FLASH_H_ +#define _TOS_KV_FLASH_H_ + +typedef enum kv_flash_program_type_en { + KV_FLASH_PROGRAM_TYPE_BYTE, /*!< Program byte (8-bit) at a specified address */ + KV_FLASH_PROGRAM_TYPE_HALFWORD, /*!< Program a half-word (16-bit) at a specified address */ + KV_FLASH_PROGRAM_TYPE_WORD, /*!< Program a word (32-bit) at a specified address */ + KV_FLASH_PROGRAM_TYPE_DOUBLEWORD, /*!< Program a double word (64-bit) at a specified address */ +} kv_flash_pgm_type_t; + +typedef int (*kv_flash_write_t)(uint32_t addr, const void *buf, size_t len); +typedef int (*kv_flash_read_t)(uint32_t addr, void *buf, size_t len); +typedef int (*kv_flash_erase_t)(uint32_t addr, size_t len); + +typedef struct kv_flash_drv_st { + kv_flash_write_t write; + kv_flash_read_t read; + kv_flash_erase_t erase; +} kv_flash_drv_t; + +typedef struct kv_flash_property_st { + uint8_t sector_size_log2; + kv_flash_pgm_type_t pgm_type; + uint32_t flash_start; + uint32_t flash_size; +} kv_flash_prop_t; + +#endif /* _TOS_KV_FLASH_H_ */ + diff --git a/components/fs/kv/tos_kv.c b/components/fs/kv/tos_kv.c new file mode 100644 index 00000000..450173d7 --- /dev/null +++ b/components/fs/kv/tos_kv.c @@ -0,0 +1,1348 @@ +/*---------------------------------------------------------------------------- + * Tencent is pleased to support the open source community by making TencentOS + * available. + * + * Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved. + * If you have downloaded a copy of the TencentOS binary from Tencent, please + * note that the TencentOS binary is licensed under the BSD 3-Clause License. + * + * If you have downloaded a copy of the TencentOS source code from Tencent, + * please note that TencentOS source code is licensed under the BSD 3-Clause + * License, except for the third-party components listed below which are + * subject to different license terms. Your integration of TencentOS into your + * own projects may require compliance with the BSD 3-Clause License, as well + * as the other licenses applicable to the third-party components included + * within TencentOS. + *---------------------------------------------------------------------------*/ + +#include "tos_kv.h" + +__STATIC__ kv_ctl_t kv_ctl; + +__STATIC__ uint8_t kv_checksum_crc8(uint8_t *buf, int nbyte) +{ + int i; + uint8_t crc = 0; + +#define POLY 0x31 +#define BIT_PER_BYTE 8 +#define TOP_BIT 0x80 + + while (nbyte--) { + crc ^= *buf++; + for (i = 0; i < BIT_PER_BYTE; ++i) { + if (crc & TOP_BIT) { + crc = (crc << 1) ^ POLY; + } else { + crc <<= 1; + } + } + crc &= 0xFF; + } + + return crc; +} + +__STATIC_INLINE__ void kv_lock(void) +{ + if (tos_knl_is_running()) { + tos_mutex_pend(KV_MGR_LOCK); + } +} + +__STATIC_INLINE__ void kv_unlock(void) +{ + if (tos_knl_is_running()) { + tos_mutex_post(KV_MGR_LOCK); + } +} + +__STATIC__ kv_err_t kv_flash_read(uint32_t addr, void *buf, size_t buf_size) +{ + if (KV_FLASH_READ(addr, buf, buf_size) < 0) { + return KV_ERR_FLASH_READ_FAILED; + } + return KV_ERR_NONE; +} + +__STATIC__ kv_err_t kv_flash_write(uint32_t addr, void *buf, size_t buf_size) +{ + if (KV_FLASH_WRITE(addr, buf, buf_size) < 0) { + return KV_ERR_FLASH_WRITE_FAILED; + } + return KV_ERR_NONE; +} + +__STATIC__ kv_err_t kv_flash_erase(uint32_t start, size_t len) +{ + if (KV_FLASH_ERASE(start, len) < 0) { + return KV_ERR_FLASH_ERASE_FAILED; + } + return KV_ERR_NONE; +} + +__STATIC__ kv_err_t kv_flash_wunit_modify(uint32_t addr, kv_wunit_t data) +{ + return kv_flash_write(addr, &data, sizeof(kv_wunit_t)); +} + +__STATIC__ kv_err_t kv_flash_blk_erase(uint32_t blk_start) +{ + return kv_flash_erase(blk_start, KV_BLK_SIZE); +} + +__STATIC__ void kv_flash_ctl_init(kv_flash_drv_t *flash_drv, kv_flash_prop_t *flash_prop) +{ + memcpy(&kv_ctl.flash_ctl.flash_drv, flash_drv, sizeof(kv_flash_drv_t)); + + KV_FLASH_START = flash_prop->flash_start; + KV_FLASH_SIZE = flash_prop->flash_size; + KV_FLASH_SECTOR_SIZE_LOG2 = flash_prop->sector_size_log2; + + if (flash_prop->pgm_type == KV_FLASH_PROGRAM_TYPE_BYTE) { + KV_FLASH_WRITE_ALIGN = sizeof(kv_byte_t); + } else if (flash_prop->pgm_type == KV_FLASH_PROGRAM_TYPE_HALFWORD) { + KV_FLASH_WRITE_ALIGN = sizeof(kv_hword_t); + } else if (flash_prop->pgm_type == KV_FLASH_PROGRAM_TYPE_WORD) { + KV_FLASH_WRITE_ALIGN = sizeof(kv_word_t); + } else if (flash_prop->pgm_type == KV_FLASH_PROGRAM_TYPE_DOUBLEWORD) { + KV_FLASH_WRITE_ALIGN = sizeof(kv_dword_t); + } +} + +__STATIC__ kv_err_t kv_blk_hdr_read(uint32_t blk_start, kv_blk_hdr_t *blk_hdr) +{ + return kv_flash_read(blk_start, blk_hdr, sizeof(kv_blk_hdr_t)); +} + +__STATIC__ kv_err_t kv_blk_format(uint32_t blk_start) +{ + if (kv_flash_blk_erase(blk_start) != KV_ERR_NONE) { + return KV_ERR_FLASH_ERASE_FAILED; + } + + if (kv_flash_wunit_modify(KV_ADDR_OF_FIELD(blk_start, kv_blk_hdr_t, magic), + KV_BLK_HDR_MAGIC) != KV_ERR_NONE) { + return KV_ERR_FLASH_WRITE_FAILED; + } + + kv_blk_set_fresh(blk_start); + + return KV_ERR_NONE; +} + +__STATIC__ uint32_t kv_blk_next_fresh(void) +{ + uint32_t cur_blk; + + // we try to find a fresh block behind current block(take all the blocks as a ring) + KV_BLK_FOREACH_FROM(cur_blk, KV_MGR_WORKSPACE) { + if (kv_blk_is_fresh(cur_blk)) { + return cur_blk; + } + } + + return KV_BLK_INVALID; +} + +__STATIC__ uint32_t kv_blk_search_inuse(uint32_t item_size) +{ + uint32_t cur_blk; + + KV_BLK_FOREACH_FROM(cur_blk, KV_MGR_WORKSPACE) { + if (kv_blk_is_inuse(cur_blk) && + kv_blk_freesz_get(cur_blk) >= item_size) { + return cur_blk; + } + } + + return KV_BLK_INVALID; +} + +__STATIC__ uint32_t kv_blk_search_suitable(uint32_t item_size) +{ + uint32_t the_blk; + + // no more writeable block, no need to do the next logic + if (KV_NO_WRITEABLE_BLK()) { + return KV_BLK_INVALID; + } + + // no more blocks with sufficient space, searched before + if (KV_MGR_WORKSPACE == KV_BLK_INVALID) { + return KV_BLK_INVALID; + } + + do { + // current workspace is just ok(workspace is kinda cache) + if (kv_blk_freesz_get(KV_MGR_WORKSPACE) >= item_size) { + return KV_MGR_WORKSPACE; + } + + // first we should search in inuse blocks + the_blk = kv_blk_search_inuse(item_size); + if (the_blk != KV_BLK_INVALID) { + KV_MGR_WORKSPACE = the_blk; + return KV_MGR_WORKSPACE; + } + + // no more fresh block, cannot allocate new block and cannot do gc neither. + if (KV_MGR_BLK_NUM_FRESH < 1) { + KV_MGR_WORKSPACE = KV_BLK_INVALID; + return KV_MGR_WORKSPACE; + } + + // if we have more than one fresh block, just give it out + if (KV_MGR_BLK_NUM_FRESH > 1) { + KV_MGR_WORKSPACE = kv_blk_next_fresh(); + return KV_MGR_WORKSPACE; + } + + // no more block inuse has sufficient space, and only one fresh block left, we should try gc + if (KV_MGR_BLK_NUM_FRESH == 1) { + if (kv_gc() != KV_ERR_NONE) { + // no more dirty block to gc, we give out the last precious fresh block(no more gc any more) + KV_MGR_WORKSPACE = kv_blk_next_fresh(); + return KV_MGR_WORKSPACE; + } + + /* if reach here, means we free some discarded space by gc, + we should try to search in inuse block again(the only fresh block left is so precious that we should + give it out as a last resort). + */ + } + } while (K_TRUE); +} + +__STATIC__ kv_err_t kv_item_hdr_write(uint32_t item_start, kv_item_hdr_t *item_hdr) +{ + if (kv_flash_write(KV_ADDR_OF_FIELD(item_start, kv_item_hdr_t, checksum), + &item_hdr->checksum, + KV_ITEM_HDR_SIZE - sizeof(kv_wunit_t) * 2) != KV_ERR_NONE) { + return KV_ERR_FLASH_WRITE_FAILED; + } + + return kv_flash_wunit_modify(KV_ADDR_OF_FIELD(item_start, kv_item_hdr_t, magic), + item_hdr->magic); +} + +__STATIC__ kv_err_t kv_item_write(uint32_t item_start, kv_item_hdr_t *item_hdr, const uint8_t *item_body, uint32_t item_body_len) +{ + /* + write item header first, then the kv buffer(item body). + if meat a power down while item writing, we wanna the consequence is predictable. + + *** for some norflash on-chip, no support for multi-times-write on the same write unit, + that means the 0xFF -> 0xEE -> 0xCC -> 0x44 trick actually does not work. + only write once on one single write unit. + so we do the header write except the kv_wunit_t domain(donnot waste the chance to modify + essential member, like discarded_flag, otherwise we have to "erase" before "write" again). + */ + + // write header, if a power down happen here, we can know it by header magic verify. + if (kv_item_hdr_write(item_start, item_hdr) != KV_ERR_NONE) { + return KV_ERR_FLASH_WRITE_FAILED; + } + + // if a power down happen here, we can know it by checksum verify. + + // write body(key & value) + return kv_flash_write(item_start + KV_ITEM_HDR_SIZE, (void *)item_body, item_body_len); +} + +__STATIC__ kv_err_t kv_item_hdr_read(uint32_t item_start, kv_item_hdr_t *item_hdr) +{ + return kv_flash_read(item_start, item_hdr, sizeof(kv_item_hdr_t)); +} + +__STATIC__ kv_err_t kv_item_body_read(kv_item_t *item) +{ + uint8_t *kv_buf = K_NULL; + + kv_buf = (uint8_t *)tos_mmheap_alloc(KV_ITEM_SIZE_OF_BODY(item)); + if (!kv_buf) { + return KV_ERR_OUT_OF_MEMORY; + } + + if (kv_flash_read(KV_ITEM_ADDR_OF_BODY(item), kv_buf, + KV_ITEM_SIZE_OF_BODY(item)) != KV_ERR_NONE) { + tos_mmheap_free(kv_buf); + return KV_ERR_FLASH_READ_FAILED; + } + + item->body = kv_buf; + + return KV_ERR_NONE; +} + +__STATIC__ kv_err_t kv_item_do_delete(uint32_t item_start) +{ + // set the discarded_flag on the flash + return kv_flash_wunit_modify(KV_ADDR_OF_FIELD(item_start, kv_item_hdr_t, discarded_flag), KV_ITEM_DISCARDED); +} + +__STATIC__ kv_err_t kv_item_delete_aux(uint32_t item_start) +{ + if (kv_item_do_delete(item_start) != KV_ERR_NONE) { + return KV_ERR_FLASH_WRITE_FAILED; + } + + kv_blk_set_dirty(KV_ITEM_ADDR2BLK(item_start)); + + return KV_ERR_NONE; +} + +__STATIC__ kv_err_t kv_item_delete(kv_item_t *item) +{ + return kv_item_delete_aux(item->pos); +} + +__STATIC__ kv_err_t kv_item_try_delete(kv_item_t *item) +{ + uint8_t *prev_key; + uint32_t prev_pos; + uint8_t prev_k_len, k_len; + kv_item_hdr_t prev_item_hdr; + + prev_pos = item->hdr.prev_pos; + + if (kv_item_hdr_read(prev_pos, &prev_item_hdr) != KV_ERR_NONE) { + return KV_ERR_FLASH_READ_FAILED; + } + + if (!KV_ITEM_IS_LEGAL(&prev_item_hdr) || + KV_ITEM_IS_DISCARDED(&prev_item_hdr)) { + /* situation 1 in kv_item_update, the prev_pos is in a fresh block now(for gc sake), + no need to delete the previous one. + */ + return KV_ERR_NONE; + } + + // test if situation 2 in kv_item_update happened + + k_len = item->hdr.k_len; + prev_k_len = prev_item_hdr.k_len; + + if (k_len != prev_k_len) { + return KV_ERR_NONE; + } + + prev_key = (uint8_t *)tos_mmheap_alloc(k_len); + if (!prev_key) { + return KV_ERR_OUT_OF_MEMORY; + } + + if (kv_flash_read(prev_pos + KV_ITEM_HDR_SIZE, prev_key, k_len) != KV_ERR_NONE) { + tos_mmheap_free(prev_key); + return KV_ERR_FLASH_READ_FAILED; + } + + // key changes, means another turn of gc happened, the previous block is filled with new item. + if (memcmp(prev_key, (void *)KV_ITEM_ADDR_OF_BODY(item), k_len) != 0) { + tos_mmheap_free(prev_key); + return KV_ERR_NONE; + } + + // the previous item is still there, delete it. + return kv_item_delete_aux(prev_pos); +} + +__STATIC_INLINE__ void kv_item_free(kv_item_t *item) +{ + if (item->body) { + tos_mmheap_free(item->body); + } + tos_mmheap_free(item); +} + +__STATIC__ int kv_item_hdr_verify(kv_item_hdr_t *item_hdr, uint32_t item_start, uint32_t blk_start) +{ + uint8_t k_len; + uint16_t v_len; + + k_len = item_hdr->k_len; + v_len = item_hdr->v_len; + + // 1. test key/value size + if (k_len == 0 || + v_len == 0 || + k_len == (uint8_t)-1 || + v_len == (uint16_t)-1) { + return K_FALSE; + } + + // 2. test the flash address range + if (item_start + KV_ITEM_SIZE(k_len, v_len) > KV_BLK_END(blk_start)) { + return K_FALSE; + } + + if (item_start + KV_ITEM_SIZE(k_len, v_len) > KV_FLASH_END) { + return K_FALSE; + } + + return K_TRUE; +} + +__STATIC_INLINE__ int kv_item_body_verify(kv_item_t *item) +{ + return item->hdr.checksum == kv_checksum_crc8(item->body, item->hdr.k_len + item->hdr.v_len); +} + +__STATIC_INLINE__ int kv_item_is_updated_one(kv_item_t *item) +{ + /* attention: + there's a possibility that item->pos equals to item->hdr.prev_pos, + if this happen, means the previous one is gc-ed, and the "item" is just + moved to the prev_pos by coincidence. + that means the previous one is not in prev_pos any more. no need to delete. + */ + return item->hdr.prev_pos != 0 && item->pos != item->hdr.prev_pos; +} + +__STATIC__ int kv_item_is_moved(kv_item_t *item) +{ + kv_err_t err; + int is_moved = K_FALSE; + kv_item_hdr_t item_hdr; + uint8_t *body_backup = K_NULL; + + // drag the header out of the flash + err = kv_item_hdr_read(item->pos, &item_hdr); + if (err != KV_ERR_NONE) { + return K_FALSE; + } + + // compare the header + if (memcmp(&item_hdr, &item->hdr, sizeof(kv_item_hdr_t)) != 0) { + return K_TRUE; + } + + // backup the body + body_backup = item->body; + + // drag the body out of the flash + err = kv_item_body_read(item); + if (err != KV_ERR_NONE) { + return K_FALSE; + } + + // compare the body + if (memcmp(body_backup, item->body, item->hdr.k_len + item->hdr.v_len) != 0) { + is_moved = K_TRUE; + } + + tos_mmheap_free(item->body); + item->body = body_backup; + + return is_moved; +} + +__STATIC__ kv_err_t kv_item_do_gc(kv_item_t *item, const void *dummy) +{ + kv_err_t err; + + err = kv_item_body_read(item); + if (err != KV_ERR_NONE) { + return err; + } + + if (kv_item_write(KV_BLK_USABLE_ADDR(KV_MGR_WORKSPACE), + &item->hdr, item->body, + KV_ITEM_SIZE_OF_BODY(item)) != KV_ERR_NONE) { + return KV_ERR_FLASH_WRITE_FAILED; + } + + // reduce the free_size + kv_blk_freesz_reduce(KV_MGR_WORKSPACE, KV_ITEM_SIZE_OF_ITEM(item)); + + return KV_ERR_NEXT_LOOP; +} + +__STATIC__ kv_err_t kv_item_do_fetch_new_copy(kv_item_t *item, const void *the_item) +{ + kv_err_t err; + kv_item_t *dst_item; + uint8_t k_len, dst_k_len; + uint16_t v_len, dst_v_len; + + dst_item = (kv_item_t *)the_item; + dst_k_len = dst_item->hdr.k_len; + dst_v_len = dst_item->hdr.v_len; + + k_len = item->hdr.k_len; + v_len = item->hdr.v_len; + + if (k_len != dst_k_len || + v_len != dst_v_len) { + return KV_ERR_NEXT_LOOP; + } + + err = kv_item_body_read(item); + if (err != KV_ERR_NONE) { + return err; + } + + if (memcmp(item->body, dst_item->body, k_len + v_len) == 0) { + return KV_ERR_NONE; + } + + return KV_ERR_NEXT_LOOP; +} + +__STATIC__ kv_err_t kv_item_do_fetch(kv_item_t *item, const void *key) +{ + kv_err_t err; + uint8_t k_len; + + k_len = item->hdr.k_len; + + if (strlen((const char *)key) != k_len) { + return KV_ERR_NEXT_LOOP; + } + + err = kv_item_body_read(item); + if (err != KV_ERR_NONE) { + return err; + } + + if (memcmp(item->body, key, k_len) == 0) { + return KV_ERR_NONE; + } + + return KV_ERR_NEXT_LOOP; +} + +__STATIC__ kv_err_t kv_item_do_recovery(kv_item_t *item, const void *dummy) +{ + kv_err_t err; + + err = kv_item_body_read(item); + if (err != KV_ERR_NONE) { + return err; + } + + if (!kv_item_body_verify(item)) { + err = kv_item_delete(item); + } else if (kv_item_is_updated_one(item)) { + /* we need to take a look inside into the previous item, + to check whether the previous one is correctly deleted. + maybe a power down happened during the update + */ + + /* + if current item's pos is not as same as its prev_pos, two situation: + 1. the item is be gc-ed to another block(just the same). + 2. the item is updated, the new data is saved but the old one may be not deleted. + */ + err = kv_item_try_delete(item); + } + + if (err != KV_ERR_NONE) { + return err; + } + + return KV_ERR_NEXT_LOOP; +} + +/* + aos's logic framework is nice here, so I learn from it. + although I have my own idea to write this logic, but the more other kv logic I process, + the more reasonable of this framework I find. thanks. +*/ +__STATIC__ kv_err_t kv_item_walkthru(uint32_t blk_start, + kv_item_walker_t walker, + const void *patten, + kv_item_t **item_out) +{ + kv_err_t err; + uint32_t cur_item; + kv_item_t *item; + kv_item_hdr_t *item_hdr; + int is_item_integral = K_TRUE; + + if (item_out) { + *item_out = K_NULL; + } + + cur_item = KV_BLK_FIRST_ITEM(blk_start); + + do { + is_item_integral = K_TRUE; + + item = (kv_item_t *)tos_mmheap_alloc(sizeof(kv_item_t)); + if (!item) { + return KV_ERR_OUT_OF_MEMORY; + } + + item->body = K_NULL; + item_hdr = &item->hdr; + + // drag the item header out of the flash to see whether is a legal item + err = kv_item_hdr_read(cur_item, item_hdr); + if (err != KV_ERR_NONE) { + kv_item_free(item); + return err; + } + + /* meet a magic none-set item + if magic is not set: + 1. it's a fresh item slot(not used) + 2. meet a power down before item magic write done + */ + if (!KV_ITEM_IS_LEGAL(item_hdr)) { + if (KV_ITEM_IS_FRESH(item_hdr)) { + // situation 1, it's a fresh item slot, meet the ending + kv_item_free(item); + break; + } + + // situation 2, meet power down, probably broken, just mark the item as discarded + is_item_integral = K_FALSE; + } + + if (!is_item_integral || + !kv_item_hdr_verify(item_hdr, cur_item, blk_start)) { + // it's no integral item, or header verify illegal + if (kv_item_do_delete(cur_item) == KV_ERR_NONE) { + kv_blk_set_dirty(blk_start); + } + + cur_item += KV_ITEM_HDR_SIZE; + kv_item_free(item); + + continue; + } + + if (!KV_ITEM_IS_DISCARDED(item_hdr)) { + // tell the item where he is, he does not know yet. + item->pos = cur_item; + + err = walker(item, patten); + if (err == KV_ERR_NONE) { + if (item_out) { + *item_out = item; + } + return KV_ERR_NONE; + } else if (err != KV_ERR_NEXT_LOOP) { + kv_item_free(item); + return err; + } + } else { + // it's a discarded item, deleted before + kv_blk_set_dirty(blk_start); + } + + cur_item += KV_ITEM_SIZE(item_hdr->k_len, item_hdr->v_len); + kv_item_free(item); + } while (cur_item + KV_ITEM_HDR_SIZE < KV_BLK_END(blk_start)); + + // have walked through all the items, get enough information to refresh the index(blk_info). + if (cur_item == KV_BLK_FIRST_ITEM(blk_start)) { + // come from fresh block break + kv_blk_set_fresh(blk_start); + } else if (cur_item + KV_ITEM_HDR_SIZE < KV_BLK_END(blk_start)) { + // come from while ending + kv_blk_freesz_set(blk_start, KV_BLK_END(blk_start) - cur_item); + kv_blk_set_inuse(blk_start); + } else { + // go across the boarder, means the space left is insufficient + kv_blk_freesz_set(blk_start, 0); + kv_blk_reset_inuse(blk_start); + } + + return KV_ERR_NONE; +} + +__STATIC__ kv_item_t *kv_item_do_find(uint32_t blk_start, const char *key) +{ + kv_item_t *the_item; + + if (kv_item_walkthru(blk_start, kv_item_do_fetch, key, &the_item) == KV_ERR_NONE) { + return the_item; + } + + return K_NULL; +} + +__STATIC__ kv_item_t *kv_item_find(const char *key) +{ + uint32_t cur_blk; + kv_item_t *item; + + KV_BLK_FOREACH(cur_blk) { + if (kv_blk_is_bad(cur_blk) || + kv_blk_is_fresh(cur_blk)) { + continue; + } + + item = kv_item_do_find(cur_blk, key); + if (item) { + return item; + } + } + return K_NULL; +} + +__STATIC__ kv_item_t *kv_item_do_find_new_copy(uint32_t blk_start, kv_item_t *item) +{ + kv_item_t *the_item; + + if (kv_item_walkthru(blk_start, kv_item_do_fetch_new_copy, + item, &the_item) == KV_ERR_NONE) { + return the_item; + } + + return K_NULL; +} + +__STATIC__ kv_item_t *kv_item_find_new_copy(kv_item_t *the_item) +{ + uint32_t cur_blk; + kv_item_t *item; + + KV_BLK_FOREACH(cur_blk) { + if (kv_blk_is_bad(cur_blk) || + kv_blk_is_fresh(cur_blk)) { + continue; + } + + item = kv_item_do_find_new_copy(cur_blk, the_item); + if (item) { + return item; + } + } + return K_NULL; +} + +__STATIC__ kv_err_t kv_item_do_save(uint32_t item_start, const char *k, const void *v, size_t v_len, uint32_t prev_pos) +{ + kv_err_t err; + uint8_t k_len; + uint32_t kv_len; + kv_item_hdr_t item_hdr; + uint8_t *kv_buf = K_NULL; + + k_len = strlen(k); + kv_len = KV_ITEM_BODY_SIZE(k_len, v_len); + + kv_buf = (uint8_t *)tos_mmheap_alloc(kv_len); + if (!kv_buf) { + return KV_ERR_OUT_OF_MEMORY; + } + + memset(kv_buf, 0, kv_len); + memcpy(kv_buf, k, k_len); + memcpy(kv_buf + k_len, v, v_len); + + item_hdr.magic = KV_ITEM_HDR_MAGIC; + item_hdr.checksum = kv_checksum_crc8(kv_buf, k_len + v_len); + + item_hdr.k_len = k_len; + item_hdr.v_len = v_len; + item_hdr.prev_pos = prev_pos; + + // we donnot deal with the discarded_flag here + err = kv_item_write(item_start, &item_hdr, kv_buf, kv_len); + + tos_mmheap_free(kv_buf); + + return err; +} + +__STATIC__ int kv_item_value_is_match(kv_item_t *item, const void *value, size_t value_len) +{ + uint8_t k_len; + uint16_t v_len; + + k_len = item->hdr.k_len; + v_len = item->hdr.v_len; + + if (value_len != v_len) { + return K_FALSE; + } + + if (memcmp(item->body + k_len, value, v_len) != 0) { + return K_FALSE; + } + + return K_TRUE; +} + +__STATIC__ kv_err_t kv_item_fix(kv_item_t *item) +{ + kv_item_t *moved_item; + + moved_item = kv_item_find_new_copy(item); + if (!moved_item) { + return KV_ERR_POS_FIX_FAILED; + } + + item->pos = moved_item->pos; + + kv_item_free(moved_item); + + return KV_ERR_NONE; +} + +__STATIC__ kv_err_t kv_item_save(const char *k, const void *v, size_t v_len, kv_item_t *prev_item) +{ + kv_err_t err; + uint32_t blk_start, k_len, item_size; + + k_len = strlen(k); + item_size = KV_ITEM_SIZE(k_len, v_len); + + blk_start = kv_blk_search_suitable(item_size); + if (blk_start == KV_BLK_INVALID) { + return KV_ERR_INSUFFICIENT_SPACE; + } + + /* gc may have been triggered in kv_blk_search_suitable, the "item" has been gc-ed from its original block to another, + so there is a possibility that neither the item->pos nor item->hdr.prev_pos is valid any more(actually the + prev_pos(is the "item->pos") of the new item is not valid either). + and there is no way to know where the new position of the "item" is (except to search again). + this may cause seriously bug. + */ + + /* gc maybe has been triggered in kv_blk_search_suitable, and the prev_item maybe moved from its + original block to another, we should identify this situation, and do kv_item_fix + */ + if (prev_item && kv_item_is_moved(prev_item)) { + /* we quite sure that the item is moved to another block because of gc. + find the new position of the item + */ + err = kv_item_fix(prev_item); + if (err != KV_ERR_NONE) { + return err; + } + } + + err = kv_item_do_save(KV_BLK_USABLE_ADDR(blk_start), k, v, v_len, prev_item ? prev_item->pos : 0); + if (err != KV_ERR_NONE) { + return err; + } + + // reduce the free_size + kv_blk_freesz_reduce(blk_start, item_size); + + if (kv_blk_is_fresh(blk_start)) { + kv_blk_reset_fresh(blk_start); + + if (!kv_blk_is_full(blk_start)) { + kv_blk_set_inuse(blk_start); + } + } else if (kv_blk_is_full(blk_start)) { + kv_blk_reset_inuse(blk_start); + } + + return KV_ERR_NONE; +} + +__STATIC__ kv_err_t kv_item_update(kv_item_t *item, const char *key, const void *value, size_t value_len) +{ + kv_err_t err; + + if (kv_item_value_is_match(item, value, value_len)) { + return KV_ERR_NONE; + } + + /* save first, then delete, is trying best to keep data integrality. */ + + err = kv_item_save(key, value, value_len, item); + if (err != KV_ERR_NONE) { + return err; + } + + /* + if gc triggered int kv_item_save, and the "item" has been gc-ed from its original block to another, + AND worse than that, a power down just happen here. + 1. the previous block is fresh(after gc) + 2. the previous block is filled with other items(another round of gc happen) + no matter 1 or 2 happen, when recovery, should test whether the item in prev_pos is legal(if not, means + block of prev_pos is fresh now), or with the same key as the "item"(the item in prev_pos may be one with + new key for gc's sake). + a lot of things should be done in kv_item_try_delete. + */ + + return kv_item_delete(item); +} + +__STATIC__ kv_err_t kv_param_verify(kv_flash_drv_t *flash_drv, kv_flash_prop_t *flash_prop) +{ + if (!flash_drv || !flash_prop) { + return KV_ERR_INVALID_PARAM; + } + + if (!KV_IS_ALINGED_LOG2(flash_prop->flash_start, flash_prop->sector_size_log2)) { + return KV_ERR_INVALID_PARAM; + } + + if (!KV_IS_ALINGED_LOG2(flash_prop->flash_size, flash_prop->sector_size_log2)) { + return KV_ERR_INVALID_PARAM; + } + + return KV_ERR_NONE; +} + +__STATIC_INLINE__ kv_err_t kv_mgr_index_build(uint32_t blk_start) +{ + return kv_item_walkthru(blk_start, kv_item_do_recovery, K_NULL, K_NULL); +} + +__STATIC__ int kv_mgr_blk_index_rebuild(void) +{ + uint32_t cur_blk; + int is_rebuild_done = K_FALSE; + + KV_BLK_FOREACH(cur_blk) { + if (kv_blk_is_hanging(cur_blk)) { + if (kv_mgr_index_build(cur_blk) == KV_ERR_NONE) { + kv_blk_reset_hanging(cur_blk); + is_rebuild_done = K_TRUE; + } + } + } + + return is_rebuild_done; +} + +__STATIC__ kv_err_t kv_mgr_workspace_locate(void) +{ + uint32_t cur_blk; + + /* we give blocks with KV_BLK_FLAG_HANGING a chance to rebuild index */ + if (KV_MGR_BLK_NUM_HANGING > 0) { + kv_mgr_blk_index_rebuild(); + } + + if (KV_NO_WRITEABLE_BLK()) { + return KV_ERR_NO_WRITEABLE_BLK; + } + + /* if no block inuse, we locate workspace in first fresh block + else locate in first block inuse + */ + KV_BLK_FOREACH(cur_blk) { + if (KV_MGR_BLK_NUM_INUSE == 0) { + if (kv_blk_is_fresh(cur_blk)) { + KV_MGR_WORKSPACE = cur_blk; + return KV_ERR_NONE; + } + } else if (kv_blk_is_inuse(cur_blk)) { + KV_MGR_WORKSPACE = cur_blk; + return KV_ERR_NONE; + } + } + + // actually unreachable here, but have to make compiler happy + return KV_ERR_NONE; +} + +__STATIC__ void kv_mgr_ctl_build(void) +{ + uint32_t cur_blk; + kv_blk_hdr_t blk_hdr; + + KV_BLK_FOREACH(cur_blk) { + if (kv_blk_hdr_read(cur_blk, &blk_hdr) != KV_ERR_NONE) { + // sth must be wrong seriously with this block + kv_blk_set_bad(cur_blk); + continue; + } + + if (!KV_BLK_IS_LEGAL(&blk_hdr)) { + if (kv_blk_format(cur_blk) != KV_ERR_NONE) { + // sth must be wrong seriously with this block + kv_blk_set_bad(cur_blk); + } + // we get a fresh block + continue; + } + + // do index building + if (kv_mgr_index_build(cur_blk) != KV_ERR_NONE) { + // sth goes wrong while index building, we give it a mark + kv_blk_set_hanging(cur_blk); + continue; + } + } +} + +__STATIC__ kv_err_t kv_mgr_ctl_init(void) +{ + kv_blk_detail_t *blk_detail; + + KV_MGR_BLK_NUM_TOTAL = KV_FLASH_SIZE / KV_FLASH_SECTOR_SIZE; + + blk_detail = (kv_blk_detail_t *)tos_mmheap_alloc(sizeof(kv_blk_detail_t) * KV_MGR_BLK_NUM_TOTAL); + if (!blk_detail) { + return KV_ERR_OUT_OF_MEMORY; + } + + memset(blk_detail, 0, sizeof(kv_blk_detail_t) * KV_MGR_BLK_NUM_TOTAL); + KV_MGR_BLK_DETAIL = blk_detail; + + if (tos_mutex_create(KV_MGR_LOCK) != K_ERR_NONE) { + return KV_ERR_INTERNAL_ERROR; + } + + return KV_ERR_NONE; +} + +__STATIC__ void kv_mgr_ctl_deinit(void) +{ + tos_mutex_destroy(KV_MGR_LOCK); + tos_mmheap_free(KV_MGR_BLK_DETAIL); + KV_MGR_BLK_DETAIL = K_NULL; + + memset(&kv_ctl, 0, sizeof(kv_ctl)); +} + +__STATIC__ kv_err_t kv_do_gc(uint32_t dirty_blk) +{ + return kv_item_walkthru(dirty_blk, kv_item_do_gc, K_NULL, K_NULL); +} + +/* on each turn of gc, we free some discarded items in the dirty block. + so we get more space to save the new item. + gc should be done only when necessary, if there is no sitiation of an item too big to save, + should not do gc(gc cause erase/write of the flash). + */ +__STATIC__ kv_err_t kv_gc(void) +{ + uint32_t cur_blk, workspace_backup; + int is_gc_done = K_FALSE, is_rebuild_done = K_FALSE; + + /* we give blocks with KV_BLK_FLAG_HANGING a chance to rebuild index */ + if (KV_MGR_BLK_NUM_HANGING > 0) { + is_rebuild_done = kv_mgr_blk_index_rebuild(); + } + + workspace_backup = KV_MGR_WORKSPACE; + + // there must be at least one fresh block left, make workspace pointer to the fresh one + KV_MGR_WORKSPACE = kv_blk_next_fresh(); + + KV_BLK_FOREACH(cur_blk) { + if (kv_blk_is_dirty(cur_blk)) { + if (kv_do_gc(cur_blk) != KV_ERR_NONE) { + // cannot do gc for this block, give others a try + continue; + } + + kv_blk_reset_inuse(cur_blk); + + if (kv_blk_format(cur_blk) != KV_ERR_NONE) { + kv_blk_set_bad(cur_blk); + } + + kv_blk_reset_fresh(KV_MGR_WORKSPACE); + + if (!kv_blk_is_full(KV_MGR_WORKSPACE)) { + kv_blk_set_inuse(KV_MGR_WORKSPACE); + } + + is_gc_done = K_TRUE; + + break; + } + } + + if (!is_gc_done) { + // if do nothing, should restore the workspace; + KV_MGR_WORKSPACE = workspace_backup; + } + + return (is_gc_done || is_rebuild_done) ? KV_ERR_NONE : KV_ERR_GC_NOTHING; +} + +__DEBUG__ __STATIC__ void kv_u8_disp(uint8_t *buf, size_t buf_len) +{ + int i = 0; + + printf("\""); + for (i = 0; i < buf_len; ++i) { + printf("%c", buf[i]); + } + printf("\"\n"); +} + +__DEBUG__ __STATIC__ kv_err_t kv_block_walkthru(uint32_t blk_start) +{ + int i = 0; + kv_err_t err; + uint32_t cur_item; + kv_item_t *item; + kv_item_hdr_t *item_hdr; + int is_item_integral = K_TRUE; + + cur_item = KV_BLK_FIRST_ITEM(blk_start); + + do { + printf("\n - [%d] item\n", i++); + printf(" - addr: 0x%x\n", cur_item); + + is_item_integral = K_TRUE; + + item = (kv_item_t *)tos_mmheap_alloc(sizeof(kv_item_t)); + if (!item) { + printf("OUT OF MEMORY\n"); + return KV_ERR_OUT_OF_MEMORY; + } + + item->body = K_NULL; + item_hdr = &item->hdr; + + err = kv_item_hdr_read(cur_item, item_hdr); + if (err != KV_ERR_NONE) { + printf(" - header read failed\n"); + kv_item_free(item); + return err; + } + + if (!KV_ITEM_IS_LEGAL(item_hdr)) { + if (KV_ITEM_IS_FRESH(item_hdr)) { + kv_item_free(item); + break; + } + + is_item_integral = K_FALSE; + } + + if (!is_item_integral) { + printf(" - not integral\n"); + } + + if (!kv_item_hdr_verify(item_hdr, cur_item, blk_start)) { + printf(" - header verify failed\n"); + } + + if (KV_ITEM_IS_DISCARDED(item_hdr)) { + printf(" - discarded\n"); + } + + if (!is_item_integral || + !kv_item_hdr_verify(item_hdr, cur_item, blk_start)) { + + cur_item += KV_ITEM_HDR_SIZE; + kv_item_free(item); + + continue; + } + + item->pos = cur_item; + + err = kv_item_body_read(item); + if (err == KV_ERR_NONE) { + if (!kv_item_body_verify(item)) { + printf(" - body verify failed\n"); + } else { + printf(" - prev_pos: 0x%x [%d block]\n", item->hdr.prev_pos, KV_BLK_ADDR2IDX(KV_ITEM_ADDR2BLK(item->hdr.prev_pos))); + printf(" - curr_pos: 0x%x [%d block]\n", item->pos, KV_BLK_ADDR2IDX(KV_ITEM_ADDR2BLK(item->pos))); + printf(" - k_len: %d\n", item->hdr.k_len); + printf(" - v_len: %d\n", item->hdr.v_len); + printf(" - k: "); + kv_u8_disp(item->body, item->hdr.k_len); + printf(" - v: "); + kv_u8_disp(item->body + item->hdr.k_len, item->hdr.v_len); + } + } + + cur_item += KV_ITEM_SIZE(item_hdr->k_len, item_hdr->v_len); + kv_item_free(item); + } while (cur_item + KV_ITEM_HDR_SIZE < KV_BLK_END(blk_start)); + + // have walked through all the items, get enough information to refresh the index(blk_info). + if (cur_item == KV_BLK_FIRST_ITEM(blk_start)) { + printf("block fresh\n"); + } else if (cur_item + KV_ITEM_HDR_SIZE < KV_BLK_END(blk_start)) { + printf("block inuse, freesize: 0x%x\n", KV_BLK_END(blk_start) - cur_item); + } else { + printf("block full\n"); + } + + return KV_ERR_NONE; +} + +__DEBUG__ kv_err_t tos_kv_walkthru(void) +{ + int i = 0; + uint32_t cur_blk; + kv_blk_hdr_t blk_hdr; + + printf("workspace: 0x%x [%d block]\n", KV_MGR_WORKSPACE, KV_BLK_ADDR2IDX(KV_MGR_WORKSPACE)); + + KV_BLK_FOREACH(cur_blk) { + printf("[%d] block\n", i++); + printf("addr: 0x%x\n", cur_blk); + + if (kv_blk_hdr_read(cur_blk, &blk_hdr) != KV_ERR_NONE) { + printf("block header read failed\n"); + continue; + } + + if (!KV_BLK_IS_LEGAL(&blk_hdr)) { + printf("block not formatted\n"); + continue; + } + + if (kv_block_walkthru(cur_blk) != KV_ERR_NONE) { + printf("block diagnosis failed\n"); + continue; + } + + printf("\n\n"); + } + + return KV_ERR_NONE; +} + +__API__ kv_err_t tos_kv_init(kv_flash_drv_t *flash_drv, kv_flash_prop_t *flash_prop) +{ + kv_err_t err; + + if (kv_param_verify(flash_drv, flash_prop) != KV_ERR_NONE) { + return KV_ERR_INVALID_PARAM; + } + + memset(&kv_ctl, 0, sizeof(kv_ctl)); + + kv_flash_ctl_init(flash_drv, flash_prop); + + err = kv_mgr_ctl_init(); + if (err != KV_ERR_NONE) { + return err; + } + + kv_mgr_ctl_build(); + + printf("fresh: %d\n", KV_MGR_BLK_NUM_FRESH); + printf("hanging: %d\n", KV_MGR_BLK_NUM_HANGING); + printf("inuse: %d\n", KV_MGR_BLK_NUM_INUSE); + printf("total: %d\n", KV_MGR_BLK_NUM_TOTAL); + + return kv_mgr_workspace_locate(); +} + +__API__ kv_err_t tos_kv_deinit(void) +{ + kv_mgr_ctl_deinit(); + return KV_ERR_NONE; +} + +__API__ kv_err_t tos_kv_set(const char *key, const void *value, size_t value_len) +{ + kv_err_t err; + kv_item_t *item; + + if (!key || !value) { + return KV_ERR_INVALID_PARAM; + } + + if (strlen(key) >= (uint8_t)-1 || + value_len >= (uint16_t)-1) { + return KV_ERR_SIZE_EXCEEDED; + } + + kv_lock(); + + item = kv_item_find(key); + if (item) { // already exist + err = kv_item_update(item, key, value, value_len); + kv_item_free(item); + } else { + err = kv_item_save(key, value, value_len, K_NULL); + } + + kv_unlock(); + + return err; +} + +__API__ kv_err_t tos_kv_get(const char *key, void *value_buf, size_t value_buf_size, size_t *value_len) +{ + uint8_t k_len; + uint16_t v_len; + kv_item_t *item; + + if (!key || !value_buf || !value_len) { + return KV_ERR_INVALID_PARAM; + } + + if (strlen(key) >= (uint8_t)-1) { + return KV_ERR_SIZE_EXCEEDED; + } + + kv_lock(); + + item = kv_item_find(key); + if (!item) { + kv_unlock(); + return KV_ERR_NOT_EXIST; + } + + kv_unlock(); + + k_len = item->hdr.k_len; + v_len = item->hdr.v_len; + *value_len = v_len; + + if (value_buf_size < v_len) { + kv_item_free(item); + return KV_ERR_BUF_TOO_SHORT; + } + + memcpy(value_buf, item->body + k_len, v_len); + kv_item_free(item); + + return KV_ERR_NONE; +} + +__API__ int tos_kv_has_key(const char *key) +{ + int has_key; + + if (!key) { + return KV_ERR_INVALID_PARAM; + } + + if (strlen(key) >= (uint8_t)-1) { + return KV_ERR_SIZE_EXCEEDED; + } + + kv_lock(); + has_key = kv_item_find(key) ? K_TRUE : K_FALSE; + kv_unlock(); + + return has_key; +} + +__API__ kv_err_t tos_kv_del(const char *key) +{ + kv_err_t err; + kv_item_t *item; + + if (!key) { + return KV_ERR_INVALID_PARAM; + } + + if (strlen(key) >= (uint8_t)-1) { + return KV_ERR_SIZE_EXCEEDED; + } + + kv_lock(); + + item = kv_item_find(key); + if (!item) { + kv_unlock(); + return KV_ERR_NOT_EXIST; + } + + err = kv_item_delete(item); + kv_item_free(item); + + kv_unlock(); + + return err; +} + diff --git a/examples/kv/kv_sample.c b/examples/kv/kv_sample.c new file mode 100644 index 00000000..9fadb755 --- /dev/null +++ b/examples/kv/kv_sample.c @@ -0,0 +1,105 @@ +#include "tos_kv.h" + +#include "cmsis_os.h" + +#define TASK_STK_SIZE 2048 +void task(void *arg); +osThreadDef(task, osPriorityNormal, 1, TASK_STK_SIZE); + +// #define USING_ONCHIP_FLASH + +#ifdef USING_ONCHIP_FLASH +extern kv_flash_drv_t stm32l4_norflash_onchip_drv; +extern kv_flash_prop_t stm32l4_norflash_onchip_prop; +#else +extern kv_flash_drv_t stm32l4_qspiflash_drv; +extern kv_flash_prop_t stm32l4_qspiflash_prop; +#endif + +void disp_value(uint8_t *value, uint32_t value_len) +{ + int i = 0; + + printf("value_len: %d\n", value_len); + + printf("\""); + for (i = 0; i < value_len; ++i) { + printf("%c", value[i]); + } + printf("\"\n\n"); +} + +void task(void *arg) +{ + int has_key; + kv_err_t err; + uint8_t value_buf[40]; + uint32_t value_len; + +#ifndef USING_ONCHIP_FLASH // use qspiflash + extern void MX_QUADSPI_Init(void); + MX_QUADSPI_Init(); +#endif + +#if 0 + stm32l4_norflash_onchip_erase(0x803d000, 2048); + stm32l4_norflash_onchip_erase(0x803d000 + 2048, 2048); + return; +#endif + +#ifdef USING_ONCHIP_FLASH + err = tos_kv_init(&stm32l4_norflash_onchip_drv, &stm32l4_norflash_onchip_prop); + printf("kv init, rc: %d\n", err); +#else + err = tos_kv_init(&stm32l4_qspiflash_drv, &stm32l4_qspiflash_prop); + printf("kv init, rc: %d\n", err); +#endif + + has_key = tos_kv_has_key("key00"); + printf("has key[%s] ? %s\n\n", "key00", has_key ? "True" : "False"); + + err = tos_kv_set("key00", "value_00", strlen("value_00")); + printf("kv set(%s), rc: %d\n\n", "key00", err); + + has_key = tos_kv_has_key("key00"); + printf("has key[%s] ? %s\n\n", "key00", has_key ? "True" : "False"); + + if (err == KV_ERR_NONE) { + err = tos_kv_get("key00", value_buf, sizeof(value_buf), &value_len); + printf("kv get(%s), rc: %d\n\n", "key00", err); + + if (err == KV_ERR_NONE) { + disp_value(value_buf, value_len); + } + + tos_kv_walkthru(); + } + + err = tos_kv_set("key00", "value_xx", strlen("value_xx")); + printf("kv set(%s), rc: %d\n\n", "key00", err); + + if (err == KV_ERR_NONE) { + err = tos_kv_get("key00", value_buf, sizeof(value_buf), &value_len); + printf("kv get(%s), rc: %d\n\n", "key00", err); + + if (err == KV_ERR_NONE) { + disp_value(value_buf, value_len); + } + + tos_kv_walkthru(); + } + + err = tos_kv_del("key00"); + printf("kv del(%s), rc: %d\n\n", "key00", err); + + has_key = tos_kv_has_key("key00"); + printf("has key[%s] ? %s\n\n", "key00", has_key ? "True" : "False"); + + tos_kv_walkthru(); +} + +void application_entry(void *arg) +{ + osThreadCreate(osThread(task), NULL); // Create task1 +} + diff --git a/kernel/core/include/tos_task.h b/kernel/core/include/tos_task.h index 13f24344..da773297 100644 --- a/kernel/core/include/tos_task.h +++ b/kernel/core/include/tos_task.h @@ -61,7 +61,7 @@ typedef void (*k_task_entry_t)(void *arg); -typedef void (*k_task_walker)(k_task_t *task); +typedef void (*k_task_walker_t)(k_task_t *task); /** * task control block @@ -339,7 +339,7 @@ __API__ k_err_t tos_task_stack_draught_depth(k_task_t *task, int *depth); * * @return None */ -__API__ void tos_task_walkthru(k_task_walker walker); +__API__ void tos_task_walkthru(k_task_walker_t walker); /** * @brief A debug API for display all tasks information. diff --git a/kernel/core/tos_mmheap.c b/kernel/core/tos_mmheap.c index 48a0432c..bb98073a 100644 --- a/kernel/core/tos_mmheap.c +++ b/kernel/core/tos_mmheap.c @@ -191,7 +191,7 @@ __STATIC_INLINE__ void *blk_to_ptr(const mmheap_blk_t *blk) } /* Return location of next block after block of given size. */ -__STATIC_INLINE__ mmheap_blk_t *offset_to_block(const void *ptr, int diff) +__STATIC_INLINE__ mmheap_blk_t *offset_to_blk(const void *ptr, int diff) { return (mmheap_blk_t *)((cpu_addr_t)ptr + diff); } @@ -207,7 +207,7 @@ __STATIC__ mmheap_blk_t *blk_next(const mmheap_blk_t *blk) { mmheap_blk_t *next_blk; - next_blk = offset_to_block(blk_to_ptr(blk), blk_size(blk) - K_MMHEAP_BLK_HEADER_OVERHEAD); + next_blk = offset_to_blk(blk_to_ptr(blk), blk_size(blk) - K_MMHEAP_BLK_HEADER_OVERHEAD); return next_blk; } @@ -331,7 +331,7 @@ __STATIC__ mmheap_blk_t *blk_split(mmheap_blk_t *blk, size_t size) size_t remain_size; /* Calculate the amount of space left in the remaining block. */ - remaining = offset_to_block(blk_to_ptr(blk), size - K_MMHEAP_BLK_HEADER_OVERHEAD); + remaining = offset_to_blk(blk_to_ptr(blk), size - K_MMHEAP_BLK_HEADER_OVERHEAD); remain_size = blk_size(blk) - (size + K_MMHEAP_BLK_HEADER_OVERHEAD); blk_set_size(remaining, remain_size); @@ -735,7 +735,7 @@ __API__ k_err_t tos_mmheap_pool_add(void *pool_start, size_t pool_size) ** so that the prev_phys_block field falls outside of the pool - ** it will never be used. */ - curr_blk = offset_to_block(pool_start, -K_MMHEAP_BLK_HEADER_OVERHEAD); + curr_blk = offset_to_blk(pool_start, -K_MMHEAP_BLK_HEADER_OVERHEAD); blk_set_size(curr_blk, size_aligned); blk_set_free(curr_blk); blk_set_prev_used(curr_blk); @@ -763,7 +763,7 @@ __API__ k_err_t tos_mmheap_pool_rmv(void *pool_start) return K_ERR_MMHEAP_POOL_NOT_EXIST; } - blk = offset_to_block(pool_start, -K_MMHEAP_BLK_HEADER_OVERHEAD); + blk = offset_to_blk(pool_start, -K_MMHEAP_BLK_HEADER_OVERHEAD); mapping_insert(blk_size(blk), &fl, &sl); remove_free_block(blk, fl, sl); @@ -780,7 +780,7 @@ __API__ k_err_t tos_mmheap_pool_check(void *pool_start, k_mmheap_info_t *info) memset(info, 0, sizeof(k_mmheap_info_t)); - blk = offset_to_block(pool_start, -K_MMHEAP_BLK_HEADER_OVERHEAD); + blk = offset_to_blk(pool_start, -K_MMHEAP_BLK_HEADER_OVERHEAD); while (blk && !blk_is_last(blk)) { if (blk_is_free(blk)) { diff --git a/kernel/core/tos_task.c b/kernel/core/tos_task.c index 0f073463..e278d560 100644 --- a/kernel/core/tos_task.c +++ b/kernel/core/tos_task.c @@ -547,7 +547,7 @@ __API__ k_task_t *tos_task_curr_task_get(void) return curr_task; } -__API__ void tos_task_walkthru(k_task_walker walker) +__API__ void tos_task_walkthru(k_task_walker_t walker) { TOS_CPU_CPSR_ALLOC(); k_task_t *task; From c9cb7ba16d2c8f4a86c4c9584501c0b57219602f Mon Sep 17 00:00:00 2001 From: royye Date: Fri, 20 Dec 2019 11:09:49 +0800 Subject: [PATCH 5/8] add end-to-end example sensor_e53_ia1_e2e_demo --- .../e53_ia1_e2e_demo.c | 80 +-- .../e53_ia1_e2e_demo_config.h | 2 +- .../README.md | 29 + .../cloudfunctions/iothub-publish/index.js | 36 ++ .../iothub-publish/package.json | 14 + .../iothub-shadow-query/index.js | 36 ++ .../iothub-shadow-query/package.json | 15 + .../cloudfunctions/package-lock.json | 549 ++++++++++++++++++ .../miniprogram/app.js | 22 + .../miniprogram/app.json | 13 + .../miniprogram/app.wxss | 156 +++++ .../miniprogram/images/TencentOS_tiny_log.png | Bin 0 -> 48034 bytes .../miniprogram/images/farm.png | Bin 0 -> 5760 bytes .../miniprogram/images/led.png | Bin 0 -> 6987 bytes .../miniprogram/pages/index/index.js | 90 +++ .../miniprogram/pages/index/index.json | 1 + .../miniprogram/pages/index/index.wxml | 65 +++ .../miniprogram/pages/index/index.wxss | 31 + .../miniprogram/sitemap.json | 7 + .../project.config.json | 47 ++ 20 files changed, 1140 insertions(+), 53 deletions(-) create mode 100644 tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/README.md create mode 100644 tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/cloudfunctions/iothub-publish/index.js create mode 100644 tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/cloudfunctions/iothub-publish/package.json create mode 100644 tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/cloudfunctions/iothub-shadow-query/index.js create mode 100644 tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/cloudfunctions/iothub-shadow-query/package.json create mode 100644 tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/cloudfunctions/package-lock.json create mode 100644 tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/app.js create mode 100644 tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/app.json create mode 100644 tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/app.wxss create mode 100644 tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/images/TencentOS_tiny_log.png create mode 100644 tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/images/farm.png create mode 100644 tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/images/led.png create mode 100644 tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/pages/index/index.js create mode 100644 tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/pages/index/index.json create mode 100644 tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/pages/index/index.wxml create mode 100644 tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/pages/index/index.wxss create mode 100644 tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/sitemap.json create mode 100644 tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/project.config.json diff --git a/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo.c b/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo.c index b7998e5c..28de363d 100644 --- a/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo.c +++ b/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo.c @@ -79,7 +79,8 @@ int parse_data(uint8_t *data) { printf("motor=%d\n", motor); if(motor == 1) { //power on relay - motor_control(OPEN); + turnon_fan(); + // motor_control(OPEN); } else if(motor == 0) { //power off relay motor_control(CLOSE); @@ -154,8 +155,9 @@ int network_init() { 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); - // int ret = esp8266_join_ap("royye", "Gch626262"); - int ret = esp8266_join_ap("iottest", "iot12345"); + int ret = esp8266_join_ap("Tencent-StaffWiFi", ""); + //int ret = esp8266_join_ap("Tencent-StaffWiFi", ""); + //int ret = esp8266_join_ap("Tencent-GuestWiFi", "252901"); return ret; #endif } @@ -204,7 +206,7 @@ int mqtt_subscribe(void) { } void qcloud_agent(void) { - // 网络初始化 + // 通过通信模组实现网络连接 int ret = network_init(); if (ret < 0) { printf("network_init fail\n"); @@ -218,7 +220,7 @@ void qcloud_agent(void) { return; } - // 订阅设备主题 + // 订阅设备主题,用于接收下行消息 ret = mqtt_subscribe(); if (ret < 0) { printf("mqtt_subscribe fail\n"); @@ -228,9 +230,9 @@ void qcloud_agent(void) { sensor_init(); while(1) { sensor_read(); - // 发布传感器数据 + // 上报传感器数据 publish_data(); - // 接收控制消息 + // 接收下行控制消息 receive_data(); osDelay(1000); } @@ -263,9 +265,11 @@ void monitor_task(void) { // 光照强度太低 => 打开补光灯 if (light_intensity_low()) { turnon_light(); + turnon_fan(); // 光照强度过高 => 关闭补光灯 } else if (light_intensity_high()) { turnoff_light(); + turnoff_fan(); } osDelay(100); } @@ -281,10 +285,7 @@ void normal_task() { void network_test_task() { // 初始化WiFi模组,连接AP - 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); - int ret = esp8266_join_ap("iottest", "iot12345"); + int ret = network_init(); if (ret < 0) { printf("network_init fail\n"); return; @@ -320,31 +321,6 @@ void network_test_task() { } } -void entry_task1(void *arg) -{ - while (K_TRUE) { - printf("entry_task1\n"); - tos_task_delay(1000); - } -} - -void entry_task2(void *arg) -{ - while (K_TRUE) { - printf("entry_task2\n"); - osDelay(2000); - } -} - -void entry_task1(void *arg); -#define TASK1_STK_SIZE 512 -k_stack_t stack_task1[TASK1_STK_SIZE]; -k_task_t task1; - -#define TASK2_STK_SIZE 512 -void entry_task2(void *arg); -osThreadDef(entry_task2, osPriorityNormal, 1, TASK2_STK_SIZE); - // 联网测试 osThreadDef(network_test_task, osPriorityNormal, 1, 1024); @@ -362,24 +338,24 @@ osThreadDef(monitor_task, osPriorityHigh, 1, MONITOR_STK_SIZE); #define NORMAL_STK_SIZE 512 osThreadDef(normal_task, osPriorityNormal, 1, NORMAL_STK_SIZE); -void application_entry(void *arg) { - // 端云对接 - osThreadCreate(osThread(qcloud_agent), NULL); +void helloworld(void *arg) +{ + while(1) { + printf("helloworld\n"); + osDelay(1000); + } +} + +#define TASK2_STK_SIZE 512 +osThreadDef(helloworld, osPriorityNormal, 1, TASK2_STK_SIZE); + +void application_entry(void *arg) { + osThreadCreate(osThread(helloworld), NULL); } /* -// tos_task_create 创建任务1 -(void)tos_task_create(&task1, - "task1", // 任务名称 - entry_task1, // 任务入口 - NULL, // 任务参数 - 4, // 优先级 - stack_task1, // 任务栈空间 - TASK1_STK_SIZE,// 任务栈大小 - 0); // 时间片 - -// cmsis api 创建任务2 -osThreadCreate(osThread(entry_task2), NULL); +// 创建任务 +osThreadCreate(osThread(helloworld), NULL); // 大循环的方式 sensor_init(); @@ -411,7 +387,7 @@ osThreadCreate(osThread(normal_task), NULL); osThreadCreate(osThread(network_test_task), NULL); // 端云对接 -osThreadCreate(osThread(agent_task), NULL); +osThreadCreate(osThread(qcloud_agent), NULL); */ diff --git a/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo_config.h b/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo_config.h index 4038c105..7a3d2cc3 100644 --- a/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo_config.h +++ b/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo_config.h @@ -6,7 +6,7 @@ #define MQTT_CLIENT_ID "U1BZWHF7F9dev_01" #define MQTT_USR_NAME "U1BZWHF7F9dev_01;12010126;O3I57;1611533066" #define MQTT_PASSWORD "6ebcf20c9f7f725b5bcf18a85cc7a49479f489eea65946f92ba18a51a135c89e;hmacsha256" -#define MQTT_SUBSCRIBE_TOPIC "U1BZWHF7F9/dev_01/data" +#define MQTT_SUBSCRIBE_TOPIC "U1BZWHF7F9/dev_01/data" #define MQTT_PUBLISH_TOPIC "$shadow/operation/U1BZWHF7F9/dev_01" #endif diff --git a/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/README.md b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/README.md new file mode 100644 index 00000000..55eb8c11 --- /dev/null +++ b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/README.md @@ -0,0 +1,29 @@ +### 智能灯小程序云开发DEMO +1. 说明 +本示例小程序配合TencentOS_tiny智能灯数据模板示例使用:TencentOS_tiny/examples/tencent_cloud_sdk_data_template +[腾讯云侧接入文档参见: 智能灯接入指引](https://cloud.tencent.com/document/product/1081/34744) + +2. tencent_cloud_sdk_data_template 接入腾讯云explorer后,在 app.js 中修改以下字段即可使用 +```` + globalData: { + // 腾讯云物联网开发平台explorer中获取 产品ID和设备名称 + productId: "U2LPAXBT2C", // 产品ID + deviceName: "royye_light", // 设备名称 + // 腾讯云控制台-访问管理-访问密钥-API密钥管理中获取 SecretId, secretKey + secretId: "AKIDxZ2LTTi84eaR3OfS8hnfxd4JHzQatFpF", + secretKey: "UigMrA9rJXUCeoiBQP8dsJuJ6sYzmNjs", + // 接口 Region 字段 + region: "ap-guangzhou", + // 云开发的环境名称。此处需要替换为云开发创建的环境名称 + env: "tos-demo" + }, +```` + +3. 测试通过后,如果需要发布小程序,则还需要在小程序管理后台进行服务器域名配置 +[微信小程序添加服务器端就接口域名](https://jingyan.baidu.com/article/ce09321bb6e9c12bff858f92.html) +进入微信公众平台小程序后台 - 开发 - 开发设置 - 服务器域名 - 输入域名: iotexplorer.tencentcloudapi.com + +### 云开发参考文档 + +- [云开发文档](https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html) + diff --git a/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/cloudfunctions/iothub-publish/index.js b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/cloudfunctions/iothub-publish/index.js new file mode 100644 index 00000000..298668c9 --- /dev/null +++ b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/cloudfunctions/iothub-publish/index.js @@ -0,0 +1,36 @@ +const tencentcloud = require("tencentcloud-sdk-nodejs"); + +const IotcloudClient = tencentcloud.iotcloud.v20180614.Client; +const models = tencentcloud.iotcloud.v20180614.Models; + +const Credential = tencentcloud.common.Credential; +const ClientProfile = tencentcloud.common.ClientProfile; +const HttpProfile = tencentcloud.common.HttpProfile; + +let cred = new Credential("AKIDxZ2LTTi84eaR3OfS8hnfxd4JHzQatFpF", "UigMrA9rJXUCeoiBQP8dsJuJ6sYzmNjs"); +let httpProfile = new HttpProfile(); +httpProfile.endpoint = "iotcloud.tencentcloudapi.com"; +let clientProfile = new ClientProfile(); +clientProfile.httpProfile = httpProfile; +let client = new IotcloudClient(cred, "ap-guangzhou", clientProfile); + +// 云函数入口函数 +exports.main = async (event, context) => { + let req = new models.PublishMessageRequest(); + req.Topic = "U1BZWHF7F9/dev_01/data"; + req.DeviceName = "dev_01"; + req.ProductId = "U1BZWHF7F9"; + req.Payload = event.Payload; + + return new Promise((resolve, reject)=>{ + client.PublishMessage(req, function (errMsg, response) { + if (errMsg) { + console.log(errMsg); + reject(errMsg) + return; + } + console.log(response.to_json_string()); + resolve(response) + }); + }) +} \ No newline at end of file diff --git a/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/cloudfunctions/iothub-publish/package.json b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/cloudfunctions/iothub-publish/package.json new file mode 100644 index 00000000..80f0014c --- /dev/null +++ b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/cloudfunctions/iothub-publish/package.json @@ -0,0 +1,14 @@ +{ + "name": "iothub-publish", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "wx-server-sdk": "latest" + } +} \ No newline at end of file diff --git a/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/cloudfunctions/iothub-shadow-query/index.js b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/cloudfunctions/iothub-shadow-query/index.js new file mode 100644 index 00000000..4a7dc6b8 --- /dev/null +++ b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/cloudfunctions/iothub-shadow-query/index.js @@ -0,0 +1,36 @@ +const tencentcloud = require("tencentcloud-sdk-nodejs"); + +const IotcloudClient = tencentcloud.iotcloud.v20180614.Client; +const models = tencentcloud.iotcloud.v20180614.Models; + +const Credential = tencentcloud.common.Credential; +const ClientProfile = tencentcloud.common.ClientProfile; +const HttpProfile = tencentcloud.common.HttpProfile; + +let cred = new Credential("AKIDxZ2LTTi84eaR3OfS8hnfxd4JHzQatFpF", "UigMrA9rJXUCeoiBQP8dsJuJ6sYzmNjs"); +let httpProfile = new HttpProfile(); +httpProfile.endpoint = "iotcloud.tencentcloudapi.com"; +let clientProfile = new ClientProfile(); +clientProfile.httpProfile = httpProfile; +let client = new IotcloudClient(cred, "ap-guangzhou", clientProfile); + +let req = new models.DescribeDeviceShadowRequest(); + +let params = '{"ProductId":"U1BZWHF7F9","DeviceName":"dev_01"}' +req.from_json_string(params); + +exports.main = async (event, context) => { + return new Promise((resolve, reject)=>{ + client.DescribeDeviceShadow(req, function (errMsg, response) { + + if (errMsg) { + console.log(errMsg); + reject(errMsg) + return; + } + + console.log(response.to_json_string()); + resolve(response) + }); + }) +} diff --git a/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/cloudfunctions/iothub-shadow-query/package.json b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/cloudfunctions/iothub-shadow-query/package.json new file mode 100644 index 00000000..f346ef44 --- /dev/null +++ b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/cloudfunctions/iothub-shadow-query/package.json @@ -0,0 +1,15 @@ +{ + "name": "iotexplorer", + "version": "1.0.0", + "description": "", + "main": "index.js", + "scripts": { + "test": "echo \"Error: no test specified\" && exit 1" + }, + "author": "", + "license": "ISC", + "dependencies": { + "tencentcloud-sdk-nodejs": "^3.0.77", + "wx-server-sdk": "latest" + } +} diff --git a/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/cloudfunctions/package-lock.json b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/cloudfunctions/package-lock.json new file mode 100644 index 00000000..9113190b --- /dev/null +++ b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/cloudfunctions/package-lock.json @@ -0,0 +1,549 @@ +{ + "requires": true, + "lockfileVersion": 1, + "dependencies": { + "@cloudbase/database": { + "version": "0.1.1", + "resolved": "https://registry.npm.taobao.org/@cloudbase/database/download/@cloudbase/database-0.1.1.tgz", + "integrity": "sha1-yf/JK3HhkAVxljkL6odpZ3f/l/8=", + "requires": { + "bson": "^4.0.2" + } + }, + "@protobufjs/aspromise": { + "version": "1.1.2", + "resolved": "https://registry.npm.taobao.org/@protobufjs/aspromise/download/@protobufjs/aspromise-1.1.2.tgz", + "integrity": "sha1-m4sMxmPWaafY9vXQiToU00jzD78=" + }, + "@protobufjs/base64": { + "version": "1.1.2", + "resolved": "https://registry.npm.taobao.org/@protobufjs/base64/download/@protobufjs/base64-1.1.2.tgz", + "integrity": "sha1-TIVzDlm5ofHzSQR9vyQpYDS7JzU=" + }, + "@protobufjs/codegen": { + "version": "2.0.4", + "resolved": "https://registry.npm.taobao.org/@protobufjs/codegen/download/@protobufjs/codegen-2.0.4.tgz", + "integrity": "sha1-fvN/DQEPsCitGtWXIuUG2SYoFcs=" + }, + "@protobufjs/eventemitter": { + "version": "1.1.0", + "resolved": "https://registry.npm.taobao.org/@protobufjs/eventemitter/download/@protobufjs/eventemitter-1.1.0.tgz", + "integrity": "sha1-NVy8mLr61ZePntCV85diHx0Ga3A=" + }, + "@protobufjs/fetch": { + "version": "1.1.0", + "resolved": "https://registry.npm.taobao.org/@protobufjs/fetch/download/@protobufjs/fetch-1.1.0.tgz", + "integrity": "sha1-upn7WYYUr2VwDBYZ/wbUVLDYTEU=", + "requires": { + "@protobufjs/aspromise": "^1.1.1", + "@protobufjs/inquire": "^1.1.0" + } + }, + "@protobufjs/float": { + "version": "1.0.2", + "resolved": "https://registry.npm.taobao.org/@protobufjs/float/download/@protobufjs/float-1.0.2.tgz", + "integrity": "sha1-Xp4avctz/Ap8uLKR33jIy9l7h9E=" + }, + "@protobufjs/inquire": { + "version": "1.1.0", + "resolved": "https://registry.npm.taobao.org/@protobufjs/inquire/download/@protobufjs/inquire-1.1.0.tgz", + "integrity": "sha1-/yAOPnzyQp4tyvwRQIKOjMY48Ik=" + }, + "@protobufjs/path": { + "version": "1.1.2", + "resolved": "https://registry.npm.taobao.org/@protobufjs/path/download/@protobufjs/path-1.1.2.tgz", + "integrity": "sha1-bMKyDFya1q0NzP0hynZz2Nf79o0=" + }, + "@protobufjs/pool": { + "version": "1.1.0", + "resolved": "https://registry.npm.taobao.org/@protobufjs/pool/download/@protobufjs/pool-1.1.0.tgz", + "integrity": "sha1-Cf0V8tbTq/qbZbw2ZQbWrXhG/1Q=" + }, + "@protobufjs/utf8": { + "version": "1.1.0", + "resolved": "https://registry.npm.taobao.org/@protobufjs/utf8/download/@protobufjs/utf8-1.1.0.tgz", + "integrity": "sha1-p3c2C1s5oaLlEG+OhY8v0tBgxXA=" + }, + "@types/long": { + "version": "4.0.0", + "resolved": "https://registry.npm.taobao.org/@types/long/download/@types/long-4.0.0.tgz", + "integrity": "sha1-cZVR0jUtMBrIuB23Mqy2vcKNve8=" + }, + "@types/node": { + "version": "10.14.13", + "resolved": "https://registry.npm.taobao.org/@types/node/download/@types/node-10.14.13.tgz?cache=0&sync_timestamp=1563391049881&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2F%40types%2Fnode%2Fdownload%2F%40types%2Fnode-10.14.13.tgz", + "integrity": "sha1-rHhtYjhgrfOaP1HWKUgKrNam7sc=" + }, + "ajv": { + "version": "6.10.2", + "resolved": "http://mirrors.cloud.tencent.com/npm/ajv/-/ajv-6.10.2.tgz", + "integrity": "sha512-TXtUUEYHuaTEbLZWIKUr5pmBuhDLy+8KYtPYdcV8qC+pOZL+NKqYwvWSRrVXHn+ZmRRAu8vJTAznH7Oag6RVRw==", + "requires": { + "fast-deep-equal": "^2.0.1", + "fast-json-stable-stringify": "^2.0.0", + "json-schema-traverse": "^0.4.1", + "uri-js": "^4.2.2" + } + }, + "asn1": { + "version": "0.2.4", + "resolved": "http://registry.npm.taobao.org/asn1/download/asn1-0.2.4.tgz", + "integrity": "sha1-jSR136tVO7M+d7VOWeiAu4ziMTY=", + "requires": { + "safer-buffer": "~2.1.0" + } + }, + "assert-plus": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/assert-plus/download/assert-plus-1.0.0.tgz", + "integrity": "sha1-8S4PPF13sLHN2RRpQuTpbB5N1SU=" + }, + "asynckit": { + "version": "0.4.0", + "resolved": "http://registry.npm.taobao.org/asynckit/download/asynckit-0.4.0.tgz", + "integrity": "sha1-x57Zf380y48robyXkLzDZkdLS3k=" + }, + "aws-sign2": { + "version": "0.7.0", + "resolved": "http://registry.npm.taobao.org/aws-sign2/download/aws-sign2-0.7.0.tgz", + "integrity": "sha1-tG6JCTSpWR8tL2+G1+ap8bP+dqg=" + }, + "aws4": { + "version": "1.8.0", + "resolved": "http://registry.npm.taobao.org/aws4/download/aws4-1.8.0.tgz", + "integrity": "sha1-8OAD2cqef1nHpQiUXXsu+aBKVC8=" + }, + "base64-js": { + "version": "1.3.0", + "resolved": "http://registry.npm.taobao.org/base64-js/download/base64-js-1.3.0.tgz", + "integrity": "sha1-yrHmEY8FEJXli1KBrqjBzSK/wOM=" + }, + "bcrypt-pbkdf": { + "version": "1.0.2", + "resolved": "http://mirrors.cloud.tencent.com/npm/bcrypt-pbkdf/-/bcrypt-pbkdf-1.0.2.tgz", + "integrity": "sha1-pDAdOJtqQ/m2f/PKEaP2Y342Dp4=", + "requires": { + "tweetnacl": "^0.14.3" + } + }, + "bson": { + "version": "4.0.2", + "resolved": "https://registry.npm.taobao.org/bson/download/bson-4.0.2.tgz", + "integrity": "sha1-KSn9/tGhRbHDYZCKK5UKbPS+0sI=", + "requires": { + "buffer": "^5.1.0", + "long": "^4.0.0" + } + }, + "buffer": { + "version": "5.2.1", + "resolved": "http://registry.npm.taobao.org/buffer/download/buffer-5.2.1.tgz", + "integrity": "sha1-3Vf6DxCaxZxgJHkETcp7iz0LcdY=", + "requires": { + "base64-js": "^1.0.2", + "ieee754": "^1.1.4" + } + }, + "caseless": { + "version": "0.12.0", + "resolved": "http://registry.npm.taobao.org/caseless/download/caseless-0.12.0.tgz", + "integrity": "sha1-G2gcIf+EAzyCZUMJBolCDRhxUdw=" + }, + "combined-stream": { + "version": "1.0.8", + "resolved": "https://registry.npm.taobao.org/combined-stream/download/combined-stream-1.0.8.tgz", + "integrity": "sha1-w9RaizT9cwYxoRCoolIGgrMdWn8=", + "requires": { + "delayed-stream": "~1.0.0" + } + }, + "core-util-is": { + "version": "1.0.2", + "resolved": "http://registry.npm.taobao.org/core-util-is/download/core-util-is-1.0.2.tgz", + "integrity": "sha1-tf1UIgqivFq1eqtxQMlAdUUDwac=" + }, + "dashdash": { + "version": "1.14.1", + "resolved": "http://registry.npm.taobao.org/dashdash/download/dashdash-1.14.1.tgz", + "integrity": "sha1-hTz6D3y+L+1d4gMmuN1YEDX24vA=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "delayed-stream": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/delayed-stream/download/delayed-stream-1.0.0.tgz", + "integrity": "sha1-3zrhmayt+31ECqrgsp4icrJOxhk=" + }, + "ecc-jsbn": { + "version": "0.1.2", + "resolved": "http://registry.npm.taobao.org/ecc-jsbn/download/ecc-jsbn-0.1.2.tgz", + "integrity": "sha1-OoOpBOVDUyh4dMVkt1SThoSamMk=", + "requires": { + "jsbn": "~0.1.0", + "safer-buffer": "^2.1.0" + } + }, + "extend": { + "version": "3.0.2", + "resolved": "http://registry.npm.taobao.org/extend/download/extend-3.0.2.tgz", + "integrity": "sha1-+LETa0Bx+9jrFAr/hYsQGewpFfo=" + }, + "extsprintf": { + "version": "1.3.0", + "resolved": "http://registry.npm.taobao.org/extsprintf/download/extsprintf-1.3.0.tgz", + "integrity": "sha1-lpGEQOMEGnpBT4xS48V06zw+HgU=" + }, + "fast-deep-equal": { + "version": "2.0.1", + "resolved": "https://registry.npm.taobao.org/fast-deep-equal/download/fast-deep-equal-2.0.1.tgz?cache=0&sync_timestamp=1562517919182&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Ffast-deep-equal%2Fdownload%2Ffast-deep-equal-2.0.1.tgz", + "integrity": "sha1-ewUhjd+WZ79/Nwv3/bLLFf3Qqkk=" + }, + "fast-json-stable-stringify": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/fast-json-stable-stringify/download/fast-json-stable-stringify-2.0.0.tgz", + "integrity": "sha1-1RQsDK7msRifh9OnYREGT4bIu/I=" + }, + "forever-agent": { + "version": "0.6.1", + "resolved": "http://registry.npm.taobao.org/forever-agent/download/forever-agent-0.6.1.tgz", + "integrity": "sha1-+8cfDEGt6zf5bFd60e1C2P2sypE=" + }, + "form-data": { + "version": "2.3.3", + "resolved": "https://registry.npm.taobao.org/form-data/download/form-data-2.3.3.tgz?cache=0&sync_timestamp=1562216133657&other_urls=https%3A%2F%2Fregistry.npm.taobao.org%2Fform-data%2Fdownload%2Fform-data-2.3.3.tgz", + "integrity": "sha1-3M5SwF9kTymManq5Nr1yTO/786Y=", + "requires": { + "asynckit": "^0.4.0", + "combined-stream": "^1.0.6", + "mime-types": "^2.1.12" + } + }, + "function-bind": { + "version": "1.1.1", + "resolved": "http://registry.npm.taobao.org/function-bind/download/function-bind-1.1.1.tgz", + "integrity": "sha1-pWiZ0+o8m6uHS7l3O3xe3pL0iV0=" + }, + "getpass": { + "version": "0.1.7", + "resolved": "http://registry.npm.taobao.org/getpass/download/getpass-0.1.7.tgz", + "integrity": "sha1-Xv+OPmhNVprkyysSgmBOi6YhSfo=", + "requires": { + "assert-plus": "^1.0.0" + } + }, + "har-schema": { + "version": "2.0.0", + "resolved": "http://registry.npm.taobao.org/har-schema/download/har-schema-2.0.0.tgz", + "integrity": "sha1-qUwiJOvKwEeCoNkDVSHyRzW37JI=" + }, + "har-validator": { + "version": "5.1.3", + "resolved": "http://mirrors.cloud.tencent.com/npm/har-validator/-/har-validator-5.1.3.tgz", + "integrity": "sha512-sNvOCzEQNr/qrvJgc3UG/kD4QtlHycrzwS+6mfTrrSq97BvaYcPZZI1ZSqGSPR73Cxn4LKTD4PttRwfU7jWq5g==", + "requires": { + "ajv": "^6.5.5", + "har-schema": "^2.0.0" + } + }, + "has": { + "version": "1.0.3", + "resolved": "http://registry.npm.taobao.org/has/download/has-1.0.3.tgz", + "integrity": "sha1-ci18v8H2qoJB8W3YFOAR4fQeh5Y=", + "requires": { + "function-bind": "^1.1.1" + } + }, + "http-signature": { + "version": "1.2.0", + "resolved": "http://mirrors.cloud.tencent.com/npm/http-signature/-/http-signature-1.2.0.tgz", + "integrity": "sha1-muzZJRFHcvPZW2WmCruPfBj7rOE=", + "requires": { + "assert-plus": "^1.0.0", + "jsprim": "^1.2.2", + "sshpk": "^1.7.0" + } + }, + "ieee754": { + "version": "1.1.13", + "resolved": "http://registry.npm.taobao.org/ieee754/download/ieee754-1.1.13.tgz", + "integrity": "sha1-7BaFWOlaoYH9h9N/VcMrvLZwi4Q=" + }, + "is-regex": { + "version": "1.0.4", + "resolved": "http://registry.npm.taobao.org/is-regex/download/is-regex-1.0.4.tgz", + "integrity": "sha1-VRdIm1RwkbCTDglWVM7SXul+lJE=", + "requires": { + "has": "^1.0.1" + } + }, + "is-typedarray": { + "version": "1.0.0", + "resolved": "http://registry.npm.taobao.org/is-typedarray/download/is-typedarray-1.0.0.tgz", + "integrity": "sha1-5HnICFjfDBsR3dppQPlgEfzaSpo=" + }, + "isstream": { + "version": "0.1.2", + "resolved": "http://registry.npm.taobao.org/isstream/download/isstream-0.1.2.tgz", + "integrity": "sha1-R+Y/evVa+m+S4VAOaQ64uFKcCZo=" + }, + "jsbn": { + "version": "0.1.1", + "resolved": "http://registry.npm.taobao.org/jsbn/download/jsbn-0.1.1.tgz", + "integrity": "sha1-peZUwuWi3rXyAdls77yoDA7y9RM=" + }, + "json-schema": { + "version": "0.2.3", + "resolved": "http://registry.npm.taobao.org/json-schema/download/json-schema-0.2.3.tgz", + "integrity": "sha1-tIDIkuWaLwWVTOcnvT8qTogvnhM=" + }, + "json-schema-traverse": { + "version": "0.4.1", + "resolved": "http://registry.npm.taobao.org/json-schema-traverse/download/json-schema-traverse-0.4.1.tgz", + "integrity": "sha1-afaofZUTq4u4/mO9sJecRI5oRmA=" + }, + "json-stringify-safe": { + "version": "5.0.1", + "resolved": "http://registry.npm.taobao.org/json-stringify-safe/download/json-stringify-safe-5.0.1.tgz", + "integrity": "sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus=" + }, + "jsprim": { + "version": "1.4.1", + "resolved": "http://mirrors.cloud.tencent.com/npm/jsprim/-/jsprim-1.4.1.tgz", + "integrity": "sha1-MT5mvB5cwG5Di8G3SZwuXFastqI=", + "requires": { + "assert-plus": "1.0.0", + "extsprintf": "1.3.0", + "json-schema": "0.2.3", + "verror": "1.10.0" + } + }, + "lodash.merge": { + "version": "4.6.2", + "resolved": "https://registry.npm.taobao.org/lodash.merge/download/lodash.merge-4.6.2.tgz", + "integrity": "sha1-VYqlO0O2YeGSWgr9+japoQhf5Xo=" + }, + "long": { + "version": "4.0.0", + "resolved": "http://registry.npm.taobao.org/long/download/long-4.0.0.tgz", + "integrity": "sha1-mntxz7fTYaGU6lVSQckvdGjVvyg=" + }, + "mime-db": { + "version": "1.40.0", + "resolved": "https://registry.npm.taobao.org/mime-db/download/mime-db-1.40.0.tgz", + "integrity": "sha1-plBX6ZjbCQ9zKmj2wnbTh9QSbDI=" + }, + "mime-types": { + "version": "2.1.24", + "resolved": "https://registry.npm.taobao.org/mime-types/download/mime-types-2.1.24.tgz", + "integrity": "sha1-tvjQs+lR77d97eyhlM/20W9nb4E=", + "requires": { + "mime-db": "1.40.0" + } + }, + "oauth-sign": { + "version": "0.9.0", + "resolved": "http://registry.npm.taobao.org/oauth-sign/download/oauth-sign-0.9.0.tgz", + "integrity": "sha1-R6ewFrqmi1+g7PPe4IqFxnmsZFU=" + }, + "performance-now": { + "version": "2.1.0", + "resolved": "http://registry.npm.taobao.org/performance-now/download/performance-now-2.1.0.tgz", + "integrity": "sha1-Ywn04OX6kT7BxpMHrjZLSzd8nns=" + }, + "protobufjs": { + "version": "6.8.8", + "resolved": "http://mirrors.cloud.tencent.com/npm/protobufjs/-/protobufjs-6.8.8.tgz", + "integrity": "sha512-AAmHtD5pXgZfi7GMpllpO3q1Xw1OYldr+dMUlAnffGTAhqkg72WdmSY71uKBF/JuyiKs8psYbtKrhi0ASCD8qw==", + "requires": { + "@protobufjs/aspromise": "^1.1.2", + "@protobufjs/base64": "^1.1.2", + "@protobufjs/codegen": "^2.0.4", + "@protobufjs/eventemitter": "^1.1.0", + "@protobufjs/fetch": "^1.1.0", + "@protobufjs/float": "^1.0.2", + "@protobufjs/inquire": "^1.1.0", + "@protobufjs/path": "^1.1.2", + "@protobufjs/pool": "^1.1.0", + "@protobufjs/utf8": "^1.1.0", + "@types/long": "^4.0.0", + "@types/node": "^10.1.0", + "long": "^4.0.0" + } + }, + "psl": { + "version": "1.2.0", + "resolved": "http://mirrors.cloud.tencent.com/npm/psl/-/psl-1.2.0.tgz", + "integrity": "sha512-GEn74ZffufCmkDDLNcl3uuyF/aSD6exEyh1v/ZSdAomB82t6G9hzJVRx0jBmLDW+VfZqks3aScmMw9DszwUalA==" + }, + "punycode": { + "version": "2.1.1", + "resolved": "http://registry.npm.taobao.org/punycode/download/punycode-2.1.1.tgz", + "integrity": "sha1-tYsBCsQMIsVldhbI0sLALHv0eew=" + }, + "qs": { + "version": "6.5.2", + "resolved": "http://registry.npm.taobao.org/qs/download/qs-6.5.2.tgz", + "integrity": "sha1-yzroBuh0BERYTvFUzo7pjUA/PjY=" + }, + "request": { + "version": "2.88.0", + "resolved": "http://mirrors.cloud.tencent.com/npm/request/-/request-2.88.0.tgz", + "integrity": "sha512-NAqBSrijGLZdM0WZNsInLJpkJokL72XYjUpnB0iwsRgxh7dB6COrHnTBNwN0E+lHDAJzu7kLAkDeY08z2/A0hg==", + "requires": { + "aws-sign2": "~0.7.0", + "aws4": "^1.8.0", + "caseless": "~0.12.0", + "combined-stream": "~1.0.6", + "extend": "~3.0.2", + "forever-agent": "~0.6.1", + "form-data": "~2.3.2", + "har-validator": "~5.1.0", + "http-signature": "~1.2.0", + "is-typedarray": "~1.0.0", + "isstream": "~0.1.2", + "json-stringify-safe": "~5.0.1", + "mime-types": "~2.1.19", + "oauth-sign": "~0.9.0", + "performance-now": "^2.1.0", + "qs": "~6.5.2", + "safe-buffer": "^5.1.2", + "tough-cookie": "~2.4.3", + "tunnel-agent": "^0.6.0", + "uuid": "^3.3.2" + } + }, + "safe-buffer": { + "version": "5.2.0", + "resolved": "https://registry.npm.taobao.org/safe-buffer/download/safe-buffer-5.2.0.tgz", + "integrity": "sha1-t02uxJsRSPiMZLaNSbHoFcHy9Rk=" + }, + "safer-buffer": { + "version": "2.1.2", + "resolved": "http://registry.npm.taobao.org/safer-buffer/download/safer-buffer-2.1.2.tgz", + "integrity": "sha1-RPoWGwGHuVSd2Eu5GAL5vYOFzWo=" + }, + "sax": { + "version": "1.2.4", + "resolved": "http://registry.npm.taobao.org/sax/download/sax-1.2.4.tgz", + "integrity": "sha1-KBYjTiN4vdxOU1T6tcqold9xANk=" + }, + "sshpk": { + "version": "1.16.1", + "resolved": "http://mirrors.cloud.tencent.com/npm/sshpk/-/sshpk-1.16.1.tgz", + "integrity": "sha512-HXXqVUq7+pcKeLqqZj6mHFUMvXtOJt1uoUx09pFW6011inTMxqI8BA8PM95myrIyyKwdnzjdFjLiE6KBPVtJIg==", + "requires": { + "asn1": "~0.2.3", + "assert-plus": "^1.0.0", + "bcrypt-pbkdf": "^1.0.0", + "dashdash": "^1.12.0", + "ecc-jsbn": "~0.1.1", + "getpass": "^0.1.1", + "jsbn": "~0.1.0", + "safer-buffer": "^2.0.2", + "tweetnacl": "~0.14.0" + } + }, + "tcb-admin-node": { + "version": "1.9.0", + "resolved": "http://mirrors.cloud.tencent.com/npm/tcb-admin-node/-/tcb-admin-node-1.9.0.tgz", + "integrity": "sha512-TYoBo66CEIIw1QzgK4Jq43G45zvBE6ZB35LbDV8wwLQvg6CiZHlmOTVZkgj2YZ8O87ELi+ZE3UBVNZM3nFa6lQ==", + "requires": { + "@cloudbase/database": "0.1.1", + "is-regex": "^1.0.4", + "lodash.merge": "^4.6.1", + "request": "^2.87.0", + "xml2js": "^0.4.19" + } + }, + "tencentcloud-sdk-nodejs": { + "version": "3.0.77", + "resolved": "http://mirrors.cloud.tencent.com/npm/tencentcloud-sdk-nodejs/-/tencentcloud-sdk-nodejs-3.0.77.tgz", + "integrity": "sha512-DULk7IFdR8BQnvC1iRuj+GrYnuU72Lj3oyIO1U2pubf71GtN9PeZ/9km2T7lsCeySU/J6jCTvwVPZaIhip/H1g==", + "requires": { + "request": "^2.85.0" + } + }, + "tough-cookie": { + "version": "2.4.3", + "resolved": "http://mirrors.cloud.tencent.com/npm/tough-cookie/-/tough-cookie-2.4.3.tgz", + "integrity": "sha512-Q5srk/4vDM54WJsJio3XNn6K2sCG+CQ8G5Wz6bZhRZoAe/+TxjWB/GlFAnYEbkYVlON9FMk/fE3h2RLpPXo4lQ==", + "requires": { + "psl": "^1.1.24", + "punycode": "^1.4.1" + }, + "dependencies": { + "punycode": { + "version": "1.4.1", + "resolved": "http://mirrors.cloud.tencent.com/npm/punycode/-/punycode-1.4.1.tgz", + "integrity": "sha1-wNWmOycYgArY4esPpSachN1BhF4=" + } + } + }, + "tslib": { + "version": "1.10.0", + "resolved": "http://mirrors.cloud.tencent.com/npm/tslib/-/tslib-1.10.0.tgz", + "integrity": "sha512-qOebF53frne81cf0S9B41ByenJ3/IuH8yJKngAX35CmiZySA0khhkovshKK+jGCaMnVomla7gVlIcc3EvKPbTQ==" + }, + "tunnel-agent": { + "version": "0.6.0", + "resolved": "http://mirrors.cloud.tencent.com/npm/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha1-J6XeoGs2sEoKmWZ3SykIaPD8QP0=", + "requires": { + "safe-buffer": "^5.0.1" + } + }, + "tweetnacl": { + "version": "0.14.5", + "resolved": "http://mirrors.cloud.tencent.com/npm/tweetnacl/-/tweetnacl-0.14.5.tgz", + "integrity": "sha1-WuaBd/GS1EViadEIr6k/+HQ/T2Q=" + }, + "uri-js": { + "version": "4.2.2", + "resolved": "http://mirrors.cloud.tencent.com/npm/uri-js/-/uri-js-4.2.2.tgz", + "integrity": "sha512-KY9Frmirql91X2Qgjry0Wd4Y+YTdrdZheS8TFwvkbLWf/G5KNJDCh6pKL5OZctEW4+0Baa5idK2ZQuELRwPznQ==", + "requires": { + "punycode": "^2.1.0" + } + }, + "uuid": { + "version": "3.3.2", + "resolved": "http://mirrors.cloud.tencent.com/npm/uuid/-/uuid-3.3.2.tgz", + "integrity": "sha512-yXJmeNaw3DnnKAOKJE51sL/ZaYfWJRl1pK9dr19YFCu0ObS231AB1/LbqTKRAQ5kw8A90rA6fr4riOUpTZvQZA==" + }, + "verror": { + "version": "1.10.0", + "resolved": "http://mirrors.cloud.tencent.com/npm/verror/-/verror-1.10.0.tgz", + "integrity": "sha1-OhBcoXBTr1XW4nDB+CiGguGNpAA=", + "requires": { + "assert-plus": "^1.0.0", + "core-util-is": "1.0.2", + "extsprintf": "^1.2.0" + } + }, + "wx-server-sdk": { + "version": "0.8.1", + "resolved": "http://mirrors.cloud.tencent.com/npm/wx-server-sdk/-/wx-server-sdk-0.8.1.tgz", + "integrity": "sha512-mE7O3E7GtRhqk1ukWw2+NiykaO5DaJYiMFCeHrwvekYTVL5Z2nFXnSrUx6nPg/vZ7LWWQbCgQlGOygBjj2+hkQ==", + "requires": { + "protobufjs": "6.8.8", + "tcb-admin-node": "1.9.0", + "tslib": "^1.9.3" + } + }, + "xml2js": { + "version": "0.4.19", + "resolved": "http://mirrors.cloud.tencent.com/npm/xml2js/-/xml2js-0.4.19.tgz", + "integrity": "sha512-esZnJZJOiJR9wWKMyuvSE1y6Dq5LCuJanqhxslH2bxM6duahNZ+HMpCLhBQGZkbX6xRf8x1Y2eJlgt2q3qo49Q==", + "requires": { + "sax": ">=0.6.0", + "xmlbuilder": "~9.0.1" + } + }, + "xmlbuilder": { + "version": "9.0.7", + "resolved": "http://mirrors.cloud.tencent.com/npm/xmlbuilder/-/xmlbuilder-9.0.7.tgz", + "integrity": "sha1-Ey7mPS7FVlxVfiD0wi35rKaGsQ0=" + } + } +} diff --git a/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/app.js b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/app.js new file mode 100644 index 00000000..0e2f6c14 --- /dev/null +++ b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/app.js @@ -0,0 +1,22 @@ +//app.js +App({ + globalData: { + // 腾讯云物联网通信平台中获取 产品ID和设备名称 + productId: "U1BZWHF7F9", // 产品ID + deviceName: "dev_01", // 设备名称 + }, + onLaunch: function () { + if (!wx.cloud) { + console.error('请使用 2.2.3 或以上的基础库以使用云能力') + } else { + wx.cloud.init({ + // env 参数说明: + // env 参数决定接下来小程序发起的云开发调用(wx.cloud.xxx)会默认请求到哪个云环境的资源 + // 此处请填入环境 ID, 环境 ID 可打开云控制台查看 + // 如不填则使用默认环境(第一个创建的环境) + env: "tos-demo", + traceUser: true, + }) + } + } +}) diff --git a/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/app.json b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/app.json new file mode 100644 index 00000000..07cd9e56 --- /dev/null +++ b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/app.json @@ -0,0 +1,13 @@ +{ + "pages": [ + "pages/index/index" + ], + "window": { + "backgroundColor": "#F6F6F6", + "backgroundTextStyle": "light", + "navigationBarBackgroundColor": "#F6F6F6", + "navigationBarTitleText": "智慧农业Demo", + "navigationBarTextStyle": "black" + }, + "sitemapLocation": "sitemap.json" +} \ No newline at end of file diff --git a/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/app.wxss b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/app.wxss new file mode 100644 index 00000000..82678d67 --- /dev/null +++ b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/app.wxss @@ -0,0 +1,156 @@ +/**app.wxss**/ +.container { + display: flex; + flex-direction: column; + align-items: center; + box-sizing: border-box; +} + +button { + background: initial; +} + +button:focus{ + outline: 0; +} + +button::after{ + border: none; +} + + +page { + background: #f6f6f6; + display: flex; + flex-direction: column; + justify-content: flex-start; +} + +.userinfo, .uploader, .tunnel { + margin-top: 40rpx; + height: 140rpx; + width: 100%; + background: #fff; + border: 1px solid rgba(0, 0, 0, 0.1); + border-left: none; + border-right: none; + display: flex; + flex-direction: row; + align-items: center; + transition: all 300ms ease; +} + +.userinfo-avatar { + width: 100rpx; + height: 100rpx; + margin: 20rpx; + border-radius: 50%; + background-size: cover; + background-color: white; +} + +.userinfo-avatar:after { + border: none; +} + +.userinfo-nickname { + font-size: 32rpx; + color: #007aff; + background-color: white; + background-size: cover; +} + +.userinfo-nickname::after { + border: none; +} + +.uploader, .tunnel { + height: auto; + padding: 0 0 0 40rpx; + flex-direction: column; + align-items: flex-start; + box-sizing: border-box; +} + +.uploader-text, .tunnel-text { + width: 100%; + line-height: 52px; + font-size: 34rpx; + color: #007aff; +} + +.uploader-container { + width: 100%; + height: 400rpx; + padding: 20rpx 20rpx 20rpx 0; + display: flex; + align-content: center; + justify-content: center; + box-sizing: border-box; + border-top: 1px solid rgba(0, 0, 0, 0.1); +} + +.uploader-image { + width: 100%; + height: 360rpx; +} + +.tunnel { + padding: 0 0 0 40rpx; +} + +.tunnel-text { + position: relative; + color: #222; + display: flex; + flex-direction: row; + align-content: center; + justify-content: space-between; + box-sizing: border-box; + border-top: 1px solid rgba(0, 0, 0, 0.1); +} + +.tunnel-text:first-child { + border-top: none; +} + +.tunnel-switch { + position: absolute; + right: 20rpx; + top: -2rpx; +} + +.disable { + color: #888; +} + +.service { + position: fixed; + right: 40rpx; + bottom: 40rpx; + width: 140rpx; + height: 140rpx; + border-radius: 50%; + background: linear-gradient(#007aff, #0063ce); + box-shadow: 0 5px 10px rgba(0, 0, 0, 0.3); + display: flex; + align-content: center; + justify-content: center; + transition: all 300ms ease; +} + +.service-button { + position: absolute; + top: 40rpx; +} + +.service:active { + box-shadow: none; +} + +.request-text { + padding: 20rpx 0; + font-size: 24rpx; + line-height: 36rpx; + word-break: break-all; +} diff --git a/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/images/TencentOS_tiny_log.png b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/images/TencentOS_tiny_log.png new file mode 100644 index 0000000000000000000000000000000000000000..54f21405c7a4fe3a6130ed5a1dcf1b0f4a72587f GIT binary patch literal 48034 zcmeFY_gj-)vj!T75JifLO799P5;Ql$hz5s==31f(PuP-y}R(h-7?&_#NS zA|TRB=q1t(EtCj^b{^jE+xuMC`4`Sse+Y_e&6;x0%ss=KdxknJOx#Q$5Qs%jSJMOp zg7ktw^zNq_fxpQ;tpI#Mr|)8BiL^Ah3wQAHfIfWe^~e#5^6&=!9RyNVLwP@RaC1Zo zK5}$+@l+9BuWJ$(ba|{Id|%c;%D`L0@rjFWkgua@kfE7Fkeh?zV_`K_CS?>HIKaaZ z`A`t$;qK`NN2v(^doCRKeDc?l!h-*P3(`$R`1Z+#f|dsN1U0;T9R+2fauN>Guv>!i zico1eDaBi`n}WBbq~#^0{mrRQ7%B1UJ#t{_kbLS1Q6! zkVtR1q+~!q05m`b>gDS!DXpleC@FPI^42X0;5#Jz0zHurQ4*ehA}2@u=L}6pKL=kI zZ={Qtr{Kw%4Km^CbWGeZUw0t06~EKrOz&`!jg$*Fhjbke=pk zGgR8jWWdL(j>$V4>mZE`p+!MqONQ*z)x~Gn7tkvX-RB3$v=j?z`|gMSm;4@g{ib7o zgt#wV_V%ry`Rn-G7u$`$*N2()^vi7D%`^2M#%&!U?%OqYA~W~f(gqIG@cU;3_2RGm z-=F`}!2fC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VUdn!QkdvKuHOt@Wgj(J?Us8rrf~j{|G7w99ErG6|Ms$iFK`# z+1CA07TVe;s2O5~S{&dUP0b((sdiM}Z!Ah|@IY#%@op|3me-*{uO^)4c>cdl$>f|h zPKmFjKB#Zo8@`2t6dwmixSod>0boGZEBNfRHODtlBd z=agaJ)}VAh>Iq|q62J#qA@ubhN*|$W7-N?r(nVb7Z)-Ms) zRnimLdFpWTEc%o4X@nX>WId=HkSIdI`Y19e`Fyks5O9h8w#aZ^W`{K3XBm3J;6eC{ z9F()~_Z8ixlxv zbd;l+JF7UHpDSRr$ke#Cb%jK&$R0-@#b)h1s_dg%OXAx^MoUV)C8qduBGhE1iBZ*iOfbsR9SCE8QE|iyoipuIS{hb;v4m=c0G(1 z^1ev@#D)b89MWr>GvEW^TRXNbs38!XkX$MJRpfF1cLjT*%i{d0By@xW>FBCT3|P~0 zKqsUMK&yX30tS8&VpG$6aHu~Q5v4m1nV{`f>9K^hScn~dkYiZtiWVJ-OhJ$BVAoX8 z3JsR)ebF8rFf#)k@LJ~!MC0JMQ;4w-Wp^z_3eKY?bR$MrG*q!@Mn zj6s#FiwDioGmljk!!#Yx(4{W*7;X7Zod8evNX{wk{8qL(Rzcsd3G^;^O#tY%_)&$( z7r~FZ#Wm8-6>&Bu4hMr4?0d#Y41_mDq&k?dA1 zGyqWET}2O6c;|}>7p)eA-G?0qGP%JE(yIgnusm@tep~0iqhtN|-+wLe hUkm*IEMO_Pt?PCm{F?#qi9qzT@D-C^i+*u<^gll5^^^br literal 0 HcmV?d00001 diff --git a/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/images/farm.png b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/images/farm.png new file mode 100644 index 0000000000000000000000000000000000000000..9aa88969f7b1e77bb23c81305ed8668847fe43d1 GIT binary patch literal 5760 zcmeHrS5#9`uyzs%JrW>7C}IGmDlIgr0YdLh1%V*FBOPf5K?u@|6al3pMHDGY2c`ES z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)b!_6QV3q+aCKecQDtW1}a$+IL_S6loyn{H;!I*c*3MCYA7%9gn9#aza;mVX=s zBYeI4`GcR~qyJ_-(ayioAwjQn7ic!;d+0jO0xpKukNc;r_-HTo(*OL+Hy-(~WdgDb z4j{QxtsN~7)+uX@usvlR_mQhwZfZ2$(I^BJHf1rH#}ux;gi7Sxyl!PPyM zG4GAQ>?vV6>E2F?U^^YgT!1T-B>U0ws9q4V=OP>pmWI_D13E}#ZXhNFIlm9V^re7U zZ9q(eO-l(J092UC*=tZvIvB9yt=-)LguusEqcoOKWcSxGDCjx6a0pTEzNih@lwCy+ z+%VwLVXn(2{7v6Zpg9o9I>RIzRkBS%RX| literal 0 HcmV?d00001 diff --git a/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/pages/index/index.js b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/pages/index/index.js new file mode 100644 index 00000000..d4c48f78 --- /dev/null +++ b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/pages/index/index.js @@ -0,0 +1,90 @@ +const app = getApp() + +Page({ + data: { + productId: app.globalData.productId, + deviceName: app.globalData.deviceName, + stateReported: {}, + }, + onLoad: function (options) { + console.log("index onLoad") + if (!app.globalData.productId) { + wx.showToast({ + title: "产品ID不能为空", + icon: 'none', + duration: 3000 + }) + return + } else if (!app.globalData.deviceName) { + wx.showToast({ + title: "设备名称不能为空", + icon: 'none', + duration: 3000 + }) + return + } + this.update() + }, + update() { + wx.showLoading() + wx.cloud.callFunction({ + name: 'iothub-shadow-query', + data: { + productId: app.globalData.productId, + deviceName: app.globalData.deviceName, + }, + success: res => { + wx.showToast({ + title: '调用成功', + }) + let deviceData = JSON.parse(res.result.Data) + this.setData({ + stateReported: deviceData.payload.state.reported + }) + console.log("result:", deviceData) + }, + fail: err => { + wx.showToast({ + icon: 'none', + title: '调用失败', + }) + console.error('[云函数] [iotexplorer] 调用失败:', err) + } + }) + }, + switchChange(e) { + let value = 0 + if (e.detail.value == true) { + value = 1 + } + let item = e.currentTarget.dataset.item + let obj = { + [`${item}`]: value + } + let payload = JSON.stringify(obj) + console.log(payload) + wx.showLoading() + wx.cloud.callFunction({ + name: 'iothub-publish', + data: { + ProductId: app.globalData.productId, + DeviceName: app.globalData.deviceName, + Topic: "", + Payload: payload, + }, + success: res => { + wx.showToast({ + title: '调用成功', + }) + console.log("res:", res) + }, + fail: err => { + wx.showToast({ + icon: 'none', + title: '调用失败', + }) + console.error('[云函数] [iotexplorer] 调用失败:', err) + } + }) + }, +}) \ No newline at end of file diff --git a/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/pages/index/index.json b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/pages/index/index.json new file mode 100644 index 00000000..9e26dfee --- /dev/null +++ b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/pages/index/index.json @@ -0,0 +1 @@ +{} \ No newline at end of file diff --git a/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/pages/index/index.wxml b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/pages/index/index.wxml new file mode 100644 index 00000000..b7e2eb77 --- /dev/null +++ b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/pages/index/index.wxml @@ -0,0 +1,65 @@ + + + + + + + 设备信息 + + + + 产品ID + {{productId}} + + + 设备名称 + {{deviceName}} + + + + \n + +

    + + + 农业Demo + + + + + + + + 照明 + + + + + + 风扇 + + + + + + 温度 + + {{stateReported.temperature}} + + + + + 湿度 + + {{stateReported.humidity}} + + % + + + 光照强度 + {{stateReported.light_intensity}} + lux + + + + \ No newline at end of file diff --git a/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/pages/index/index.wxss b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/pages/index/index.wxss new file mode 100644 index 00000000..0cae550d --- /dev/null +++ b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/pages/index/index.wxss @@ -0,0 +1,31 @@ +.body { + margin: 10rpx 20rpx; +} + +.box { + padding: 0rpx 20rpx; + border-top: 2px solid #000; +} + +.cell { + margin-top: 10rpx; + margin-bottom: 40rpx; + display: flex; + justify-content: space-between; + align-items: center; +} + +.left { + width: 50%; + text-align: left; +} + +.right { + width: 40%; + text-align: right; +} + +.unit { + width: 10%; + text-align: right; +} diff --git a/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/sitemap.json b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/sitemap.json new file mode 100644 index 00000000..ca02add2 --- /dev/null +++ b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/miniprogram/sitemap.json @@ -0,0 +1,7 @@ +{ + "desc": "关于本文件的更多信息,请参考文档 https://developers.weixin.qq.com/miniprogram/dev/framework/sitemap.html", + "rules": [{ + "action": "allow", + "page": "*" + }] +} \ No newline at end of file diff --git a/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/project.config.json b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/project.config.json new file mode 100644 index 00000000..f80ad225 --- /dev/null +++ b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/project.config.json @@ -0,0 +1,47 @@ +{ + "miniprogramRoot": "miniprogram/", + "cloudfunctionRoot": "cloudfunctions/", + "setting": { + "urlCheck": false, + "es6": true, + "postcss": true, + "minified": true, + "newFeature": true, + "autoAudits": false, + "checkInvalidKey": true, + "checkSiteMap": true, + "uploadWithSourceMap": true, + "babelSetting": { + "ignore": [], + "disablePlugins": [], + "outputPath": "" + }, + "nodeModules": true + }, + "appid": "wx394efa031612f9b5", + "projectname": "qcloud_iothub_mp_cloudfunctions_farmai", + "libVersion": "2.7.7", + "simulatorType": "wechat", + "simulatorPluginLibVersion": {}, + "cloudfunctionTemplateRoot": "cloudfunctionTemplate", + "condition": { + "search": { + "current": -1, + "list": [] + }, + "conversation": { + "current": -1, + "list": [] + }, + "plugin": { + "current": -1, + "list": [] + }, + "game": { + "list": [] + }, + "miniprogram": { + "current": 0 + } + } +} \ No newline at end of file From c4c60c3722df23a5c6c5a295faaf88959480e391 Mon Sep 17 00:00:00 2001 From: daishengdong Date: Fri, 20 Dec 2019 11:20:30 +0800 Subject: [PATCH 6/8] fix a bug consider this situation: no more fresh block, meantime an item with such a big size come in, and currently no block inuse has sufficient space to save this item, the code will run into the modified line, and KV_MGR_WORKSPACE will be set to KV_BLK_INVALID. this will cause no matter what size of an item wanna come in again, kv_blk_search_suitable just return KV_BLK_INVALID because "if (KV_MGR_WORKSPACE == KV_BLK_INVALID)" is true. --- components/fs/kv/tos_kv.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/components/fs/kv/tos_kv.c b/components/fs/kv/tos_kv.c index 450173d7..f99e76b1 100644 --- a/components/fs/kv/tos_kv.c +++ b/components/fs/kv/tos_kv.c @@ -188,8 +188,7 @@ __STATIC__ uint32_t kv_blk_search_suitable(uint32_t item_size) // no more fresh block, cannot allocate new block and cannot do gc neither. if (KV_MGR_BLK_NUM_FRESH < 1) { - KV_MGR_WORKSPACE = KV_BLK_INVALID; - return KV_MGR_WORKSPACE; + return KV_BLK_INVALID; } // if we have more than one fresh block, just give it out From a9e1ee1de1e48df4cbe91573a2e23045eed2ad6a Mon Sep 17 00:00:00 2001 From: royye Date: Fri, 20 Dec 2019 11:20:39 +0800 Subject: [PATCH 7/8] update example sensor_e53_ia1_e2e_demo --- .../README.md | 31 ++----------------- 1 file changed, 3 insertions(+), 28 deletions(-) diff --git a/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/README.md b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/README.md index 55eb8c11..93c7a088 100644 --- a/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/README.md +++ b/tools/Mini_Program/qcloud_iothub_mp_cloudfunctions_farmai/README.md @@ -1,29 +1,4 @@ -### 智能灯小程序云开发DEMO +### 小程序云开发DEMO 1. 说明 -本示例小程序配合TencentOS_tiny智能灯数据模板示例使用:TencentOS_tiny/examples/tencent_cloud_sdk_data_template -[腾讯云侧接入文档参见: 智能灯接入指引](https://cloud.tencent.com/document/product/1081/34744) - -2. tencent_cloud_sdk_data_template 接入腾讯云explorer后,在 app.js 中修改以下字段即可使用 -```` - globalData: { - // 腾讯云物联网开发平台explorer中获取 产品ID和设备名称 - productId: "U2LPAXBT2C", // 产品ID - deviceName: "royye_light", // 设备名称 - // 腾讯云控制台-访问管理-访问密钥-API密钥管理中获取 SecretId, secretKey - secretId: "AKIDxZ2LTTi84eaR3OfS8hnfxd4JHzQatFpF", - secretKey: "UigMrA9rJXUCeoiBQP8dsJuJ6sYzmNjs", - // 接口 Region 字段 - region: "ap-guangzhou", - // 云开发的环境名称。此处需要替换为云开发创建的环境名称 - env: "tos-demo" - }, -```` - -3. 测试通过后,如果需要发布小程序,则还需要在小程序管理后台进行服务器域名配置 -[微信小程序添加服务器端就接口域名](https://jingyan.baidu.com/article/ce09321bb6e9c12bff858f92.html) -进入微信公众平台小程序后台 - 开发 - 开发设置 - 服务器域名 - 输入域名: iotexplorer.tencentcloudapi.com - -### 云开发参考文档 - -- [云开发文档](https://developers.weixin.qq.com/miniprogram/dev/wxcloud/basis/getting-started.html) - +本示例小程序配合TencentOS_tiny开发板智慧农业传感器扩展板使用 +TencentOS-tiny/examples/sensor_e53_ia1_e2e_demo From 5c4a1abbe299ecc6b2e1f7be8d4c4b38f2bb9614 Mon Sep 17 00:00:00 2001 From: royye Date: Fri, 20 Dec 2019 11:22:14 +0800 Subject: [PATCH 8/8] update example sensor_e53_ia1_e2e_demo --- examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo.c b/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo.c index 28de363d..83a5155c 100644 --- a/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo.c +++ b/examples/sensor_e53_ia1_e2e_demo/e53_ia1_e2e_demo.c @@ -350,7 +350,7 @@ void helloworld(void *arg) osThreadDef(helloworld, osPriorityNormal, 1, TASK2_STK_SIZE); void application_entry(void *arg) { - osThreadCreate(osThread(helloworld), NULL); + osThreadCreate(osThread(qcloud_agent), NULL); } /*