Skip to content

Commit 0548109

Browse files
committed
修改之前BSP版本存在的一些问题,使之符合规范
1 parent f1a13e1 commit 0548109

File tree

7 files changed

+181
-168
lines changed

7 files changed

+181
-168
lines changed

bsp/stm32/stm32f103-dofly-lyc8/.config

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -320,7 +320,7 @@ CONFIG_SOC_SERIES_STM32F1=y
320320
#
321321
# Hardware Drivers Config
322322
#
323-
CONFIG_SOC_STM32F103c8=y
323+
CONFIG_SOC_STM32F103C8=y
324324

325325
#
326326
# Onboard Peripheral Drivers
@@ -329,8 +329,10 @@ CONFIG_SOC_STM32F103c8=y
329329
#
330330
# On-chip Peripheral Drivers
331331
#
332-
# CONFIG_BSP_USING_GPIO is not set
332+
CONFIG_BSP_USING_GPIO=y
333+
CONFIG_BSP_USING_UART=y
333334
CONFIG_BSP_USING_UART1=y
335+
# CONFIG_BSP_UART1_RX_USING_DMA is not set
334336

335337
#
336338
# Board extended module Drivers

bsp/stm32/stm32f103-dofly-lyc8/README.md

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11

2-
# STM32F103 霸道开发板 BSP 说明
2+
# STM32F103 德飞莱开发板 BSP 说明
33

44
## 简介
55

@@ -26,7 +26,6 @@ LY-STM32F103C8V1.2 是德飞莱推出的一款基于 ARM Cortex-M3 内核的开
2626
- MCU:STM32F103C8T6,主频 72MHz,64KB FLASH ,20KB RAM
2727
- 常用外设
2828
- LED:1个普通LED,LED1(红色,PB8)
29-
- 常用接口:USB 转串口
3029
- 调试接口,标准 JTAG/SWD
3130

3231
## 外设支持
@@ -35,16 +34,16 @@ LY-STM32F103C8V1.2 是德飞莱推出的一款基于 ARM Cortex-M3 内核的开
3534

3635
| **板载外设** | **支持情况** | **备注** |
3736
| :----------------- | :----------: | :------------------------------------- |
38-
| USB 转串口 | 支持 | |
37+
| 红色LED | 支持 | 使用PB8 |
3938
| **片上外设** | **支持情况** | **备注** |
4039
| GPIO | 支持 | PA0, PA1... PB15 ---> PIN: 0, 1...47|
4140
| UART | 支持 | UART1 |
42-
| SPI | 暂不支持 | |
43-
| I2C | 暂不支持 | |
44-
| RTC | 暂不支持 | |
45-
| PWM | 暂不支持 | |
46-
| **扩展模块** | **支持情况** | **备注** |
47-
| | | |
41+
| SPI | 暂不支持 | 即将支持 |
42+
| I2C | 暂不支持 | 即将支持 |
43+
| ADC | 暂不支持 | 即将支持 |
44+
| PWM | 暂不支持 | 即将支持 |
45+
| **扩展模块** | **支持情况** | **备注** |
46+
| | | |
4847

4948
## 使用说明
5049

@@ -88,7 +87,7 @@ msh >
8887
```
8988
### 进阶使用
9089

91-
此 BSP 默认只开启了 GPIO 和 串口1 的功能,如果需使用 SD 卡、Flash 等更多高级功能,需要利用 ENV 工具对BSP 进行配置,步骤如下:
90+
此 BSP 默认只开启了 GPIO 和 串口1 的功能,如果需使用 ADC、PWM等更多高级功能,需要利用 ENV 工具对BSP 进行配置,步骤如下:
9291

9392
1. 在 bsp 下打开 env 工具。
9493

bsp/stm32/stm32f103-dofly-lyc8/board/Kconfig

Lines changed: 15 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
menu "Hardware Drivers Config"
22

3-
config SOC_STM32F103c8
3+
config SOC_STM32F103C8
44
bool
55
select SOC_SERIES_STM32F1
66
default y
@@ -16,11 +16,21 @@ menu "On-chip Peripheral Drivers"
1616
select RT_USING_PIN
1717
default y
1818

19-
config BSP_USING_UART1
20-
bool "Enable UART1"
21-
select RT_USING_SERIAL
19+
menuconfig BSP_USING_UART
20+
bool "Enable UART"
2221
default y
23-
22+
select RT_USING_SERIAL
23+
if BSP_USING_UART
24+
config BSP_USING_UART1
25+
bool "Enable UART1"
26+
default y
27+
28+
config BSP_UART1_RX_USING_DMA
29+
bool "Enable UART1 RX DMA"
30+
depends on BSP_USING_UART1 && RT_SERIAL_USING_DMA
31+
default n
32+
endif
33+
2434
endmenu
2535

2636
menu "Board extended module Drivers"

bsp/stm32/stm32f103-dofly-lyc8/board/linker_scripts/link.lds

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
/* Program Entry, set to mark it as "used" and avoid gc */
66
MEMORY
77
{
8-
ROM (rx) : ORIGIN = 0x08000000, LENGTH = 64k /* 128KB flash */
8+
ROM (rx) : ORIGIN = 0x08000000, LENGTH = 64k /* 64KB flash */
99
RAM (rw) : ORIGIN = 0x20000000, LENGTH = 20k /* 20K sram */
1010
}
1111
ENTRY(Reset_Handler)

0 commit comments

Comments
 (0)