File tree 16 files changed +4155
-238
lines changed
bsp/stm32/stm32h730-esphosted-evb
16 files changed +4155
-238
lines changed Original file line number Diff line number Diff line change @@ -235,10 +235,9 @@ CONFIG_RT_USING_DEVICE_IPC=y
235
235
CONFIG_RT_UNAMED_PIPE_NUMBER=64
236
236
# CONFIG_RT_USING_SYSTEM_WORKQUEUE is not set
237
237
CONFIG_RT_USING_SERIAL=y
238
- CONFIG_RT_USING_SERIAL_V1=y
239
- # CONFIG_RT_USING_SERIAL_V2 is not set
238
+ # CONFIG_RT_USING_SERIAL_V1 is not set
239
+ CONFIG_RT_USING_SERIAL_V2=y
240
240
CONFIG_RT_SERIAL_USING_DMA=y
241
- CONFIG_RT_SERIAL_RB_BUFSZ=64
242
241
# CONFIG_RT_USING_SERIAL_BYPASS is not set
243
242
# CONFIG_RT_USING_CAN is not set
244
243
# CONFIG_RT_USING_CPUTIME is not set
@@ -1277,7 +1276,11 @@ CONFIG_BSP_SCB_ENABLE_D_CACHE=y
1277
1276
CONFIG_BSP_USING_GPIO=y
1278
1277
CONFIG_BSP_USING_UART=y
1279
1278
CONFIG_BSP_USING_UART2=y
1280
- CONFIG_BSP_USING_UART3=y
1279
+ # CONFIG_BSP_UART2_RX_USING_DMA is not set
1280
+ # CONFIG_BSP_UART2_TX_USING_DMA is not set
1281
+ CONFIG_BSP_UART2_RX_BUFSIZE=256
1282
+ CONFIG_BSP_UART2_TX_BUFSIZE=0
1283
+ # CONFIG_BSP_USING_UART3 is not set
1281
1284
# CONFIG_BSP_USING_CRC is not set
1282
1285
# CONFIG_BSP_USING_RNG is not set
1283
1286
# CONFIG_BSP_USING_UDID is not set
Original file line number Diff line number Diff line change
1
+ <?xml version =" 1.0" encoding =" utf-8" ?>
2
+
3
+ <component_viewer schemaVersion =" 0.1" xmlns : xs =" http://www.w3.org/2001/XMLSchema-instance" xs : noNamespaceSchemaLocation =" Component_Viewer.xsd" >
4
+
5
+ <component name =" EventRecorderStub" version =" 1.0.0" /> <!-- name and version of the component-->
6
+ <events >
7
+ </events >
8
+
9
+ </component_viewer >
Original file line number Diff line number Diff line change 64
64
65
65
本章节是为需要在 RT-Thread 操作系统上使用更多开发板资源的开发者准备的。通过使用 ENV 工具对 BSP 进行配置,可以开启更多板载资源,实现更多高级功能。
66
66
67
-
68
67
### 快速上手
69
68
70
- MDK project TODO
69
+ #### 硬件连接
70
+
71
+ 使用数据线连接靠上的USB-C。
72
+
73
+ MDK:
74
+
75
+ #### 编译下载
76
+
77
+ 双击 project.uvprojx 文件,打开 MDK5 工程,编译并下载程序到开发板。
78
+
79
+ > 工程默认配置使用 STLink下载程序,在通过 STLink连接开发板的基础上,点击下载按钮即可下载程序到开发板
80
+
81
+ #### 运行结果
82
+
83
+ 下载程序成功之后,系统会自动运行,观察开发板上 LED 的运行效果,红色 LED 常亮、绿色 LED 会周期性闪烁。
71
84
72
- 可以使用GCC进行编译,OpenOCD进行下载
85
+ 连接开发板对应串口到 PC , 在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息:
86
+
87
+ ``` bash
88
+ \ | /
89
+ - RT - Thread Operating System
90
+ / | \ 5.2.0 build Feb 3 2025 13:14:21
91
+ 2006 - 2024 Copyright by RT-Thread team
92
+ msh >
93
+ ```
94
+
95
+ GCC:
96
+
97
+ 可以使用命令行进行编译,下载
73
98
74
99
``` shell
75
100
mkdir build
@@ -87,6 +112,17 @@ scons --target=cmake --project-name=EspHostedEVBDemo
87
112
clion .
88
113
```
89
114
115
+ 串口输出信息
116
+
117
+ ``` shell
118
+ ... some bootloader log...
119
+ \ | /
120
+ - RT - Thread Operating System
121
+ / | \ 5.2.0 build Feb 3 2025 13:16:15
122
+ 2006 - 2024 Copyright by RT-Thread team
123
+ msh >
124
+ ```
125
+
90
126
### 进阶使用
91
127
92
128
此 BSP 默认只开启了 GPIO 和 串口2 的功能,如果需使用更多高级功能,需要利用 ENV 工具对BSP 进行配置,步骤如下:
@@ -97,13 +133,13 @@ clion .
97
133
98
134
3 . 输入` pkgs --update ` 命令更新软件包。
99
135
100
- 4 . 输入` scons --target=mdk4/ mdk5/iar ` 命令重新生成工程。
136
+ 4 . 输入` scons --target=mdk5/cmake ` 命令重新生成工程。
101
137
102
138
本章节更多详细的介绍请参考 [ STM32 系列 BSP 外设驱动使用教程] ( ../docs/STM32系列BSP外设驱动使用教程.md ) 。
103
139
104
140
## 注意事项
105
141
106
- - 由于下载算法还未制作完,暂仅支持了GCC 。
142
+ - 由于下载算法还未制作完,暂GCC为使用外部Flash,MDK为使用内部Flash 。
107
143
108
144
- 调试串口为串口2,默认接到STLink。
109
145
Original file line number Diff line number Diff line change @@ -18,21 +18,8 @@ int main(void) {
18
18
/* set GPIO pin mode to output */
19
19
rt_pin_mode (LED_PIN , PIN_MODE_OUTPUT );
20
20
21
- // this would be configured in bootloader
22
- uint32_t pwr_supply_conf = HAL_PWREx_GetSupplyConfig ();
23
- if (pwr_supply_conf & PWR_CR3_LDOEN ) {
24
- rt_kprintf ("Vcore Power supply is LDO\r\n" );
25
- }
26
- if (pwr_supply_conf & PWR_CR3_BYPASS ) {
27
- rt_kprintf ("Vcore Power supply is Bypass\r\n" );
28
- }
29
-
30
- uint32_t freq = HAL_RCC_GetSysClockFreq ();
31
- rt_kprintf ("System Clock: %luMHz\r\n" , freq / (int ) 1e6 );
32
-
33
21
while (1 ) {
34
22
rt_pin_write (LED_PIN , !rt_pin_read (LED_PIN ));
35
- rt_kprintf ("Hello RT-Thread\r\n" );
36
23
rt_thread_mdelay (1000 );
37
24
}
38
25
}
Load Diff This file was deleted.
Original file line number Diff line number Diff line change @@ -27,9 +27,32 @@ menu "On-chip Peripheral Drivers"
27
27
config BSP_USING_UART2
28
28
bool "Enable UART2"
29
29
default y
30
+ if BSP_USING_UART2
31
+ config BSP_UART2_RX_USING_DMA
32
+ bool "Enable UART2 RX DMA"
33
+ depends on BSP_USING_UART2 && RT_SERIAL_USING_DMA
34
+ default n
35
+
36
+ config BSP_UART2_TX_USING_DMA
37
+ bool "Enable UART2 TX DMA"
38
+ depends on BSP_USING_UART2 && RT_SERIAL_USING_DMA
39
+ default t
40
+
41
+ config BSP_UART2_RX_BUFSIZE
42
+ int "Set UART2 RX buffer size"
43
+ range 64 65535
44
+ depends on BSP_USING_UART2
45
+ default 256
46
+
47
+ config BSP_UART2_TX_BUFSIZE
48
+ int "Set UART2 TX buffer size"
49
+ range 0 65535
50
+ depends on BSP_USING_UART2
51
+ default 0
52
+ endif
30
53
config BSP_USING_UART3
31
54
bool "Enable UART3"
32
- default y
55
+ default n
33
56
34
57
endif
35
58
Original file line number Diff line number Diff line change 1
1
/*
2
- * Copyright (c) 2006-2024 RT-Thread Development Team
2
+ * Copyright (c) 2006-2025 RT-Thread Development Team
3
3
*
4
4
* SPDX-License-Identifier: Apache-2.0
5
5
*
6
6
* Change Logs:
7
7
* Date Author Notes
8
- * 2018-11-06 SummerGift first version
8
+ * 2025-2-3 yekai first version
9
9
*/
10
10
11
11
#include "board.h"
You can’t perform that action at this time.
0 commit comments