Skip to content

Commit 0375798

Browse files
committed
stm32h7r7-atk bsp
1 parent 8525e08 commit 0375798

File tree

109 files changed

+32632
-0
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

109 files changed

+32632
-0
lines changed

bsp/stm32/stm32h7r7-atk/.config

Lines changed: 1439 additions & 0 deletions
Large diffs are not rendered by default.

bsp/stm32/stm32h7r7-atk/.config.old

Lines changed: 1454 additions & 0 deletions
Large diffs are not rendered by default.

bsp/stm32/stm32h7r7-atk/.cproject

Lines changed: 245 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# Sources
2+
*.c text diff=c
3+
*.cc text diff=cpp
4+
*.cxx text diff=cpp
5+
*.cpp text diff=cpp
6+
*.c++ text diff=cpp
7+
*.hpp text diff=cpp
8+
*.h text diff=c
9+
*.h++ text diff=cpp
10+
*.hh text diff=cpp
11+
12+
# Compiled Object files
13+
*.slo binary
14+
*.lo binary
15+
*.o binary
16+
*.obj binary
17+
18+
# Precompiled Headers
19+
*.gch binary
20+
*.pch binary
21+
22+
# Compiled Dynamic libraries
23+
*.so binary
24+
*.dylib binary
25+
*.dll binary
26+
27+
# Compiled Static libraries
28+
*.lai binary
29+
*.la binary
30+
*.a binary
31+
*.lib binary
32+
33+
# Executables
34+
*.exe binary
35+
*.out binary
36+
*.app binary

bsp/stm32/stm32h7r7-atk/.gitignore

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
*.pyc
2+
*.map
3+
*.dblite
4+
*.elf
5+
*.bin
6+
*.hex
7+
*.axf
8+
*.pdb
9+
*.idb
10+
*.ilk
11+
!*.old
12+
build
13+
Debug
14+
*~
15+
*.o
16+
*.obj
17+
*.out
18+
*.bak
19+
*.dep
20+
*.lib
21+
*.i
22+
*.d
23+
.DS_Stor*
24+
.config 3
25+
.config 4
26+
.config 5
27+
*.uimg
28+
GPATH
29+
GRTAGS
30+
GTAGS
31+
.vscode
32+
JLinkLog.txt
33+
JLinkSettings.ini
34+
DebugConfig/
35+
RTE/
36+
settings/
37+
*.uvguix*

bsp/stm32/stm32h7r7-atk/.project

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
2+
<projectDescription>
3+
<name>project</name>
4+
<comment />
5+
<projects>
6+
</projects>
7+
<buildSpec>
8+
<buildCommand>
9+
<name>org.eclipse.cdt.managedbuilder.core.genmakebuilder</name>
10+
<triggers>clean,full,incremental,</triggers>
11+
<arguments>
12+
</arguments>
13+
</buildCommand>
14+
<buildCommand>
15+
<name>org.eclipse.cdt.managedbuilder.core.ScannerConfigBuilder</name>
16+
<triggers>full,incremental,</triggers>
17+
<arguments>
18+
</arguments>
19+
</buildCommand>
20+
</buildSpec>
21+
<natures>
22+
<nature>org.eclipse.cdt.core.cnature</nature>
23+
<nature>org.rt-thread.studio.rttnature</nature>
24+
<nature>org.eclipse.cdt.managedbuilder.core.managedBuildNature</nature>
25+
<nature>org.eclipse.cdt.managedbuilder.core.ScannerConfigNature</nature>
26+
</natures>
27+
<linkedResources />
28+
</projectDescription>
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
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>

