Skip to content

Commit d0eaa93

Browse files
committed
fix readme
1 parent 450e217 commit d0eaa93

File tree

9 files changed

+53
-51
lines changed

9 files changed

+53
-51
lines changed

bsp/renesas/ra4e2-ek/README.md

Lines changed: 53 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,11 @@
1515

1616
开发板正面外观如下图:
1717

18-
![image-20211011174017429](docs/picture/cpk-ra6m4.png)
18+
![image-20211011174017429](docs/picture/ek-ra4e2-board.png)
1919

2020
该开发板常用 **板载资源** 如下:
2121

22-
- MCU:R7FA6M4AF3CFB,200MHz,Arm Cortex®-M33 内核,1MB 代码闪存, 256kB SRAM
22+
- MCU:R7FA4E2B93CFM,100MHz,Arm Cortex®-M33 内核,128kB 代码闪存, 40kB SRAM
2323
- 调试接口:板载 J-Link 接口
2424
- 扩展接口:两个 PMOD 连接器
2525

@@ -31,23 +31,8 @@
3131

3232
| **片上外设** | **支持情况** | **备注** |
3333
| :----------------- | :----------------- | :------------- |
34-
| UART | 支持 | UART7 为默认日志输出端口 |
35-
| GPIO | 支持 | |
36-
| IIC | 支持 | 软件 |
37-
| WDT | 支持 | |
38-
| RTC | 支持 | |
39-
| ADC | 支持 | |
40-
| DAC | 支持 | |
41-
| SPI | 支持 | |
42-
| FLASH | 支持 | |
43-
| PWM | 支持 | |
44-
| CAN | 支持 | |
45-
| 持续更新中... | | |
46-
| **外接外设** | **支持情况** | **备注** |
47-
| WiFi 模块 | 支持 | [RW007 WiFi 网络模块](https://github.com/RT-Thread-packages/rw007) |
48-
| 温湿度传感器 | 支持 | [HS300x 温湿度模块](https://github.com/Guozhanxin/hs300x) |
49-
| 室内空气质量传感器 | 支持 | [zmod4410 室内空气质量模块](https://github.com/ShermanShao/zmod4410) |
50-
| 光线传感器 | 支持 | [isl29035光线传感器模块](https://github.com/ShermanShao/isl29035) |
34+
| UART | 支持 | UART0 为默认日志输出端口 |
35+
| GPIO | 支持 | P207/P104/P112 为对应RGB LED |
5136

5237

5338
## 使用说明
@@ -67,7 +52,9 @@
6752

6853
**硬件连接**
6954

70-
使用 USB 数据线连接开发板到 PC,使用 J-link 接口下载和 DEBUG 程序。使用 USB 转串口工具连接 UART7:P613(TXD)、P614(RXD)。
55+
使用 USB 数据线连接开发板到 PC,使用 J-link 接口下载和 DEBUG 程序。使用 USB 转串口工具连接 UART0:P410(TXD)、P411(RXD)。
56+
57+
![image-20211011174017429](docs/picture/ek-ra4e2-TXRX.png)
7158

7259
**编译下载**
7360

@@ -76,12 +63,12 @@
7663
> 注意:此工程需要使用 J-Flash Lite 工具烧录程序。建议使用 V7.50 及以上版本烧录工程。[J-Link 下载链接](https://www.segger.com/downloads/jlink/)
7764
7865
- 下载:打开 J-Flash lite 工具,选择芯片型号 R7FA6M4AF,点击 OK 进入工具。选择 BSP 目录下 MDK 编译出的 /object/ra6m4.hex 文件,点击 Program Device 按钮开始烧录。具体操作过程可参考下图步骤:
79-
66+
-
8067
![image-20211011181555421](docs/picture/jflash1.png)
8168

8269
![image-20211011182047981](docs/picture/jflash2.png)
8370

84-
![image-20211011182434519](docs/picture/jflash.png)
71+
选择hex文件,点击烧录
8572

8673
![image-20211011182949604](docs/picture/jflash3.png)
8774

@@ -92,33 +79,27 @@
9279
连接开发板对应串口到 PC , 在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息。输入 help 命令可查看系统中支持的命令。
9380

9481
```bash
82+
9583
\ | /
9684
- RT - Thread Operating System
97-
/ | \ 4.0.4 build Oct 11 2021
98-
2006 - 2021 Copyright by rt-thread team
85+
/ | \ 5.2.2 build Sep 17 2025 07:52:00
86+
2006 - 2024 Copyright by RT-Thread team
9987

10088
Hello RT-Thread!
10189
msh >
10290
msh >help
10391
RT-Thread shell commands:
92+
pin - pin [option]
10493
reboot - Reboot System
105-
help - RT - Thread shell help.
106-
ps - List threads in the system.
107-
free - Show the memory usage in the system.
108-
hello - say hello world
94+
help - RT-Thread shell help
95+
ps - List threads in the system
96+
free - Show the memory usage in the system
10997
clear - clear the terminal screen
110-
version - show RT - Thread version information
111-
list_thread - list thread
112-
list_sem - list semaphore in system
113-
list_event - list event in system
114-
list_mutex - list mutex in system
115-
list_mailbox - list mail box in system
116-
list_msgqueue - list message queue in system
117-
list_timer - list timer in system
118-
list_device - list device in system
119-
list - list all commands in system
120-
121-
msh >
98+
version - show RT-Thread version information
99+
list - list objects
100+
backtrace - print backtrace of a thread
101+
102+
msh >
122103
```
123104

124105
**应用入口函数**
@@ -132,14 +113,21 @@ void hal_entry(void)
132113

133114
while (1)
134115
{
116+
rt_pin_write(LED1_PIN, PIN_HIGH);
117+
rt_pin_write(LED2_PIN, PIN_HIGH);
135118
rt_pin_write(LED3_PIN, PIN_HIGH);
136119
rt_thread_mdelay(500);
120+
rt_pin_write(LED1_PIN, PIN_LOW);
121+
rt_pin_write(LED2_PIN, PIN_LOW);
137122
rt_pin_write(LED3_PIN, PIN_LOW);
138123
rt_thread_mdelay(500);
139124
}
140125
}
141126
```
142127
128+
对应LED原理图:
129+
![image-20211214102231248](docs/picture/ek-ra2e2-board-led.png)
130+
143131
### 进阶使用
144132
145133
**资料及文档**
@@ -153,39 +141,53 @@ void hal_entry(void)
153141
154142
**FSP 配置**
155143
156-
需要修改瑞萨的 BSP 外设配置或添加新的外设端口,需要用到瑞萨的 [FSP](https://www2.renesas.cn/jp/zh/software-tool/flexible-software-package-fsp#document) 配置工具。请务必按照如下步骤完成配置。配置中有任何问题可到[RT-Thread 社区论坛](https://club.rt-thread.org/)中提问。
144+
需要修改瑞萨的 BSP 外设配置或添加新的外设端口,需要用到瑞萨的 FSP 配置工具。请务必按照如下步骤完成配置。配置中有任何问题可到[RT-Thread 社区论坛](https://club.rt-thread.org/)中提问。
145+
146+
1. [下载灵活配置软件包 (FSP) | Renesas](https://www.renesas.com/cn/zh/software-tool/flexible-software-package-fsp),请使用 FSP 6.0.0 版本
157147
158-
1. [下载灵活配置软件包 (FSP) | Renesas](https://www.renesas.com/cn/zh/software-tool/flexible-software-package-fsp),请使用 FSP 3.5.0 版本
159-
2. 下载安装完成后,需要添加 CPK-RA6M4 开发板的官方板级支持包
160-
> 打开[ CPK-RA6M4 开发板详情页](https://www2.renesas.cn/jp/zh/products/microcontrollers-microprocessors/ra-cortex-m-mcus/cpk-ra6m4-evaluation-board),在**“下载”**列表中找到 **”CPK-RA6M4板级支持包“**,点击链接即可下载
161-
3. 如何将 **”CPK-RA6M4板级支持包“**添加到 FSP 中,请参考文档[如何导入板级支持包](https://www2.renesas.cn/document/ppt/1527171?language=zh&r=1527191)
162-
4. 请查看文档:[使用瑞萨 FSP 配置工具](./docs/使用瑞萨FSP配置工具.md)。在 MDK 中通过添加自定义命名来打开当前工程的 FSP 配置。
148+
目前仓库 bsp 默认使能最小体量配置,用户可通过如下步骤使能 env 外设配置:
149+
150+
**Keil使用方法**
151+
152+
1. 在 bsp 目录下打开 env 工具,使用 `scons --target=mdk5`命令生成 MDK 工程。
153+
2. 打开 bsp 目录下的`project.uvprojx`文件,选择上方导航栏的 `Software Components`配置,打开后找到`Flex Software`下的`RA Configuration`旁的配置按钮,该操作会自动查找当前电脑环境下安装的 fsp 版本,选择指定版本后进入 fsp。
154+
![](../docs/figures/mdk_rasc.png)
155+
3. 在进入 fsp 后我们可以发现,已经存在了一些已经配置完成的外设,此时我们点击`Generate Project Content`按钮即可生成所需驱动文件。
156+
![](docs/picture/ek-ra4e2-fsp_configure.png)
157+
4. 接下来回到 env,使能所需的外设配置后保存退出即可。
158+
159+
**GCC**
160+
161+
1.fsp的使用,打开当前目录下的`configuration.xml`
162+
163+
2.配置完外设之后点击`Generate Project Content`按钮即可生成所需驱动文件。
164+
165+
**注意:重新生成配置需要把当前路径下的`bsp_linker_info.h`删掉**
163166
164167
**ENV 配置**
165168
166169
- 如何使用 ENV 工具:[RT-Thread env 工具用户手册](https://www.rt-thread.org/document/site/#/development-tools/env/env)
167170
168-
此 BSP 默认只开启了 UART7 的功能,如果需使用更多高级功能例如组件、软件包等,需要利用 ENV 工具进行配置。
171+
此 BSP 默认只开启了UART和IRQ3外设功能,如果需使用更多高级功能例如组件、软件包等,需要利用 ENV 工具进行配置。
169172
170173
步骤如下:
171174
1. 在 bsp 下打开 env 工具。
172175
2. 输入`menuconfig`命令配置工程,配置好之后保存退出。
173176
3. 输入`pkgs --update`命令更新软件包。
174177
4. 输入`scons --target=mdk5` 命令重新生成工程。
175178
176-
177179
## FAQ
178180
179-
### 使用 MDK 的 DEBUG 时如果遇到提示 “Error: Flash Download failed Cortex-M33” 怎么办?
181+
### 使用 MDK 的 DEBUG 时如果遇到提示 “Error: Flash Download failed Cortex-M23” 怎么办?
180182
181183
可按照下图操作,修改 Utilities 中的选项:
182184
183-
![image-20211214102231248](docs/picture/readme_faq1.png)
185+
![image-20211214102231248](docs/picture/readme_faq1.png)
184186
185187
## 联系人信息
186188
187189
在使用过程中若您有任何的想法和建议,建议您通过以下方式来联系到我们 [RT-Thread 社区论坛](https://club.rt-thread.org/)
188190
189191
## 贡献代码
190192
191-
如果您对 CPK-RA6M4 感兴趣,并且有一些好玩的项目愿意与大家分享的话欢迎给我们贡献代码,您可以参考 [如何向 RT-Thread 代码贡献](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/development-guide/github/github)。
193+
如果您对此BSP感兴趣,并且有一些好玩的项目愿意与大家分享的话欢迎给我们贡献代码,您可以参考 [如何向 RT-Thread 代码贡献](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/development-guide/github/github)。
19.2 KB
Loading
261 KB
Loading
236 KB
Loading
129 KB
Loading
14.8 KB
Loading
11.6 KB
Loading
31.1 KB
Loading
19 KB
Loading

0 commit comments

Comments
 (0)