add lorawan demo for evb_lx
add lorawan demo for evb_lx
This commit is contained in:
337
board/TencentOS_tiny_EVB_LX/BSP/Hardware/PM25/sensor_parser.c
Normal file
337
board/TencentOS_tiny_EVB_LX/BSP/Hardware/PM25/sensor_parser.c
Normal file
@@ -0,0 +1,337 @@
|
||||
/*----------------------------------------------------------------------------
|
||||
* Tencent is pleased to support the open source community by making TencentOS
|
||||
* available.
|
||||
*
|
||||
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
|
||||
* If you have downloaded a copy of the TencentOS binary from Tencent, please
|
||||
* note that the TencentOS binary is licensed under the BSD 3-Clause License.
|
||||
*
|
||||
* If you have downloaded a copy of the TencentOS source code from Tencent,
|
||||
* please note that TencentOS source code is licensed under the BSD 3-Clause
|
||||
* License, except for the third-party components listed below which are
|
||||
* subject to different license terms. Your integration of TencentOS into your
|
||||
* own projects may require compliance with the BSD 3-Clause License, as well
|
||||
* as the other licenses applicable to the third-party components included
|
||||
* within TencentOS.
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#include "sensor_parser.h"
|
||||
|
||||
__STATIC__ shell_ctl_t shell_ctl;
|
||||
|
||||
__STATIC__ k_stack_t shell_parser_task_stack[SHELL_PARSER_TASK_STACK_SIZE];
|
||||
|
||||
__STATIC__ int shell_getchar(void)
|
||||
{
|
||||
uint8_t chr;
|
||||
k_err_t err;
|
||||
|
||||
if (tos_sem_pend(&SHELL_CTL->shell_rx_sem, TOS_TIME_FOREVER) != K_ERR_NONE) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
err = tos_chr_fifo_pop(&SHELL_CTL->shell_rx_fifo, &chr);
|
||||
|
||||
return err == K_ERR_NONE ? chr : -1;
|
||||
}
|
||||
|
||||
typedef struct sensor_frame_st {
|
||||
uint16_t len;
|
||||
uint16_t data1;
|
||||
uint16_t data2;
|
||||
uint16_t data3;
|
||||
uint16_t data4;
|
||||
uint16_t data5;
|
||||
uint16_t data6;
|
||||
uint16_t data7;
|
||||
uint16_t data8;
|
||||
uint16_t data9;
|
||||
uint16_t data10;
|
||||
uint16_t data11;
|
||||
uint16_t data12;
|
||||
uint16_t data13;
|
||||
uint16_t chk_sum;
|
||||
|
||||
uint8_t len_h;
|
||||
uint8_t len_l;
|
||||
|
||||
uint8_t data1_h;
|
||||
uint8_t data1_l;
|
||||
|
||||
uint8_t data2_h;
|
||||
uint8_t data2_l;
|
||||
|
||||
uint8_t data3_h;
|
||||
uint8_t data3_l;
|
||||
|
||||
uint8_t data4_h;
|
||||
uint8_t data4_l;
|
||||
|
||||
uint8_t data5_h;
|
||||
uint8_t data5_l;
|
||||
|
||||
uint8_t data6_h;
|
||||
uint8_t data6_l;
|
||||
|
||||
uint8_t data7_h;
|
||||
uint8_t data7_l;
|
||||
|
||||
uint8_t data8_h;
|
||||
uint8_t data8_l;
|
||||
|
||||
uint8_t data9_h;
|
||||
uint8_t data9_l;
|
||||
|
||||
uint8_t data10_h;
|
||||
uint8_t data10_l;
|
||||
|
||||
uint8_t data11_h;
|
||||
uint8_t data11_l;
|
||||
|
||||
uint8_t data12_h;
|
||||
uint8_t data12_l;
|
||||
|
||||
uint8_t data13_h;
|
||||
uint8_t data13_l;
|
||||
|
||||
uint8_t chk_sum_h;
|
||||
uint8_t chk_sum_l;
|
||||
} __PACKED__ sensor_frame_t;
|
||||
|
||||
extern k_mail_q_t mail_q;
|
||||
|
||||
k_tick_t last_report = 0;
|
||||
|
||||
int read_frame(sensor_frame_t *frame)
|
||||
{
|
||||
frame->len_h = shell_getchar();
|
||||
frame->len_l = shell_getchar();
|
||||
|
||||
frame->data1_h = shell_getchar();
|
||||
frame->data1_l = shell_getchar();
|
||||
|
||||
frame->data2_h = shell_getchar();
|
||||
frame->data2_l = shell_getchar();
|
||||
|
||||
frame->data3_h = shell_getchar();
|
||||
frame->data3_l = shell_getchar();
|
||||
|
||||
frame->data4_h = shell_getchar();
|
||||
frame->data4_l = shell_getchar();
|
||||
|
||||
frame->data5_h = shell_getchar();
|
||||
frame->data5_l = shell_getchar();
|
||||
|
||||
frame->data6_h = shell_getchar();
|
||||
frame->data6_l = shell_getchar();
|
||||
|
||||
frame->data7_h = shell_getchar();
|
||||
frame->data7_l = shell_getchar();
|
||||
|
||||
frame->data8_h = shell_getchar();
|
||||
frame->data8_l = shell_getchar();
|
||||
|
||||
frame->data9_h = shell_getchar();
|
||||
frame->data9_l = shell_getchar();
|
||||
|
||||
frame->data10_h = shell_getchar();
|
||||
frame->data10_l = shell_getchar();
|
||||
|
||||
frame->data11_h = shell_getchar();
|
||||
frame->data11_l = shell_getchar();
|
||||
|
||||
frame->data12_h = shell_getchar();
|
||||
frame->data12_l = shell_getchar();
|
||||
|
||||
frame->data13_h = shell_getchar();
|
||||
frame->data13_l = shell_getchar();
|
||||
|
||||
frame->chk_sum_h = shell_getchar();
|
||||
frame->chk_sum_l = shell_getchar();
|
||||
|
||||
|
||||
frame->len = (frame->len_h << 8) | frame->len_l;
|
||||
frame->data1 = (frame->data1_h << 8) | frame->data1_l;
|
||||
frame->data2 = (frame->data2_h << 8) | frame->data2_l;
|
||||
frame->data3 = (frame->data3_h << 8) | frame->data3_l;
|
||||
frame->data4 = (frame->data4_h << 8) | frame->data4_l;
|
||||
frame->data5 = (frame->data5_h << 8) | frame->data5_l;
|
||||
frame->data6 = (frame->data6_h << 8) | frame->data6_l;
|
||||
frame->data7 = (frame->data7_h << 8) | frame->data7_l;
|
||||
frame->data8 = (frame->data8_h << 8) | frame->data8_l;
|
||||
frame->data9 = (frame->data9_h << 8) | frame->data9_l;
|
||||
frame->data10 = (frame->data10_h << 8) | frame->data10_l;
|
||||
frame->data11 = (frame->data11_h << 8) | frame->data11_l;
|
||||
frame->data12 = (frame->data12_h << 8) | frame->data12_l;
|
||||
frame->data13 = (frame->data13_h << 8) | frame->data13_l;
|
||||
frame->chk_sum = (frame->chk_sum_h << 8) | frame->chk_sum_l;
|
||||
|
||||
|
||||
uint16_t chsum;
|
||||
chsum = frame->len_h +
|
||||
frame->len_l +
|
||||
frame->data1_h +
|
||||
frame->data1_l +
|
||||
frame->data2_h +
|
||||
frame->data2_l +
|
||||
frame->data3_h +
|
||||
frame->data3_l +
|
||||
frame->data4_h +
|
||||
frame->data4_l +
|
||||
frame->data5_h +
|
||||
frame->data5_l +
|
||||
frame->data6_h +
|
||||
frame->data6_l +
|
||||
frame->data7_h +
|
||||
frame->data7_l +
|
||||
frame->data8_h +
|
||||
frame->data8_l +
|
||||
frame->data9_h +
|
||||
frame->data9_l +
|
||||
frame->data10_h +
|
||||
frame->data10_l +
|
||||
frame->data11_h +
|
||||
frame->data11_l +
|
||||
frame->data12_h +
|
||||
frame->data12_l +
|
||||
frame->data13_h +
|
||||
frame->data13_l;
|
||||
|
||||
if (chsum + 0x42 + 0x4d != frame->chk_sum) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
k_tick_t now = tos_systick_get();
|
||||
if (last_report == 0 || now - last_report >= 15000) {
|
||||
last_report = now;
|
||||
|
||||
printf("data1: %d\n", frame->data1);
|
||||
printf("data2: %d\n", frame->data2);
|
||||
printf("data3: %d\n", frame->data3);
|
||||
printf("data4: %d\n", frame->data4);
|
||||
printf("data5: %d\n", frame->data5);
|
||||
printf("data6: %d\n", frame->data6);
|
||||
printf("data7: %d\n", frame->data7);
|
||||
printf("data8: %d\n", frame->data8);
|
||||
printf("data9: %d\n", frame->data9);
|
||||
printf("data10: %d\n", frame->data10);
|
||||
printf("data11: %d\n", frame->data11);
|
||||
printf("data12: %d\n", frame->data12);
|
||||
printf("data13: %d\n", frame->data13);
|
||||
printf("\n\n");
|
||||
|
||||
return 0;
|
||||
}
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
sensor_frame_t frame;
|
||||
|
||||
__STATIC__ int shell_readline(void)
|
||||
{
|
||||
int chr, last_chr = 0;
|
||||
char *buf = SHELL_CTL->cmd_buffer;
|
||||
|
||||
while (K_TRUE) {
|
||||
if (buf - SHELL_CTL->cmd_buffer >= (SHELL_CTL->cmd_buffer_size - 1)) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
chr = shell_getchar();
|
||||
if (chr < 0) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (chr == 0x4d && last_chr == 0x42) {
|
||||
if (read_frame(&frame) == 0) {
|
||||
tos_mail_q_post(&mail_q, &frame.data1_h, 13 * 2);
|
||||
}
|
||||
}
|
||||
|
||||
*buf++ = chr;
|
||||
last_chr = chr;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
__STATIC__ void shell_parser(void *arg)
|
||||
{
|
||||
while (K_TRUE) {
|
||||
shell_readline();
|
||||
}
|
||||
}
|
||||
|
||||
__API__ int tos_shell_init(char *cmd_buf, int cmd_buf_size, shell_output_t output)
|
||||
{
|
||||
void *buffer = K_NULL;
|
||||
|
||||
TOS_PTR_SANITY_CHECK_RC(cmd_buf, -1);
|
||||
TOS_PTR_SANITY_CHECK_RC(output, -1);
|
||||
|
||||
memset(SHELL_CTL, 0, sizeof(shell_ctl_t));
|
||||
|
||||
SHELL_CTL->cmd_buffer = cmd_buf;
|
||||
SHELL_CTL->cmd_buffer_size = cmd_buf_size;
|
||||
SHELL_CTL->output = output;
|
||||
|
||||
buffer = tos_mmheap_alloc(cmd_buf_size * 2);
|
||||
if (!buffer) {
|
||||
return -1;
|
||||
}
|
||||
|
||||
SHELL_CTL->shell_rx_fifo_buffer = (uint8_t *)buffer;
|
||||
tos_chr_fifo_create(&SHELL_CTL->shell_rx_fifo, buffer, cmd_buf_size * 2);
|
||||
|
||||
if (tos_sem_create(&SHELL_CTL->shell_rx_sem, (k_sem_cnt_t)0u) != K_ERR_NONE) {
|
||||
goto errout0;
|
||||
}
|
||||
|
||||
if (tos_task_create(&SHELL_CTL->parser, "shell_parser", shell_parser,
|
||||
K_NULL, SHELL_PARSER_TASK_PRIO, shell_parser_task_stack,
|
||||
SHELL_PARSER_TASK_STACK_SIZE, 0) != K_ERR_NONE) {
|
||||
goto errout1;
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
errout1:
|
||||
tos_sem_destroy(&SHELL_CTL->shell_rx_sem);
|
||||
|
||||
errout0:
|
||||
tos_mmheap_free(SHELL_CTL->shell_rx_fifo_buffer);
|
||||
SHELL_CTL->shell_rx_fifo_buffer = K_NULL;
|
||||
tos_chr_fifo_destroy(&SHELL_CTL->shell_rx_fifo);
|
||||
|
||||
return -1;
|
||||
}
|
||||
|
||||
__API__ void tos_shell_deinit(void)
|
||||
{
|
||||
tos_task_destroy(&SHELL_CTL->parser);
|
||||
tos_sem_destroy(&SHELL_CTL->shell_rx_sem);
|
||||
|
||||
tos_mmheap_free(SHELL_CTL->shell_rx_fifo_buffer);
|
||||
SHELL_CTL->shell_rx_fifo_buffer = K_NULL;
|
||||
tos_chr_fifo_destroy(&SHELL_CTL->shell_rx_fifo);
|
||||
}
|
||||
|
||||
__API__ void tos_shell_printf(const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
static char buffer[SHELL_OUTPUT_MAX];
|
||||
|
||||
va_start(args, format);
|
||||
vsnprintf(buffer, sizeof(buffer), format, args);
|
||||
va_end(args);
|
||||
|
||||
(SHELL_CTL->output)(buffer);
|
||||
}
|
||||
|
||||
__API__ void tos_shell_input_byte(uint8_t data)
|
||||
{
|
||||
if (tos_chr_fifo_push(&SHELL_CTL->shell_rx_fifo, data) == K_ERR_NONE) {
|
||||
tos_sem_post(&SHELL_CTL->shell_rx_sem);
|
||||
}
|
||||
}
|
||||
|
@@ -0,0 +1,54 @@
|
||||
/*----------------------------------------------------------------------------
|
||||
* Tencent is pleased to support the open source community by making TencentOS
|
||||
* available.
|
||||
*
|
||||
* Copyright (C) 2019 THL A29 Limited, a Tencent company. All rights reserved.
|
||||
* If you have downloaded a copy of the TencentOS binary from Tencent, please
|
||||
* note that the TencentOS binary is licensed under the BSD 3-Clause License.
|
||||
*
|
||||
* If you have downloaded a copy of the TencentOS source code from Tencent,
|
||||
* please note that TencentOS source code is licensed under the BSD 3-Clause
|
||||
* License, except for the third-party components listed below which are
|
||||
* subject to different license terms. Your integration of TencentOS into your
|
||||
* own projects may require compliance with the BSD 3-Clause License, as well
|
||||
* as the other licenses applicable to the third-party components included
|
||||
* within TencentOS.
|
||||
*---------------------------------------------------------------------------*/
|
||||
|
||||
#ifndef _TOS_SHELL_H_
|
||||
#define _TOS_SHELL_H_
|
||||
|
||||
#include "tos_k.h"
|
||||
|
||||
#define SHELL_CMD_ARGV_MAX 16
|
||||
#define SHELL_OUTPUT_MAX 256
|
||||
#define SHELL_PARSER_TASK_STACK_SIZE 1024
|
||||
#define SHELL_PARSER_TASK_PRIO 5
|
||||
|
||||
typedef void (*shell_output_t)(const char *str);
|
||||
|
||||
typedef struct shell_control_st {
|
||||
k_task_t parser;
|
||||
|
||||
shell_output_t output;
|
||||
|
||||
char *cmd_buffer;
|
||||
int cmd_buffer_size;
|
||||
|
||||
k_sem_t shell_rx_sem;
|
||||
k_chr_fifo_t shell_rx_fifo;
|
||||
uint8_t *shell_rx_fifo_buffer;
|
||||
} shell_ctl_t;
|
||||
|
||||
#define SHELL_CTL ((shell_ctl_t *)(&shell_ctl))
|
||||
|
||||
__API__ int tos_shell_init(char *cmd_buf, int cmd_buf_size, shell_output_t output);
|
||||
|
||||
__API__ void tos_shell_deinit(void);
|
||||
|
||||
__API__ void tos_shell_printf(const char *format, ...);
|
||||
|
||||
__API__ void tos_shell_input_byte(uint8_t data);
|
||||
|
||||
#endif /* _TOS_SHELL_H_ */
|
||||
|
@@ -13,8 +13,13 @@
|
||||
#define USART2_GPIO_RX_PIN GPIO_PIN_11
|
||||
#define USART2_GPIO_PORT GPIOB
|
||||
|
||||
#define UART3_GPIO_TX_PIN GPIO_PIN_10
|
||||
#define UART3_GPIO_RX_PIN GPIO_PIN_11
|
||||
#define UART3_GPIO_PORT GPIOC
|
||||
|
||||
|
||||
void usart0_init(int baud);
|
||||
void usart1_init(int baud);
|
||||
void usart2_init(int baud);
|
||||
void uart3_init(int baud);
|
||||
#endif // __USART_H
|
||||
|
119
board/TencentOS_tiny_EVB_LX/BSP/LoRaWAN/lora_demo.c
Normal file
119
board/TencentOS_tiny_EVB_LX/BSP/LoRaWAN/lora_demo.c
Normal file
@@ -0,0 +1,119 @@
|
||||
#include "lora_demo.h"
|
||||
#include "RHF76.h"
|
||||
#include "sensor_parser.h"
|
||||
|
||||
/*
|
||||
==================================================================================
|
||||
data template:
|
||||
|
||||
Type Name Token DataType RW Attribute
|
||||
property temperature temperature integer readonly range: [-100, 155]
|
||||
initial: 0
|
||||
step: 1
|
||||
unit: centigrade
|
||||
|
||||
property humidity humidity integer readonly range: [-0, 100]
|
||||
initial: 0
|
||||
step: 1
|
||||
unit: %
|
||||
|
||||
property report_period period integer read-write range: [0, 3600]
|
||||
initial: 0
|
||||
step: 1
|
||||
unit: second
|
||||
|
||||
==================================================================================
|
||||
up-link parser javascript:
|
||||
|
||||
function RawToProtocol(fPort, bytes) {
|
||||
var data = {
|
||||
"method": "report",
|
||||
"clientToken" : new Date(),
|
||||
"params" : {}
|
||||
};
|
||||
data.params.temperature = bytes[0];
|
||||
data.params.humidity = bytes[1];
|
||||
data.params.period = bytes[2] | (bytes[3] << 8);
|
||||
return data;
|
||||
}
|
||||
|
||||
==================================================================================
|
||||
down-link parser javascript:
|
||||
|
||||
function ProtocolToRaw(obj) {
|
||||
var data = new Array();
|
||||
data[0] = 5;// fport=5
|
||||
data[1] = 0;// unconfirmed mode
|
||||
data[2] = obj.params.period & 0x00FF;
|
||||
data[3] = (obj.params.period >> 8) & 0x00FF;
|
||||
return data;
|
||||
}
|
||||
|
||||
*/
|
||||
|
||||
uint16_t report_period = 10;
|
||||
|
||||
k_mail_q_t mail_q;
|
||||
#define DATA_CNT 26
|
||||
uint8_t mail_buf[DATA_CNT];
|
||||
|
||||
typedef struct device_data_st {
|
||||
uint8_t data[DATA_CNT];
|
||||
} __PACKED__ dev_data_t;
|
||||
|
||||
void recv_callback(uint8_t *data, uint8_t len)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
printf("len: %d\n", len);
|
||||
|
||||
for (i = 0; i < len; ++i) {
|
||||
printf("data[%d]: %d\n", i, data[i]);
|
||||
}
|
||||
|
||||
if (len == 1) {
|
||||
report_period = data[0];
|
||||
} else if (len >= 2) {
|
||||
report_period = data[0] | (data[1] << 8);
|
||||
}
|
||||
printf("report_period: %d\n", report_period);
|
||||
}
|
||||
|
||||
|
||||
#define CMD_LEN_MAX 1024
|
||||
char cmd_buf[CMD_LEN_MAX];
|
||||
|
||||
void uart_output(const char *str)
|
||||
{
|
||||
/* if using c lib printf through uart, a simpler one is: */
|
||||
printf(str);
|
||||
}
|
||||
|
||||
dev_data_t dev_data;
|
||||
uint8_t pool[DATA_CNT];
|
||||
|
||||
void application_entry(void *arg)
|
||||
{
|
||||
int i = 0;
|
||||
|
||||
rhf76_lora_init(HAL_UART_PORT_1);
|
||||
tos_lora_module_recvcb_register(recv_callback);
|
||||
|
||||
tos_lora_module_join_otaa("8cf957200000025a", "8cf957200000025a1e29aaaaad204a72");
|
||||
|
||||
tos_mail_q_create(&mail_q, pool, DATA_CNT, sizeof(uint8_t));
|
||||
tos_shell_init(cmd_buf, sizeof(cmd_buf), uart_output);
|
||||
|
||||
while (1) {
|
||||
size_t mail_size;
|
||||
tos_mail_q_pend(&mail_q, &dev_data.data, &mail_size, TOS_TIME_FOREVER);
|
||||
|
||||
for (i = 0; i < mail_size; ++i) {
|
||||
printf("[%d] %x\n", i, dev_data.data[i]);
|
||||
}
|
||||
printf("\n\n");
|
||||
|
||||
tos_lora_module_send(&dev_data.data, mail_size);
|
||||
}
|
||||
}
|
||||
|
24
board/TencentOS_tiny_EVB_LX/BSP/LoRaWAN/lora_demo.h
Normal file
24
board/TencentOS_tiny_EVB_LX/BSP/LoRaWAN/lora_demo.h
Normal file
@@ -0,0 +1,24 @@
|
||||
#ifndef __APP_DEMO_H__
|
||||
#define __APP_DEMO_H__
|
||||
|
||||
#include "mcu_init.h"
|
||||
#include "tos_at.h"
|
||||
#include "string.h"
|
||||
#include "tos_k.h"
|
||||
#include "lora_module_wrapper.h"
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
typedef struct
|
||||
{
|
||||
char data[32];
|
||||
}ReportData_TypeDef;
|
||||
|
||||
void application_entry(void *arg);
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
#endif
|
||||
|
||||
#endif /* __APP_DEMO_H__ */
|
||||
|
@@ -19,6 +19,7 @@ void board_init()
|
||||
usart0_init(115200);
|
||||
usart1_init(115200);
|
||||
usart2_init(115200);
|
||||
uart3_init(9600);
|
||||
OLED_Init();
|
||||
OLED_Clear();
|
||||
OLED_ShowChinese(36,0,0);
|
||||
|
@@ -65,8 +65,6 @@ void usart1_init(int baud)
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
||||
void usart2_init(int baud)
|
||||
{
|
||||
//eclic_irq_enable(USART2_IRQn, 1, 0);
|
||||
@@ -101,6 +99,40 @@ void usart2_init(int baud)
|
||||
//usart_interrupt_enable(USART2, USART_INT_RBNE);
|
||||
}
|
||||
|
||||
void uart3_init(int baud)
|
||||
{
|
||||
eclic_irq_enable(UART3_IRQn, 1, 0);
|
||||
|
||||
/* enable GPIO clock */
|
||||
rcu_periph_clock_enable(RCU_GPIOC);
|
||||
|
||||
/* enable USART2 clock */
|
||||
rcu_periph_clock_enable(RCU_UART3);
|
||||
|
||||
/* connect port to USART0_Tx */
|
||||
gpio_init(UART3_GPIO_PORT, GPIO_MODE_AF_PP, GPIO_OSPEED_50MHZ, UART3_GPIO_TX_PIN);
|
||||
|
||||
/* connect port to USART0_Rx */
|
||||
gpio_init(UART3_GPIO_PORT, GPIO_MODE_IN_FLOATING, GPIO_OSPEED_50MHZ, UART3_GPIO_RX_PIN);
|
||||
|
||||
//gpio_pin_remap_config(GPIO_USART2_FULL_REMAP,ENABLE);
|
||||
|
||||
/* USART1 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);
|
||||
|
||||
|
||||
usart_interrupt_enable(UART3, USART_INT_RBNE);
|
||||
}
|
||||
|
||||
|
||||
int _put_char(int ch)
|
||||
{
|
||||
|
@@ -4,34 +4,33 @@
|
||||
#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_TASK_DYNAMIC_CREATE_EN 0u
|
||||
|
||||
|
||||
#define TOS_CFG_EVENT_EN 1u
|
||||
|
||||
// 配置TencentOS tiny是否开启动态内存模块
|
||||
#define TOS_CFG_MMBLK_EN 1u
|
||||
|
||||
#define TOS_CFG_MMHEAP_EN 1u
|
||||
|
||||
// 配置TencentOS tiny动态内存池大小
|
||||
#define TOS_CFG_MMHEAP_DEFAULT_POOL_SIZE 16384
|
||||
|
||||
// 配置TencentOS tiny是否开启互斥锁模块
|
||||
#define TOS_CFG_MMHEAP_DEFAULT_POOL_SIZE 0x3000
|
||||
|
||||
#define TOS_CFG_MAIL_QUEUE_EN 1u
|
||||
|
||||
#define TOS_CFG_MUTEX_EN 1u
|
||||
|
||||
// 配置TencentOS tiny是否开启队列模块
|
||||
#define TOS_CFG_QUEUE_EN 1u
|
||||
#define TOS_CFG_TIMER_EN 0u
|
||||
|
||||
// 配置TencentOS tiny是否开启软件定时器模块
|
||||
#define TOS_CFG_TIMER_EN 0u
|
||||
|
||||
// 配置TencentOS tiny是否开启信号量模块
|
||||
#define TOS_CFG_SEM_EN 1u
|
||||
|
||||
#define TOS_CFG_CPU_SYSTICK_PRIO 0xF
|
||||
@@ -42,29 +41,24 @@
|
||||
#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_ */
|
||||
|
225
board/TencentOS_tiny_EVB_LX/eclipse/lorawan/.cproject
Normal file
225
board/TencentOS_tiny_EVB_LX/eclipse/lorawan/.cproject
Normal file
@@ -0,0 +1,225 @@
|
||||
<?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:/lorawan}/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:/lorawan/Application}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lorawan/GD32VF103_Firmware_Library/RISCV/drivers}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lorawan/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:/lorawan/TencentOS_tiny/kernel/pm/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lorawan/TencentOS_tiny/kernel/hal/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lorawan/TencentOS_tiny/kernel/core/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lorawan/TencentOS_tiny/arch/risc-v/common/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lorawan/GD32VF103_Firmware_Library/RISCV/drivers}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lorawan/GD32VF103_Firmware_Library/GD32VF103_standard_peripheral/Include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lorawan/GD32VF103_Firmware_Library/RISCV/stubs}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lorawan/GD32VF103_Firmware_Library/GD32VF103_standard_peripheral}""/>
|
||||
<listOptionValue builtIn="false" value=".././"/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lorawan/TencentOS_tiny/arch/kernel/core/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lorawan/TencentOS_tiny/arch/risc-v/rv32i}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lorawan/TencentOS_tiny/arch/risc-v/bumblebee}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lorawan/TencentOS_tiny/kernel/evtdrv/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lorawan/Application/Inc}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lorawan/TencentOS_tiny/net/at/include}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lorawan/TencentOS_tiny/net/lora_module_wrapper}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lorawan/TencentOS_tiny/devices/rhf76_lora}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lorawan/Application/LoRaWAN}""/>
|
||||
<listOptionValue builtIn="false" value=""${workspace_loc:/lorawan/Application/PM25}""/>
|
||||
</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}/GD32VF103_Firmware_Library/RISCV/env_Eclipse/GD32VF103xB.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:/lorawan}/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="lorawan.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="/lorawan"/>
|
||||
</configuration>
|
||||
<configuration configurationName="Release">
|
||||
<resource resourceType="PROJECT" workspacePath="/lorawan"/>
|
||||
</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/lorawan/.gitignore
vendored
Normal file
1
board/TencentOS_tiny_EVB_LX/eclipse/lorawan/.gitignore
vendored
Normal file
@@ -0,0 +1 @@
|
||||
/Debug/
|
144
board/TencentOS_tiny_EVB_LX/eclipse/lorawan/.project
Normal file
144
board/TencentOS_tiny_EVB_LX/eclipse/lorawan/.project
Normal file
@@ -0,0 +1,144 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<projectDescription>
|
||||
<name>lorawan</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/LoRaWAN</name>
|
||||
<type>2</type>
|
||||
<location>C:/Users/supowang/Desktop/TencentOS-tiny/board/TencentOS_tiny_EVB_LX/BSP/LoRaWAN</location>
|
||||
</link>
|
||||
<link>
|
||||
<name>Application/PM25</name>
|
||||
<type>2</type>
|
||||
<location>C:/Users/supowang/Desktop/TencentOS-tiny/board/TencentOS_tiny_EVB_LX/BSP/Hardware/PM25</location>
|
||||
</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/devices</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/net</name>
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TencentOS_tiny/platform</name>
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TencentOS_tiny/arch/risc-v</name>
|
||||
<type>2</type>
|
||||
<locationURI>virtual:/virtual</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TencentOS_tiny/devices/rhf76_lora</name>
|
||||
<type>2</type>
|
||||
<location>C:/Users/Supowang/Desktop/TencentOS-tiny/devices/rhf76_lora</location>
|
||||
</link>
|
||||
<link>
|
||||
<name>TencentOS_tiny/net/at</name>
|
||||
<type>2</type>
|
||||
<locationURI>TOP_DIR/net/at</locationURI>
|
||||
</link>
|
||||
<link>
|
||||
<name>TencentOS_tiny/net/lora_module_wrapper</name>
|
||||
<type>2</type>
|
||||
<location>C:/Users/Supowang/Desktop/TencentOS-tiny/net/lora_module_wrapper</location>
|
||||
</link>
|
||||
<link>
|
||||
<name>TencentOS_tiny/platform/hal</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>
|
||||
<link>
|
||||
<name>TencentOS_tiny/platform/hal/gd</name>
|
||||
<type>2</type>
|
||||
<locationURI>TOP_DIR/platform/hal/gd</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/lorawan/link.lds
Normal file
175
board/TencentOS_tiny_EVB_LX/eclipse/lorawan/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
|
||||
}
|
72
board/TencentOS_tiny_EVB_LX/eclipse/lorawan/main.c
Normal file
72
board/TencentOS_tiny_EVB_LX/eclipse/lorawan/main.c
Normal file
@@ -0,0 +1,72 @@
|
||||
#include "mcu_init.h"
|
||||
#include "tos_k.h"
|
||||
#include "tos_hal.h"
|
||||
|
||||
#define LORA_TASK_SIZE 4096
|
||||
|
||||
k_task_t k_task_lora;
|
||||
uint8_t k_lora_stk[LORA_TASK_SIZE];
|
||||
|
||||
|
||||
void USART0_IRQHandler() {
|
||||
tos_knl_irq_enter();
|
||||
if(RESET != usart_interrupt_flag_get(USART0, USART_INT_FLAG_RBNE)){
|
||||
uint8_t data = usart_data_receive(USART0);
|
||||
printf("%c\n", data);
|
||||
}
|
||||
tos_knl_irq_leave();
|
||||
}
|
||||
|
||||
void USART1_IRQHandler() {
|
||||
tos_knl_irq_enter();
|
||||
if(RESET != usart_interrupt_flag_get(USART1, USART_INT_FLAG_RBNE)){
|
||||
uint8_t data = usart_data_receive(USART1);
|
||||
tos_at_uart_input_byte(data);
|
||||
}
|
||||
tos_knl_irq_leave();
|
||||
}
|
||||
|
||||
void USART2_IRQHandler() {
|
||||
tos_knl_irq_enter();
|
||||
if(RESET != usart_interrupt_flag_get(USART2, USART_INT_FLAG_RBNE)){
|
||||
uint8_t data = usart_data_receive(USART2);
|
||||
}
|
||||
tos_knl_irq_leave();
|
||||
}
|
||||
|
||||
void UART3_IRQHandler() {
|
||||
tos_knl_irq_enter();
|
||||
if(RESET != usart_interrupt_flag_get(UART3, USART_INT_FLAG_RBNE)){
|
||||
uint8_t data = usart_data_receive(UART3);
|
||||
tos_shell_input_byte(data);
|
||||
}
|
||||
tos_knl_irq_leave();
|
||||
}
|
||||
|
||||
void task_bled(void *pdata)
|
||||
{
|
||||
int cnt = 0;
|
||||
while (1) {
|
||||
printf("blink led task cnt: %d\n", cnt++);
|
||||
gpio_bit_write(LED_GPIO_PORT, LED_PIN,cnt % 2 ? SET : RESET);
|
||||
tos_task_delay(1000);
|
||||
}
|
||||
}
|
||||
|
||||
extern void application_entry(void);
|
||||
void task_lora(void *pdata)
|
||||
{
|
||||
application_entry();
|
||||
}
|
||||
|
||||
|
||||
void main(void) {
|
||||
board_init();
|
||||
|
||||
tos_knl_init();
|
||||
|
||||
tos_task_create(&k_task_lora, "lora", task_lora, NULL, 4, k_lora_stk, LORA_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
|
||||
|
||||
|
@@ -19,7 +19,6 @@
|
||||
#define __RHF76_H__
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdbool.h>
|
||||
#include <string.h>
|
||||
#include "usart.h"
|
||||
#include "tos_at.h"
|
||||
|
Reference in New Issue
Block a user