add GD32V TencentOS tiny EVB_LX board
add GD32V TencentOS tiny EVB_LX board
This commit is contained in:
11
board/TencentOS_tiny_EVB_LX/.project
Normal file
11
board/TencentOS_tiny_EVB_LX/.project
Normal file
@@ -0,0 +1,11 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>GigaDevice_GD32VF103C_START</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
</natures>
|
||||||
|
</projectDescription>
|
173
board/TencentOS_tiny_EVB_LX/BSP/Inc/EVB_LX_IoT_gd32vf103.h
Normal file
173
board/TencentOS_tiny_EVB_LX/BSP/Inc/EVB_LX_IoT_gd32vf103.h
Normal file
@@ -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 */
|
||||||
|
|
80
board/TencentOS_tiny_EVB_LX/BSP/Inc/bmp.h
Normal file
80
board/TencentOS_tiny_EVB_LX/BSP/Inc/bmp.h
Normal file
@@ -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
|
||||||
|
|
||||||
|
|
11
board/TencentOS_tiny_EVB_LX/BSP/Inc/mcu_init.h
Normal file
11
board/TencentOS_tiny_EVB_LX/BSP/Inc/mcu_init.h
Normal file
@@ -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
|
40
board/TencentOS_tiny_EVB_LX/BSP/Inc/oled.h
Normal file
40
board/TencentOS_tiny_EVB_LX/BSP/Inc/oled.h
Normal file
@@ -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
|
230
board/TencentOS_tiny_EVB_LX/BSP/Inc/oledfont.h
Normal file
230
board/TencentOS_tiny_EVB_LX/BSP/Inc/oledfont.h
Normal file
@@ -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
|
13
board/TencentOS_tiny_EVB_LX/BSP/Inc/usart.h
Normal file
13
board/TencentOS_tiny_EVB_LX/BSP/Inc/usart.h
Normal file
@@ -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
|
208
board/TencentOS_tiny_EVB_LX/BSP/Src/EVB_LX_IoT_gd32vf103.c
Normal file
208
board/TencentOS_tiny_EVB_LX/BSP/Src/EVB_LX_IoT_gd32vf103.c
Normal file
@@ -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 <stdio.h>
|
||||||
|
|
||||||
|
/* 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;
|
||||||
|
}*/
|
||||||
|
|
11
board/TencentOS_tiny_EVB_LX/BSP/Src/gd32vf103_it.c
Normal file
11
board/TencentOS_tiny_EVB_LX/BSP/Src/gd32vf103_it.c
Normal file
@@ -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();
|
||||||
|
}
|
||||||
|
}
|
26
board/TencentOS_tiny_EVB_LX/BSP/Src/mcu_init.c
Normal file
26
board/TencentOS_tiny_EVB_LX/BSP/Src/mcu_init.c
Normal file
@@ -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);
|
||||||
|
|
||||||
|
}
|
312
board/TencentOS_tiny_EVB_LX/BSP/Src/oled.c
Normal file
312
board/TencentOS_tiny_EVB_LX/BSP/Src/oled.c
Normal file
@@ -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;t<len;t++)
|
||||||
|
{
|
||||||
|
temp=(num/oled_pow(10,len-t-1))%10;
|
||||||
|
if(enshow==0&&t<(len-1))
|
||||||
|
{
|
||||||
|
if(temp==0)
|
||||||
|
{
|
||||||
|
OLED_ShowChar(x+(size2/2)*t,y,' ',size2);
|
||||||
|
continue;
|
||||||
|
}else
|
||||||
|
enshow=1;
|
||||||
|
}
|
||||||
|
OLED_ShowChar(x+(size2/2)*t,y,temp+'0',size2);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
void OLED_ShowString(uint8_t x,uint8_t y,uint8_t *chr,uint8_t Char_Size)
|
||||||
|
{
|
||||||
|
unsigned char j=0;
|
||||||
|
while (chr[j]!='\0')
|
||||||
|
{
|
||||||
|
OLED_ShowChar(x,y,chr[j],Char_Size);
|
||||||
|
x+=8;
|
||||||
|
if(x>120)
|
||||||
|
{
|
||||||
|
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<y1;y++)
|
||||||
|
{
|
||||||
|
OLED_Set_Pos(x0,y);
|
||||||
|
for(x=x0;x<x1;x++)
|
||||||
|
{
|
||||||
|
OLED_WR_Byte(BMP[j++],OLED_DATA);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void OLED_Init(void)
|
||||||
|
{
|
||||||
|
rcu_periph_clock_enable(RCU_GPIOB);
|
||||||
|
gpio_init(GPIOB, GPIO_MODE_OUT_PP, GPIO_OSPEED_50MHZ, GPIO_PIN_10);
|
||||||
|
gpio_init(GPIOB, GPIO_MODE_OUT_PP, GPIO_OSPEED_50MHZ, GPIO_PIN_11);
|
||||||
|
delay(200);
|
||||||
|
OLED_WR_Byte(0xAE,OLED_CMD);
|
||||||
|
|
||||||
|
OLED_WR_Byte(0x00,OLED_CMD);//---set low column address
|
||||||
|
OLED_WR_Byte(0x12,OLED_CMD);//---set high column address
|
||||||
|
|
||||||
|
OLED_WR_Byte(0x00,OLED_CMD);//-not offset
|
||||||
|
OLED_WR_Byte(0xB0,OLED_CMD);//-not offset
|
||||||
|
|
||||||
|
OLED_WR_Byte(0x81,OLED_CMD);
|
||||||
|
OLED_WR_Byte(0x4f,OLED_CMD);
|
||||||
|
|
||||||
|
OLED_WR_Byte(0xa1,OLED_CMD);
|
||||||
|
|
||||||
|
OLED_WR_Byte(0xa6,OLED_CMD);
|
||||||
|
|
||||||
|
OLED_WR_Byte(0xa8,OLED_CMD);
|
||||||
|
OLED_WR_Byte(0x1f,OLED_CMD);
|
||||||
|
|
||||||
|
OLED_WR_Byte(0xc8,OLED_CMD);
|
||||||
|
|
||||||
|
OLED_WR_Byte(0xd3,OLED_CMD);
|
||||||
|
OLED_WR_Byte(0x00,OLED_CMD);
|
||||||
|
|
||||||
|
OLED_WR_Byte(0xd5,OLED_CMD);
|
||||||
|
OLED_WR_Byte(0x80,OLED_CMD);
|
||||||
|
|
||||||
|
OLED_WR_Byte(0xd9,OLED_CMD);
|
||||||
|
OLED_WR_Byte(0x1f,OLED_CMD);
|
||||||
|
|
||||||
|
OLED_WR_Byte(0xda,OLED_CMD);
|
||||||
|
OLED_WR_Byte(0x12,OLED_CMD);
|
||||||
|
|
||||||
|
OLED_WR_Byte(0xdb,OLED_CMD);
|
||||||
|
OLED_WR_Byte(0x40,OLED_CMD);
|
||||||
|
|
||||||
|
OLED_WR_Byte(0x8d,OLED_CMD);
|
||||||
|
OLED_WR_Byte(0x14,OLED_CMD);
|
||||||
|
|
||||||
|
OLED_WR_Byte(0xaf,OLED_CMD);
|
||||||
|
OLED_Clear();
|
||||||
|
}
|
66
board/TencentOS_tiny_EVB_LX/BSP/Src/usart.c
Normal file
66
board/TencentOS_tiny_EVB_LX/BSP/Src/usart.c
Normal file
@@ -0,0 +1,66 @@
|
|||||||
|
#include "gd32vf103.h"
|
||||||
|
#include "usart.h"
|
||||||
|
void usart0_init(int baud)
|
||||||
|
{
|
||||||
|
/* enable GPIO clock */
|
||||||
|
rcu_periph_clock_enable(RCU_GPIOA);
|
||||||
|
|
||||||
|
/* enable USART0 clock */
|
||||||
|
rcu_periph_clock_enable(RCU_USART0);
|
||||||
|
|
||||||
|
/* connect port to USART0_Tx */
|
||||||
|
gpio_init(USART0_GPIO_PORT, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, USART0_GPIO_TX_PIN);
|
||||||
|
|
||||||
|
/* connect port to USART0_Rx */
|
||||||
|
gpio_init(USART0_GPIO_PORT, GPIO_MODE_IN_FLOATING, GPIO_OSPEED_50MHZ, USART0_GPIO_RX_PIN);
|
||||||
|
|
||||||
|
/* USART0 configure */
|
||||||
|
usart_deinit(USART0);
|
||||||
|
usart_baudrate_set(USART0, baud);
|
||||||
|
usart_word_length_set(USART0, USART_WL_8BIT);
|
||||||
|
usart_stop_bit_set(USART0, USART_STB_1BIT);
|
||||||
|
usart_parity_config(USART0, USART_PM_NONE);
|
||||||
|
usart_hardware_flow_rts_config(USART0, USART_RTS_DISABLE);
|
||||||
|
usart_hardware_flow_cts_config(USART0, USART_CTS_DISABLE);
|
||||||
|
usart_receive_config(USART0, USART_RECEIVE_ENABLE);
|
||||||
|
usart_transmit_config(USART0, USART_TRANSMIT_ENABLE);
|
||||||
|
usart_enable(USART0);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
void uart3_init(int baud)
|
||||||
|
{
|
||||||
|
/* enable GPIO clock */
|
||||||
|
rcu_periph_clock_enable(RCU_GPIOC);
|
||||||
|
|
||||||
|
/* enable USART0 clock */
|
||||||
|
rcu_periph_clock_enable(RCU_UART3);
|
||||||
|
|
||||||
|
/* connect port to USART0_Tx */
|
||||||
|
gpio_init(USART3_GPIO_PORT, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, USART3_GPIO_TX_PIN);
|
||||||
|
|
||||||
|
/* connect port to USART0_Rx */
|
||||||
|
gpio_init(USART3_GPIO_PORT, GPIO_MODE_IN_FLOATING, GPIO_OSPEED_50MHZ, USART3_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);
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
int _put_char(int ch)
|
||||||
|
{
|
||||||
|
usart_data_transmit(UART3, (uint8_t) ch );
|
||||||
|
while ( usart_flag_get(UART3, USART_FLAG_TBE)== RESET){
|
||||||
|
}
|
||||||
|
|
||||||
|
return ch;
|
||||||
|
}
|
70
board/TencentOS_tiny_EVB_LX/TOS_CONFIG/tos_config.h
Normal file
70
board/TencentOS_tiny_EVB_LX/TOS_CONFIG/tos_config.h
Normal file
@@ -0,0 +1,70 @@
|
|||||||
|
#ifndef INC_TOS_CONFIG_H_
|
||||||
|
#define INC_TOS_CONFIG_H_
|
||||||
|
|
||||||
|
#include "gd32vf103.h"
|
||||||
|
#include "stddef.h"
|
||||||
|
|
||||||
|
// 配置TencentOS tiny默认支持的最大优先级数量
|
||||||
|
#define TOS_CFG_TASK_PRIO_MAX 10u
|
||||||
|
|
||||||
|
// 配置TencentOS tiny的内核是否开启时间片轮转
|
||||||
|
#define TOS_CFG_ROUND_ROBIN_EN 0u
|
||||||
|
|
||||||
|
// 配置TencentOS tiny是否校验指针合法
|
||||||
|
#define TOS_CFG_OBJECT_VERIFY 0u
|
||||||
|
|
||||||
|
// TencentOS tiny 事件模块功能宏
|
||||||
|
#define TOS_CFG_EVENT_EN 1u
|
||||||
|
|
||||||
|
// 配置TencentOS tiny是否开启动态内存模块
|
||||||
|
#define TOS_CFG_MMHEAP_EN 1u
|
||||||
|
|
||||||
|
// 配置TencentOS tiny动态内存池大小
|
||||||
|
#define TOS_CFG_MMHEAP_DEFAULT_POOL_SIZE 8192
|
||||||
|
|
||||||
|
// 配置TencentOS tiny是否开启互斥锁模块
|
||||||
|
#define TOS_CFG_MUTEX_EN 1u
|
||||||
|
|
||||||
|
// 配置TencentOS tiny是否开启队列模块
|
||||||
|
#define TOS_CFG_QUEUE_EN 1u
|
||||||
|
|
||||||
|
// 配置TencentOS tiny是否开启软件定时器模块
|
||||||
|
#define TOS_CFG_TIMER_EN 0u
|
||||||
|
|
||||||
|
// 配置TencentOS tiny是否开启信号量模块
|
||||||
|
#define TOS_CFG_SEM_EN 1u
|
||||||
|
|
||||||
|
#define TOS_CFG_CPU_SYSTICK_PRIO 0xF
|
||||||
|
|
||||||
|
#if (TOS_CFG_QUEUE_EN > 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_ */
|
438
board/TencentOS_tiny_EVB_LX/eclipse/hello_world/.cproject
Normal file
438
board/TencentOS_tiny_EVB_LX/eclipse/hello_world/.cproject
Normal file
@@ -0,0 +1,438 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
|
||||||
|
<?fileVersion 4.0.0?><cproject storage_type_id="org.eclipse.cdt.core.XmlProjectDescriptionStorage">
|
||||||
|
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.settings">
|
||||||
|
|
||||||
|
<cconfiguration id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.1626121275">
|
||||||
|
|
||||||
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.1626121275" moduleId="org.eclipse.cdt.core.settings" name="Debug">
|
||||||
|
|
||||||
|
<externalSettings/>
|
||||||
|
|
||||||
|
<extensions>
|
||||||
|
|
||||||
|
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||||
|
|
||||||
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
|
||||||
|
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
|
||||||
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
|
||||||
|
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
|
||||||
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
|
||||||
|
</extensions>
|
||||||
|
|
||||||
|
</storageModule>
|
||||||
|
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
|
||||||
|
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.debug" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.1626121275" name="Debug" optionalBuildProperties="org.eclipse.cdt.docker.launcher.containerbuild.property.selectedvolumes=,org.eclipse.cdt.docker.launcher.containerbuild.property.volumes=" parent="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug">
|
||||||
|
|
||||||
|
<folderInfo id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.1626121275." name="/" resourcePath="">
|
||||||
|
|
||||||
|
<toolChain id="ilg.gnumcueclipse.managedbuild.cross.riscv.toolchain.elf.debug.8330431" name="RISC-V Cross GCC" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.toolchain.elf.debug">
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createflash.1202731164" name="Create flash image" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createflash" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createlisting.1939916912" name="Create extended listing" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createlisting" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.printsize.662073656" name="Print size" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.printsize" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level.1313552818" name="Optimization Level" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level.debug" valueType="enumerated"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.messagelength.1404627735" name="Message length (-fmessage-length=0)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.messagelength" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.signedchar.1267661089" name="'char' is signed (-fsigned-char)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.signedchar" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.functionsections.1426360736" name="Function sections (-ffunction-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.functionsections" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.datasections.759847876" name="Data sections (-fdata-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.datasections" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.level.668391469" name="Debug level" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.level" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.level.max" valueType="enumerated"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.format.1164967264" name="Debug format" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.format"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.toolchain.name.1072740689" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.toolchain.name" value="GNU MCU RISC-V GCC" valueType="string"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.prefix.1957750909" name="Prefix" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.prefix" value="riscv-none-embed-" valueType="string"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.c.1974277961" name="C compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.c" value="gcc" valueType="string"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.cpp.1904763105" name="C++ compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.cpp" value="g++" valueType="string"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.ar.1687279771" name="Archiver" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.ar" value="ar" valueType="string"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objcopy.990721007" name="Hex/Bin converter" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objcopy" value="objcopy" valueType="string"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objdump.1007157873" name="Listing generator" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objdump" value="objdump" valueType="string"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.size.2005273946" name="Size command" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.size" value="size" valueType="string"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.make.817675941" name="Build command" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.make" value="make" valueType="string"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.rm.1016789776" name="Remove command" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.rm" value="rm" valueType="string"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.toolchain.id.631765752" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.toolchain.id" value="512258282" valueType="string"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.base.1350567922" name="Architecture" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.base" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.arch.rv32i" valueType="enumerated"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.multiply.1880868567" name="Multiply extension (RVM)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.multiply" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.atomic.456415389" name="Atomic extension (RVA)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.atomic" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.compressed.2087083466" name="Compressed extension (RVC)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.isa.compressed" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.abi.integer.520770065" name="Integer ABI" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.abi.integer" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.abi.integer.ilp32" valueType="enumerated"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.codemodel.1599179399" name="Code model" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.codemodel" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.codemodel.default" valueType="enumerated"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.smalldatalimit.1215554700" name="Small data limit" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.target.smalldatalimit" value="4" valueType="string"/>
|
||||||
|
|
||||||
|
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnumcueclipse.managedbuild.cross.riscv.targetPlatform.1085168581" isAbstract="false" osList="all" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.targetPlatform"/>
|
||||||
|
|
||||||
|
<builder buildPath="${workspace_loc:/hello_world}/Debug" id="ilg.gnumcueclipse.managedbuild.cross.riscv.builder.1312339984" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.builder"/>
|
||||||
|
|
||||||
|
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.933880407" name="GNU RISC-V Cross Assembler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler">
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.usepreprocessor.525634082" name="Use preprocessor" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.include.paths.334418871" name="Include paths (-I)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/Application}""/>
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/GD32VF103_Firmware_Library/RISCV/drivers}""/>
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/arch/risc-v/bumblebee}""/>
|
||||||
|
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.asmlisting.842125273" name="Generate assembler listing (-Wa,-adhlns="$@.lst")" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.asmlisting" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<inputType id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.input.1565468565" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.input"/>
|
||||||
|
|
||||||
|
</tool>
|
||||||
|
|
||||||
|
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.578468153" name="GNU RISC-V Cross C Compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler">
|
||||||
|
|
||||||
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.include.paths.1686562117" name="Include paths (-I)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.include.paths" useByScannerDiscovery="true" valueType="includePath">
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value="../../../TOS_CONFIG"/>
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/kernel/pm/include}""/>
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/kernel/hal/include}""/>
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/kernel/core/include}""/>
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/arch/risc-v/common/include}""/>
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/GD32VF103_Firmware_Library/RISCV/drivers}""/>
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/GD32VF103_Firmware_Library/GD32VF103_standard_peripheral/Include}""/>
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/GD32VF103_Firmware_Library/RISCV/stubs}""/>
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/GD32VF103_Firmware_Library/GD32VF103_standard_peripheral}""/>
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value=".././"/>
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/arch/kernel/core/include}""/>
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/arch/risc-v/rv32i}""/>
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/arch/risc-v/bumblebee}""/>
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/TencentOS_tiny/kernel/evtdrv/include}""/>
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/hello_world/Application/Inc}""/>
|
||||||
|
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.defs.1188292994" name="Defined symbols (-D)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.defs" useByScannerDiscovery="true" valueType="definedSymbols">
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value="USE_STDPERIPH_DRIVER"/>
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value="GD32VF103C_START"/>
|
||||||
|
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.asmlisting.2053887505" name="Generate assembler listing (-Wa,-adhlns="$@.lst")" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.compiler.asmlisting" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<inputType id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.input.750717644" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.input"/>
|
||||||
|
|
||||||
|
</tool>
|
||||||
|
|
||||||
|
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.compiler.1930629688" name="GNU RISC-V Cross C++ Compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.compiler"/>
|
||||||
|
|
||||||
|
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker.1064763742" name="GNU RISC-V Cross C Linker" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker">
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.gcsections.153022752" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.gcsections" useByScannerDiscovery="false" value="false" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.usenewlibnano.769188653" name="Use newlib-nano (--specs=nano.specs)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.usenewlibnano" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.nostart.1138121561" name="Do not use standard start files (-nostartfiles)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.nostart" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option IS_BUILTIN_EMPTY="false" IS_VALUE_EMPTY="false" id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.scriptfile.134450266" name="Script files (-T)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.scriptfile" useByScannerDiscovery="false" valueType="stringList">
|
||||||
|
|
||||||
|
<listOptionValue builtIn="false" value=""${workspace_loc:/${ProjName}/link.lds}""/>
|
||||||
|
|
||||||
|
</option>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.usenewlibnosys.584568698" name="Do not use syscalls (--specs=nosys.specs)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.usenewlibnosys" useByScannerDiscovery="false" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.other.328577347" name="Other linker flags" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.other" useByScannerDiscovery="false" value="" valueType="string"/>
|
||||||
|
|
||||||
|
<inputType id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker.input.316705344" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker.input">
|
||||||
|
|
||||||
|
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||||
|
|
||||||
|
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||||
|
|
||||||
|
</inputType>
|
||||||
|
|
||||||
|
</tool>
|
||||||
|
|
||||||
|
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.linker.42331133" name="GNU RISC-V Cross C++ Linker" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.linker">
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.cpp.linker.gcsections.399385481" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
</tool>
|
||||||
|
|
||||||
|
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.archiver.107126240" name="GNU RISC-V Cross Archiver" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.archiver"/>
|
||||||
|
|
||||||
|
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createflash.950120165" name="GNU RISC-V Cross Create Flash Image" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createflash"/>
|
||||||
|
|
||||||
|
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createlisting.125062338" name="GNU RISC-V Cross Create Listing" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createlisting">
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.source.1032156266" name="Display source (--source|-S)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.source" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.allheaders.130399435" name="Display all headers (--all-headers|-x)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.allheaders" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.demangle.1410206102" name="Demangle names (--demangle|-C)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.demangle" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.linenumbers.80630986" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.linenumbers" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.wide.1257944666" name="Wide lines (--wide|-w)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.wide" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
</tool>
|
||||||
|
|
||||||
|
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.printsize.855604372" name="GNU RISC-V Cross Print Size" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.printsize">
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.printsize.format.545311739" name="Size format" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.printsize.format"/>
|
||||||
|
|
||||||
|
</tool>
|
||||||
|
|
||||||
|
</toolChain>
|
||||||
|
|
||||||
|
</folderInfo>
|
||||||
|
|
||||||
|
</configuration>
|
||||||
|
|
||||||
|
</storageModule>
|
||||||
|
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||||
|
|
||||||
|
<storageModule moduleId="ilg.gnumcueclipse.managedbuild.packs"/>
|
||||||
|
|
||||||
|
</cconfiguration>
|
||||||
|
|
||||||
|
<cconfiguration id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.991040509">
|
||||||
|
|
||||||
|
<storageModule buildSystemId="org.eclipse.cdt.managedbuilder.core.configurationDataProvider" id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.991040509" moduleId="org.eclipse.cdt.core.settings" name="Release">
|
||||||
|
|
||||||
|
<externalSettings/>
|
||||||
|
|
||||||
|
<extensions>
|
||||||
|
|
||||||
|
<extension id="org.eclipse.cdt.core.ELF" point="org.eclipse.cdt.core.BinaryParser"/>
|
||||||
|
|
||||||
|
<extension id="org.eclipse.cdt.core.GASErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
|
||||||
|
<extension id="org.eclipse.cdt.core.GmakeErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
|
||||||
|
<extension id="org.eclipse.cdt.core.GLDErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
|
||||||
|
<extension id="org.eclipse.cdt.core.CWDLocator" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
|
||||||
|
<extension id="org.eclipse.cdt.core.GCCErrorParser" point="org.eclipse.cdt.core.ErrorParser"/>
|
||||||
|
|
||||||
|
</extensions>
|
||||||
|
|
||||||
|
</storageModule>
|
||||||
|
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
|
||||||
|
<configuration artifactName="${ProjName}" buildArtefactType="org.eclipse.cdt.build.core.buildArtefactType.exe" buildProperties="org.eclipse.cdt.build.core.buildArtefactType=org.eclipse.cdt.build.core.buildArtefactType.exe,org.eclipse.cdt.build.core.buildType=org.eclipse.cdt.build.core.buildType.release" cleanCommand="${cross_rm} -rf" description="" id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.991040509" name="Release" optionalBuildProperties="" parent="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release">
|
||||||
|
|
||||||
|
<folderInfo id="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.991040509." name="/" resourcePath="">
|
||||||
|
|
||||||
|
<toolChain id="ilg.gnumcueclipse.managedbuild.cross.riscv.toolchain.elf.release.475921123" name="RISC-V Cross GCC" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.toolchain.elf.release">
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createflash.2095790256" name="Create flash image" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createflash" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createlisting.496100242" name="Create extended listing" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.createlisting" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.printsize.527839441" name="Print size" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.addtools.printsize" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level.1036215044" name="Optimization Level" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level" value="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.level.size" valueType="enumerated"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.messagelength.1566858053" name="Message length (-fmessage-length=0)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.messagelength" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.signedchar.313791122" name="'char' is signed (-fsigned-char)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.signedchar" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.functionsections.794704205" name="Function sections (-ffunction-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.functionsections" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.datasections.1897750591" name="Data sections (-fdata-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.optimization.datasections" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.level.1176085190" name="Debug level" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.level"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.format.1337198600" name="Debug format" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.debugging.format"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.toolchain.name.2061911006" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.toolchain.name" value="GNU MCU RISC-V GCC" valueType="string"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.prefix.1210955802" name="Prefix" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.prefix" value="riscv-none-embed-" valueType="string"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.c.847078392" name="C compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.c" value="gcc" valueType="string"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.cpp.1611409518" name="C++ compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.cpp" value="g++" valueType="string"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.ar.537190966" name="Archiver" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.ar" value="ar" valueType="string"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objcopy.2075663864" name="Hex/Bin converter" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objcopy" value="objcopy" valueType="string"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objdump.718077138" name="Listing generator" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.objdump" value="objdump" valueType="string"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.size.893508518" name="Size command" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.size" value="size" valueType="string"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.make.374071512" name="Build command" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.make" value="make" valueType="string"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.rm.1639653064" name="Remove command" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.command.rm" value="rm" valueType="string"/>
|
||||||
|
|
||||||
|
<targetPlatform archList="all" binaryParser="org.eclipse.cdt.core.ELF" id="ilg.gnumcueclipse.managedbuild.cross.riscv.targetPlatform.1803353979" isAbstract="false" osList="all" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.targetPlatform"/>
|
||||||
|
|
||||||
|
<builder buildPath="${workspace_loc:/hello_world}/Release" id="ilg.gnumcueclipse.managedbuild.cross.riscv.builder.230771356" keepEnvironmentInBuildfile="false" managedBuildOn="true" name="Gnu Make Builder" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.builder"/>
|
||||||
|
|
||||||
|
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.1428729449" name="GNU RISC-V Cross Assembler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler">
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.usepreprocessor.52580663" name="Use preprocessor" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.assembler.usepreprocessor" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<inputType id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.input.1643948477" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.assembler.input"/>
|
||||||
|
|
||||||
|
</tool>
|
||||||
|
|
||||||
|
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.552753469" name="GNU RISC-V Cross C Compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler">
|
||||||
|
|
||||||
|
<inputType id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.input.2138673318" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.input"/>
|
||||||
|
|
||||||
|
</tool>
|
||||||
|
|
||||||
|
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.compiler.718172304" name="GNU RISC-V Cross C++ Compiler" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.compiler"/>
|
||||||
|
|
||||||
|
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker.1287109288" name="GNU RISC-V Cross C Linker" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker">
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.gcsections.1718779452" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.c.linker.gcsections" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<inputType id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker.input.1022093215" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.linker.input">
|
||||||
|
|
||||||
|
<additionalInput kind="additionalinputdependency" paths="$(USER_OBJS)"/>
|
||||||
|
|
||||||
|
<additionalInput kind="additionalinput" paths="$(LIBS)"/>
|
||||||
|
|
||||||
|
</inputType>
|
||||||
|
|
||||||
|
</tool>
|
||||||
|
|
||||||
|
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.linker.240769017" name="GNU RISC-V Cross C++ Linker" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.cpp.linker">
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.cpp.linker.gcsections.1440099990" name="Remove unused sections (-Xlinker --gc-sections)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.cpp.linker.gcsections" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
</tool>
|
||||||
|
|
||||||
|
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.archiver.1053336007" name="GNU RISC-V Cross Archiver" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.archiver"/>
|
||||||
|
|
||||||
|
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createflash.1841998771" name="GNU RISC-V Cross Create Flash Image" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createflash"/>
|
||||||
|
|
||||||
|
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createlisting.544284869" name="GNU RISC-V Cross Create Listing" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.createlisting">
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.source.1246759690" name="Display source (--source|-S)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.source" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.allheaders.776860234" name="Display all headers (--all-headers|-x)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.allheaders" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.demangle.573544221" name="Demangle names (--demangle|-C)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.demangle" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.linenumbers.112752514" name="Display line numbers (--line-numbers|-l)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.linenumbers" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.wide.619039696" name="Wide lines (--wide|-w)" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.createlisting.wide" value="true" valueType="boolean"/>
|
||||||
|
|
||||||
|
</tool>
|
||||||
|
|
||||||
|
<tool id="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.printsize.384827639" name="GNU RISC-V Cross Print Size" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.tool.printsize">
|
||||||
|
|
||||||
|
<option id="ilg.gnumcueclipse.managedbuild.cross.riscv.option.printsize.format.1267897822" name="Size format" superClass="ilg.gnumcueclipse.managedbuild.cross.riscv.option.printsize.format"/>
|
||||||
|
|
||||||
|
</tool>
|
||||||
|
|
||||||
|
</toolChain>
|
||||||
|
|
||||||
|
</folderInfo>
|
||||||
|
|
||||||
|
</configuration>
|
||||||
|
|
||||||
|
</storageModule>
|
||||||
|
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.externalSettings"/>
|
||||||
|
|
||||||
|
</cconfiguration>
|
||||||
|
|
||||||
|
</storageModule>
|
||||||
|
|
||||||
|
<storageModule moduleId="cdtBuildSystem" version="4.0.0">
|
||||||
|
|
||||||
|
<project id="hello_world.ilg.gnumcueclipse.managedbuild.cross.riscv.target.elf.976385475" name="Executable" projectType="ilg.gnumcueclipse.managedbuild.cross.riscv.target.elf"/>
|
||||||
|
|
||||||
|
</storageModule>
|
||||||
|
|
||||||
|
<storageModule moduleId="scannerConfiguration">
|
||||||
|
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
|
||||||
|
<scannerConfigBuildInfo instanceId="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.1626121275;ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.debug.1626121275.;ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.578468153;ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.input.750717644">
|
||||||
|
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
|
||||||
|
<scannerConfigBuildInfo instanceId="ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.991040509;ilg.gnumcueclipse.managedbuild.cross.riscv.config.elf.release.991040509.;ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.552753469;ilg.gnumcueclipse.managedbuild.cross.riscv.tool.c.compiler.input.2138673318">
|
||||||
|
|
||||||
|
<autodiscovery enabled="true" problemReportingEnabled="true" selectedProfileId=""/>
|
||||||
|
|
||||||
|
</scannerConfigBuildInfo>
|
||||||
|
|
||||||
|
</storageModule>
|
||||||
|
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.core.LanguageSettingsProviders"/>
|
||||||
|
|
||||||
|
<storageModule moduleId="refreshScope" versionNumber="2">
|
||||||
|
|
||||||
|
<configuration configurationName="Debug">
|
||||||
|
|
||||||
|
<resource resourceType="PROJECT" workspacePath="/hello_world"/>
|
||||||
|
|
||||||
|
</configuration>
|
||||||
|
|
||||||
|
<configuration configurationName="Release">
|
||||||
|
|
||||||
|
<resource resourceType="PROJECT" workspacePath="/hello_world"/>
|
||||||
|
|
||||||
|
</configuration>
|
||||||
|
|
||||||
|
</storageModule>
|
||||||
|
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.make.core.buildtargets"/>
|
||||||
|
|
||||||
|
<storageModule moduleId="org.eclipse.cdt.internal.ui.text.commentOwnerProjectMappings"/>
|
||||||
|
|
||||||
|
</cproject>
|
1
board/TencentOS_tiny_EVB_LX/eclipse/hello_world/.gitignore
vendored
Normal file
1
board/TencentOS_tiny_EVB_LX/eclipse/hello_world/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
|||||||
|
/Debug/
|
94
board/TencentOS_tiny_EVB_LX/eclipse/hello_world/.project
Normal file
94
board/TencentOS_tiny_EVB_LX/eclipse/hello_world/.project
Normal file
@@ -0,0 +1,94 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<projectDescription>
|
||||||
|
<name>hello_world</name>
|
||||||
|
<comment></comment>
|
||||||
|
<projects>
|
||||||
|
</projects>
|
||||||
|
<buildSpec>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
|
||||||
|
<triggers>clean,full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
<buildCommand>
|
||||||
|
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
|
||||||
|
<triggers>full,incremental,</triggers>
|
||||||
|
<arguments>
|
||||||
|
</arguments>
|
||||||
|
</buildCommand>
|
||||||
|
</buildSpec>
|
||||||
|
<natures>
|
||||||
|
<nature>org.eclipse.cdt.core.cnature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
|
||||||
|
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
|
||||||
|
</natures>
|
||||||
|
<linkedResources>
|
||||||
|
<link>
|
||||||
|
<name>Application</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>virtual:/virtual</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>GD32VF103_Firmware_Library</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>$%7BPARENT-4-PROJECT_LOC%7D/platform/vendor_bsp/gd/GD32VF103_Firmware_Library</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>TencentOS_tiny</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>virtual:/virtual</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>Application/Inc</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>$%7BPARENT-2-PROJECT_LOC%7D/BSP/Inc</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>Application/Src</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>$%7BPARENT-2-PROJECT_LOC%7D/BSP/Src</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>Application/tos_config.h</name>
|
||||||
|
<type>1</type>
|
||||||
|
<locationURI>$%7BPARENT-2-PROJECT_LOC%7D/TOS_CONFIG/tos_config.h</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>TencentOS_tiny/arch</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>virtual:/virtual</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>TencentOS_tiny/kernel</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>$%7BPARENT-4-PROJECT_LOC%7D/kernel</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>TencentOS_tiny/arch/risc-v</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>virtual:/virtual</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>TencentOS_tiny/arch/risc-v/bumblebee</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>TOP_DIR/arch/risc-v/bumblebee/gcc</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>TencentOS_tiny/arch/risc-v/common</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>$%7BPARENT-4-PROJECT_LOC%7D/arch/risc-v/common</locationURI>
|
||||||
|
</link>
|
||||||
|
<link>
|
||||||
|
<name>TencentOS_tiny/arch/risc-v/rv32i</name>
|
||||||
|
<type>2</type>
|
||||||
|
<locationURI>TOP_DIR/arch/risc-v/rv32i/gcc</locationURI>
|
||||||
|
</link>
|
||||||
|
</linkedResources>
|
||||||
|
<variableList>
|
||||||
|
<variable>
|
||||||
|
<name>TOP_DIR</name>
|
||||||
|
<value>$%7BPARENT-4-PROJECT_LOC%7D</value>
|
||||||
|
</variable>
|
||||||
|
</variableList>
|
||||||
|
</projectDescription>
|
@@ -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 */
|
175
board/TencentOS_tiny_EVB_LX/eclipse/hello_world/link.lds
Normal file
175
board/TencentOS_tiny_EVB_LX/eclipse/hello_world/link.lds
Normal file
@@ -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
|
||||||
|
}
|
57
board/TencentOS_tiny_EVB_LX/eclipse/hello_world/main.c
Normal file
57
board/TencentOS_tiny_EVB_LX/eclipse/hello_world/main.c
Normal file
@@ -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();
|
||||||
|
|
||||||
|
}
|
@@ -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
|
||||||
|
|
||||||
|
|
Reference in New Issue
Block a user