bsp/stm32/stm32h7r7-atk/Kconfig

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
mainmenu "RT-Thread Configuration"
2+
3+
config BSP_DIR
4+
string
5+
option env="BSP_ROOT"
6+
default "."
7+
8+
config RTT_DIR
9+
string
10+
option env="RTT_ROOT"
11+
default "rt-thread"
12+
13+
config PKGS_DIR
14+
string
15+
option env="PKGS_ROOT"
16+
default "packages"
17+
18+
config PLATFORM_DIR
19+
string
20+
option env="PLATFORM_DIR"
21+
default "F:/github/rtthread/workspace/rtthread-atk/platform"
22+
23+
source "$RTT_DIR/Kconfig"
24+
source "$PKGS_DIR/Kconfig"
25+
source "$RTT_DIR/../libraries/Kconfig"
26+
27+
config RT_STUDIO_BUILT_IN
28+
bool
29+
select ARCH_ARM_CORTEX_M7
30+
select RT_USING_COMPONENTS_INIT
31+
select RT_USING_USER_MAIN
32+
default y

bsp/stm32/stm32h7r7-atk/README.md

Lines changed: 130 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,130 @@
1+
# STM32H7r7-atk 开发板 BSP 说明
2+
3+
## 简介
4+
5+
本文档为 wenshan 为 STM32H7r7-atk开发板提供的 BSP (板级支持包) 说明。
6+
7+
主要内容如下:
8+
9+
- 开发板资源介绍
10+
- BSP 快速上手
11+
- 进阶使用方法
12+
13+
通过阅读快速上手章节开发者可以快速地上手该 BSP,将 RT-Thread 运行在开发板上。在进阶使用指南章节,将会介绍更多高级功能,帮助开发者利用 RT-Thread 驱动更多板载资源。
14+
15+
## 开发板介绍
16+
17+
阿波罗 STM32H7r7 是正点原子推出的一款基于 ARM Cortex-M7 内核的开发板,最高主频为 600Mhz,该开发板具有丰富的板载资源,可以充分发挥 STM32H7r7 的芯片性能。
18+
19+
开发板外观如下图所示:
20+
21+
![board](figures/board.png)
22+
23+
该开发板常用 **板载资源** 如下:
24+
25+
- MCU:STM32H7r7l8h,主频 600MHz,128K FLASH ,620K RAM
26+
- 外部 HyperRam:W955K8MBYA,32MB
27+
- 外部 SD NAND:MKDV4GCL,2GB
28+
- 外部 HyperFlash:GD25LX256MEBFR,32MB
29+
- 常用外设
30+
- LED:2个,DS0(红色,PB1),DS1(绿色,PB0)
31+
- 按键:4个,KEY_UP(兼具唤醒功能,PA0),K0(PH3),K1(PH2),K2(PC13)
32+
- 常用接口:USB 转串口、SD 卡接口、以太网接口、LCD 接口等
33+
- 调试接口,标准 SWD
34+
35+
开发板更多详细信息请参考正点原子 [STM32阿波罗开发板介绍](https://eboard.taobao.com/index.htm)
36+
37+
## 外设支持
38+
39+
本 BSP 目前对外设的支持情况如下:
40+
41+
| **板载外设** | **支持情况** | **备注** |
42+
| :---------------- | :----------: | :------------------------------------------------------ |
43+
| USB 转串口 | 支持 | |
44+
| ESP32接口 | 支持 | |
45+
| hyperbus Flash | 支持 | |
46+
| 以太网 | 支持 | |
47+
| SD卡 | 支持 | |
48+
| HyperRAM | 支持 | |
49+
| **片上外设** | **支持情况** | **备注** |
50+
| GPIO | 支持 | |
51+
| UART | 支持 | |
52+
| SPI | 支持 | |
53+
| I2C | 支持 | 软件iic |
54+
| ETH | 支持 | |
55+
| CAN-FD | 支持 | HDR暂不支持 |
56+
57+
## 使用说明
58+
59+
使用说明分为如下两个章节:
60+
61+
- 快速上手
62+
63+
本章节是为刚接触 RT-Thread 的新手准备的使用说明,遵循简单的步骤即可将 RT-Thread 操作系统运行在该开发板上,看到实验效果 。
64+
65+
- 进阶使用
66+
67+
本章节是为需要在 RT-Thread 操作系统上使用更多开发板资源的开发者准备的。通过使用 ENV 工具对 BSP 进行配置,可以开启更多板载资源,实现更多高级功能。
68+
69+
70+
### 快速上手
71+
72+
本 BSP 为开发者提供 MDK4、MDK5 和 IAR 工程,并且支持 GCC 开发环境。下面以 MDK5 开发环境为例,介绍如何将系统运行起来。
73+
74+
**请注意!!!**
75+
76+
在执行编译工作前请先打开ENV执行以下指令(该指令用于拉取必要的HAL库及CMSIS库,否则无法通过编译):
77+
78+
```bash
79+
pkgs --update
80+
```
81+
82+
#### 硬件连接
83+
84+
使用数据线连接开发板到 PC,打开电源开关。
85+
86+
#### 编译下载
87+
88+
双击 project.uvprojx 文件,打开 MDK5 工程,编译并下载程序到开发板。
89+
90+
> 工程默认配置使用 DAP_LINK 仿真器下载程序,在通过 DAP_LINK 连接开发板的基础上,点击下载按钮即可下载程序到开发板
91+
92+
#### 运行结果
93+
94+
下载程序成功之后,系统会自动运行,LED闪烁。
95+
96+
连接开发板对应串口到 PC , 在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息:
97+
98+
```bash
99+
\ | /
100+
- RT - Thread Operating System
101+
/ | \ 5.1.0 build Jun 2 2025 12:43:54
102+
2006 - 2024 Copyright by RT-Thread team
103+
```
104+
105+
### 进阶使用
106+
107+
此 BSP 默认只开启了 GPIO 和 串口1 的功能,如果需使用更多高级功能,需要利用 ENV 工具对BSP 进行配置,步骤如下:
108+
109+
1. 在 bsp 下打开 env 工具。
110+
111+
2. 输入`menuconfig`命令配置工程,配置好之后保存退出。
112+
113+
3. 输入`pkgs --update`命令更新软件包。
114+
115+
4. 输入`scons --target=mdk4/mdk5/iar` 命令重新生成工程。
116+
117+
本章节更多详细的介绍请参考 [STM32 系列 BSP 外设驱动使用教程](../docs/STM32系列BSP外设驱动使用教程.md)
118+
119+
## 注意事项
120+
121+
1. UART暂未完成对DMA的支持,同时开启uart7和uart1的dma会进入hardfault,只打开uart1的dma会有概率进入hardfault。
122+
2. 开发板连接正点原子的esp32模块可能会报execute command (AT+CIPDNS?) failed错误,这是因为esp32的at固件不支持这个at指令,需要升级esp32的固件版本,详情参照网上教程。
123+
3. 正点原子暂未提供可以用在rtthread studio上的stldr下载文件,故在rtthread studio上只能编译还不能下载,现在只有在keil上用的flm下载文件。
124+
4. 如果使用eth的话,hal库一定要是1.3版本以上!
125+
5. 核心板有四种,这里使用的是正点原子的h7r7的高配板。
126+
6. 需要先下载对应的bootloader,在[Wenshan-736/stm32h7r7-atk](https://github.com/Wenshan-736/stm32h7r7-atk/tree/main)里面
127+
128+
## 联系人信息
129+
130+
维护人:[Wenshan-736](https://github.com/Wenshan-736), 邮箱:<[email protected]>

bsp/stm32/stm32h7r7-atk/SConscript

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# for module compiling
2+
import os
3+
Import('RTT_ROOT')
4+
from building import *
5+
6+
cwd = GetCurrentDir()
7+
objs = []
8+
list = os.listdir(cwd)
9+
10+
for d in list:
11+
path = os.path.join(cwd, d)
12+
if os.path.isfile(os.path.join(path, 'SConscript')):
13+
objs = objs + SConscript(os.path.join(d, 'SConscript'))
14+
15+
Return('objs')

0 commit comments

Comments
 (0)