|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | 21-Aug-2025 | - |
| .ci/attachconfig/ | | 21-Aug-2025 | - | | |
| .settings/ | | 21-Aug-2025 | - | | |
| applications/ | | 21-Aug-2025 | - | | |
| board/ | | 21-Aug-2025 | - | | |
| figures/ | | 21-Aug-2025 | - | | |
| .config | A D | 21-Aug-2025 | 47.2 KiB | 1,444 | 1,332 |
| .cproject | A D | 21-Aug-2025 | 51.9 KiB | 202 | 201 |
| .gitignore | A D | 21-Aug-2025 | 365 | 43 | 42 |
| .project | A D | 21-Aug-2025 | 2.1 KiB | 70 | 69 |
| Kconfig | A D | 21-Aug-2025 | 493 | 28 | 20 |
| README.md | A D | 21-Aug-2025 | 4.6 KiB | 118 | 68 |
| README_zh.md | A D | 21-Aug-2025 | 4.8 KiB | 127 | 76 |
| SConscript | A D | 21-Aug-2025 | 390 | 19 | 14 |
| SConstruct | A D | 21-Aug-2025 | 2.4 KiB | 76 | 57 |
| makefile.targets | A D | 21-Aug-2025 | 181 | 4 | 4 |
| project.ewd | A D | 21-Aug-2025 | 99.6 KiB | 2,835 | 2,834 |
| project.ewp | A D | 21-Aug-2025 | 62.9 KiB | 2,312 | 2,311 |
| project.eww | A D | 21-Aug-2025 | 161 | 11 | 7 |
| project.uvoptx | A D | 21-Aug-2025 | 6.3 KiB | 198 | 190 |
| project.uvprojx | A D | 21-Aug-2025 | 39.8 KiB | 1,121 | 1,120 |
| rtconfig.h | A D | 21-Aug-2025 | 8.5 KiB | 429 | 84 |
| rtconfig.py | A D | 21-Aug-2025 | 5.3 KiB | 186 | 143 |
| template.ewp | A D | 21-Aug-2025 | 71.3 KiB | 2,041 | 2,040 |
| template.eww | A D | 21-Aug-2025 | 162 | 11 | 7 |
| template.uvopt | A D | 21-Aug-2025 | 4.8 KiB | 163 | 156 |
| template.uvoptx | A D | 21-Aug-2025 | 6.3 KiB | 198 | 190 |
| template.uvprojx | A D | 21-Aug-2025 | 14 KiB | 396 | 390 |
README.md
1# STM32F401 Nucleo-64 BSP Introduction
2
3[中文页](README_zh.md) |
4
5## Introduction
6
7This document records the execution instruction of the BSP (board support package) provided by the RT-Thread development team for the STM32F401 Nucleo-64 development board.
8
9The document is covered in three parts:
10
11- STM32F401 Nucleo-64 Board Resources Introduction
12- Quickly Get Started
13- Advanced Features
14
15By reading the Quickly Get Started section developers can quickly get their hands on this BSP and run RT-Thread on the board. More advanced features will be introduced in the Advanced Features section to help developers take advantage of RT-Thread to drive more on-board resources.
16
17## Board Resources Introduction
18
19The STM32 Nucleo-64 is a development board based on STM32F401RE, which contains a Cortex-M4 core. The maximum main frequency is 84 MHz, and it has a wealth of on-board resources that can take full advantage of the STM32F401RE's chip performance.
20
21
22
23The mainly-used **on-board resources** are shown as follows:
24
25- MCU: STM32F401RET6
26- Main Frequency: 84MHz
27- Memory: 512KB FLASH , 96KB RAM
28- Common-used peripherals:
29 - 3 LEDs: USB communication (LD1), user LED (LD2), power LED (LD3)
30 - 2 Buttons: USER and RESET
31- Common-used interface: USB, Arduino Uno, and ST morpho
32- Debug interface: ST-LINK/V2-1
33
34#### For more details about this board, please refer to the [ST official documentation](https://www.st.com/zh/evaluation-tools/nucleo-f401re.html)
35
36
37
38### Peripheral Condition
39
40Each peripheral supporting condition for this BSP is as follows:
41
42| **On-chip Peripheral Drivers** | **Support** | **Remark** |
43| ------------------------------ | ----------- | ----------------------------------- |
44| GPIO | Support | PA0, PA1... PH1 ---> PIN: 0, 1...63 |
45| UART | Support | UART2 |
46| SPI | Support | SPI1 |
47
48
49
50## Quickly Get Started
51
52This BSP provides MDK5 and IAR projects for developers. Also support GCC development environment. Here's an example of the MDK5 development environment, to introduce how to run the system.
53
54**Attention please!!!**
55
56Before the compilation work, please open ENV and execute the following command (this command is used to pull the necessary HAL library and CMSIS library, otherwise it cannot be compiled):
57
58```bash
59pkgs --update
60```
61
62#### Hardware Connection
63
64Use a Type-A to Mini-B cable to connect the development board to the PC and turn on the power switch. The red LED LD3 (PWR) and LD1 (COM) will lit.
65
66#### Compile And Download
67
68Double-click the `project.uvprojx` file, to open the MDK5 project, compile and download the program to the board.
69
70> By default, the project uses ST_LINK simulator to download the program, when the ST_LINK connects the board, clicking the download button can download the program to the board.
71
72### Running Results
73
74After the program is successfully downloaded, the system runs automatically. Observe the running results of the LED on the development board, the red LD3 and LD1 will lit all the time, green LD2 will flash periodically.
75
76The USB virtual COM port connects to serial port 2 by default, and when the corresponding serial port (115200-8-1-N) is opened in the terminal tool, the output information of RT-Thread can be seen when the device is reset:
77
78```
79 \ | /
80- RT - Thread Operating System
81 / | \ 4.0.1 build Mar 7 2019
82 2006 - 2019 Copyright by rt-thread team
83msh >
84```
85
86### Advanced Features
87
88This BSP only enables GPIO and serial port 2 by default. If need more advanced features, you need to configure the BSP with RT-Thread Env tools, as follows:
89
90- Open the [Env](https://www.rt-thread.io/download.html?download=Env) tool under this BSP;
91
92- Enter the `menuconfig` command to configure the project, then save and exit;
93
94- Enter the `pkgs --update` command to update the packages;
95
96- Enter the `scons --target=mdk4/mdk5/iar` command to regenerate the project.
97
98
99
100## Notes
101
102According to the pin number specification, in the new stm32 bsp framework, the GPIO driver is managed in a sequential numbering manner.
103
104The pin serial number corresponds to the pin name as shown in the following table:
105
106| STM32 Pin Name | Pin Sequence Number |
107| -------------- | ------------------- |
108| PA0 - PA15 | 0 - 15 |
109| PB0 - PB15 | 16 - 31 |
110| PC0 - PC15 | 32 - 47 |
111| PD0 - ... | 48 - ... |
112
113
114
115## Maintained By
116
117[shaoguoji](https://github.com/shaoguoji) 752147916@qq.com
118
README_zh.md
1# STM32F401 Nucleo-64 开发板 BSP 说明
2
3## 简介
4
5本文档为 STM32F401 Nucleo-64 开发板的 BSP (板级支持包) 说明。
6
7主要内容如下:
8
9- 开发板资源介绍
10- BSP 快速上手
11- 进阶使用方法
12
13通过阅读快速上手章节开发者可以快速地上手该 BSP,将 RT-Thread 运行在开发板上。在进阶使用指南章节,将会介绍更多高级功能,帮助开发者利用 RT-Thread 驱动更多板载资源。
14
15## 开发板介绍
16
17STM32 Nucleo-64 是 ST 官方推出的开发板,搭载 STM32F401RE 芯片,基于 ARM Cortex-M4 内核,最高主频 84 MHz,具有丰富的板载资源,可以充分发挥 STM32F401RE 的芯片性能。
18
19开发板外观如下图所示:
20
21
22
23STM32F401 Nucleo-64 开发板常用 **板载资源** 如下:
24
25- MCU:STM32F401RET6,主频 84MHz,512KB FLASH ,96KB RAM
26- 常用外设
27 - LED:3 个,USB communication (LD1), user LED (LD2), power LED (LD3) 。
28 - 按键:2 个,USER and RESET 。
29- 常用接口:USB 转串口、Arduino Uno 和 ST morpho 两类扩展接口
30- 调试接口:板载 ST-LINK/V2-1 调试器。
31
32快速入门:[Getting started with STM32 Nucleo board software development tools](https://www.st.com/resource/en/user_manual/dm00105928.pdf)
33
34原理图下载:[STM32 Nucleo (64 pins) schematics](https://www.st.com/resource/en/schematic_pack/nucleo_64pins_sch.zip)
35
36*更多相关信息资料见 ST 官网详情页:[STM32 Nucleo-64 development board with STM32F401RE MCU](https://www.st.com/zh/evaluation-tools/nucleo-f401re.html)*
37
38## 外设支持
39
40本 BSP 目前对外设的支持情况如下:
41
42| **片上外设** | **支持情况** | **备注** |
43| :------------ | :----------: | :-----------------------------------: |
44| GPIO | 支持 | PA0, PA1... PH1 ---> PIN: 0, 1...63 |
45| UART | 支持 | UART2 |
46| SPI | 支持 | SPI1 |
47
48## 使用说明
49
50使用说明分为如下两个章节:
51
52- 快速上手
53
54 本章节是为刚接触 RT-Thread 的新手准备的使用说明,遵循简单的步骤即可将 RT-Thread 操作系统运行在该开发板上,看到实验效果 。
55
56- 进阶使用
57
58 本章节是为需要在 RT-Thread 操作系统上使用更多开发板资源的开发者准备的。通过使用 ENV 工具对 BSP 进行配置,可以开启更多板载资源,实现更多高级功能。
59
60
61### 快速上手
62
63本 BSP 为开发者提供 MDK5 和 IAR 工程,并且支持 GCC 开发环境。下面以 MDK5 开发环境为例,介绍如何将系统运行起来。
64
65**请注意!!!**
66
67在执行编译工作前请先打开ENV执行以下指令(该指令用于拉取必要的HAL库及CMSIS库,否则无法通过编译):
68
69```bash
70pkgs --update
71```
72
73#### 硬件连接
74
75使用 Type-A to Mini-B 线连接开发板和 PC 供电,红色 LED LD3 (PWR) 和 LD1 (COM) 会点亮。
76
77#### 编译下载
78
79双击 project.uvprojx 文件,打开 MDK5 工程,编译并下载程序到开发板。
80
81> 工程默认配置使用 ST-LINK 下载程序,点击下载按钮即可下载程序到开发板。
82
83#### 运行结果
84
85下载程序成功之后,系统会自动运行,观察开发板上 LED 的运行效果,红色 LD3 和 LD1 常亮、绿色 LD2 会周期性闪烁。
86
87USB 虚拟 COM 端口默认连接串口 2,在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息:
88
89```bash
90 \ | /
91- RT - Thread Operating System
92 / | \ 4.0.1 build Mar 7 2019
93 2006 - 2019 Copyright by rt-thread team
94msh >
95```
96### 进阶使用
97
98此 BSP 默认只开启了 GPIO 和 串口 2 的功能,更多高级功能需要利用 ENV 工具对 BSP 进行配置,步骤如下:
99
1001. 在 BSP 下打开 env 工具。
101
1022. 输入 `menuconfig` 命令配置工程,配置好之后保存退出。
103
1043. 输入 `pkgs --update` 命令更新软件包。
105
1064. 输入 `scons --target=mdk4/mdk5/iar` 命令重新生成工程。
107
108本章节更多详细的介绍请参考 [STM32 系列 BSP 外设驱动使用教程](../docs/STM32 系列 BSP 外设驱动使用教程. md)。
109
110## 注意事项
111
112关于 pin 序号规则,与旧 bsp 使用封装管脚序号不同,在新的 stm32 bsp 框架中,统一采用顺序编号的方式,对 GPIO 驱动进行管理,在移植旧 bsp 时特别要注意这点。
113
114pin 序号与引脚名对应关系如下表:
115
116| STM32 引脚名 | 管脚序号 pin |
117|--------------|--------------|
118| PA0 - PA15 | 0 - 15 |
119| PB0 - PB15 | 16 - 31 |
120| PC0 - PC15 | 32 - 47 |
121| PD0 - ... | 48 - ... |
122
123## 联系人信息
124
125维护人:
126
127- [shaoguoji](https://github.com/shaoguoji) ,邮箱:<752147916@qq.com>