【RA-Eco-RA0E1-32PIN-V1.0开发板试用】使用 RASC 建立 Keil 工程、烧录测试
使用瑞萨官网提供的 RASC 即智能配置工具软件,生成 Keil 工程,方便用户进行引脚定义、堆栈设定、时钟配置、中断配置等操作,极大减少开发时间。
这里我们介绍了如何通过 RASC 生成 Keil 工程并调试、烧录程序。
RASC 安装
1.RA Smart Configurator (RASC) 下载与安装,一般随 FSP 软件工具包一起安装

2.选择目标芯片对应的设备包

3.自动下载和安装

4.安装完成后,打开软件,设定工作区路径,

**5.新建 RA 工程,依次点击 **文件
- 新建
- 瑞萨 C/C++ 项目
- Renesas RA
**6.选择芯片型号 **R7FA0E1073CFJ
,IDE 为 Keil MDK V5,工具链为 ARM Compiler 6

7.进入工程配置界面,点击下方的 Pins 引脚配置,将板载 LED 对应的引脚模式设置为 Ourput mode 输出模式,

**8.点击 **Generate Project Content
生成工程文件。
Keil IDE 编译
回到工程所在文件夹,可见此时已生成 Keil 工程文件,
1.双击打开该文件,进入 Keil 编辑界面

2.打开 hal_entry.c 文件,并编辑目标代码

板载 LED 闪烁代码如下
while(1){
R_BSP_SoftwareDelay(100, BSP_DELAY_UNITS_MILLISECONDS);
R_IOPORT_PinWrite(&g_ioport_ctrl, BSP_IO_PORT_01_PIN_03, BSP_IO_LEVEL_LOW);
R_BSP_SoftwareDelay(100, BSP_DELAY_UNITS_MILLISECONDS);
R_IOPORT_PinWrite(&g_ioport_ctrl, BSP_IO_PORT_01_PIN_03, BSP_IO_LEVEL_HIGH);
R_BSP_SoftwareDelay(100, BSP_DELAY_UNITS_MILLISECONDS);
R_IOPORT_PinWrite(&g_ioport_ctrl, BSP_IO_PORT_01_PIN_12, BSP_IO_LEVEL_LOW);
R_BSP_SoftwareDelay(100, BSP_DELAY_UNITS_MILLISECONDS);
R_IOPORT_PinWrite(&g_ioport_ctrl, BSP_IO_PORT_01_PIN_12, BSP_IO_LEVEL_HIGH);
}
3.点击 rebuild 按键,构建工程,

4.使用 DAP-Link 或 J-Link 烧录器连接开发板与电脑,点击 Options for Target 按钮,进入Debug 调试选项;
5.点击 Debug 标签下硬件仿真后的 Setting 按钮,对硬件驱动进行设置;

**6.设置完成后,点击 **Download
按钮即可烧录至开发板。
参考:使用RASC生成Keil工程 .
效果展示
见视频