Skip to content

Commit d728c3d

Browse files
committed
[bsp/ra6m4-iot] add ra6m4-iot BSP
1 parent 44070a7 commit d728c3d

File tree

230 files changed

+116513
-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.

230 files changed

+116513
-0
lines changed

bsp/renesas/ra6m4-iot/.config

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

bsp/renesas/ra6m4-iot/.gitignore

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
/RTE
2+
/Listings
3+
/Objects
4+
ra_cfg.txt
5+
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
# files format check exclude path, please follow the instructions below to modify;
2+
# If you need to exclude an entire folder, add the folder path in dir_path;
3+
# If you need to exclude a file, add the path to the file in file_path.
4+
5+
dir_path:
6+
- ra
7+
- ra_gen
8+
- ra_cfg
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
#Fri Jan 07 11:55:32 CST 2022
2+
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#Common\#\#all\#\#fsp_common\#\#\#\#3.5.0/libraries=
3+
com.renesas.cdt.ddsc.content/com.renesas.cdt.ddsc.content.defaultlinkerscript=script/fsp.scat
4+
com.renesas.cdt.ddsc.packs.componentfiles/RECH\#\#BSP\#\#Board\#\#RA6M4_IoT\#\#\#\#3.5.0/all=3595564841,ra/board/ra6m4_iot/board_keys.c|1504341481,ra/board/ra6m4_iot/SEGGER_RTT_Conf.h|310556077,ra/board/ra6m4_iot/board_init.c|1596843605,ra/board/ra6m4_iot/board_keys.h|431480014,ra/board/ra6m4_iot/board_leds.h|443795680,ra/board/ra6m4_iot/board_leds.c|736642717,ra/board/ra6m4_iot/SEGGER_RTT.h|2021830415,ra/board/ra6m4_iot/board_ethernet_phy.h|311023834,ra/board/ra6m4_iot/board.h|2513852369,ra/board/ra6m4_iot/board_init.h
5+
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#Common\#\#all\#\#fsp_common\#\#\#\#3.5.0/all=1904866635,ra/fsp/src/bsp/mcu/all/bsp_clocks.h|470601830,ra/fsp/src/bsp/mcu/all/bsp_clocks.c|1728953905,ra/fsp/inc/fsp_features.h|3255765648,ra/fsp/src/bsp/cmsis/Device/RENESAS/Source/system.c|1499520276,ra/fsp/src/bsp/mcu/all/bsp_group_irq.c|546480625,ra/fsp/inc/fsp_common_api.h|400573940,ra/fsp/src/bsp/mcu/all/bsp_register_protection.h|4222527282,ra/fsp/src/bsp/mcu/all/bsp_module_stop.h|1939984091,ra/fsp/inc/api/r_ioport_api.h|3492513568,ra/fsp/src/bsp/mcu/all/bsp_register_protection.c|4051445857,ra/fsp/src/bsp/mcu/all/bsp_common.h|1630997354,ra/fsp/src/bsp/mcu/all/bsp_irq.c|3297195641,ra/fsp/inc/fsp_version.h|2977689308,ra/fsp/src/bsp/mcu/all/bsp_mcu_api.h|568600546,ra/fsp/src/bsp/cmsis/Device/RENESAS/Source/startup.c|2920829723,ra/fsp/src/bsp/mcu/all/bsp_guard.c|3998046333,ra/fsp/src/bsp/cmsis/Device/RENESAS/Include/base_addresses.h|3549961311,ra/fsp/src/bsp/mcu/all/bsp_tfu.h|1353647784,ra/fsp/src/bsp/mcu/all/bsp_delay.c|1615019982,ra/fsp/src/bsp/mcu/all/bsp_sbrk.c|2386285210,ra/fsp/src/bsp/cmsis/Device/RENESAS/Include/renesas.h|1552630912,ra/fsp/src/bsp/mcu/all/bsp_guard.h|3983299396,ra/fsp/src/bsp/mcu/all/bsp_delay.h|2906400,ra/fsp/src/bsp/mcu/all/bsp_common.c|731782070,ra/fsp/src/bsp/mcu/all/bsp_irq.h|2425160085,ra/fsp/inc/api/bsp_api.h|3606266210,ra/fsp/src/bsp/mcu/all/bsp_rom_registers.c|2308894280,ra/fsp/src/bsp/cmsis/Device/RENESAS/Include/system.h|3753300083,ra/fsp/src/bsp/mcu/all/bsp_arm_exceptions.h|2208590403,ra/fsp/inc/instances/r_ioport.h|2847966430,ra/fsp/src/bsp/mcu/all/bsp_security.c|3984836408,ra/fsp/src/bsp/mcu/all/bsp_group_irq.h|521902797,ra/fsp/src/bsp/mcu/all/bsp_security.h|1236602439,ra/fsp/src/bsp/mcu/all/bsp_io.c|1992062042,ra/fsp/src/bsp/mcu/all/bsp_compiler_support.h|460577388,ra/fsp/src/bsp/mcu/all/bsp_io.h
6+
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#BSP\#\#ra6m4\#\#device\#\#\#\#3.5.0/all=2308894280,ra/fsp/src/bsp/cmsis/Device/RENESAS/Include/system.h
7+
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#BSP\#\#ra6m4\#\#device\#\#\#\#3.5.0/libraries=
8+
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#HAL\ Drivers\#\#all\#\#r_sci_uart\#\#\#\#3.5.0/libraries=
9+
com.renesas.cdt.ddsc.settingseditor/com.renesas.cdt.ddsc.settingseditor.active_page=PinConfiguration
10+
com.renesas.cdt.ddsc.packs.componentfiles/Arm\#\#CMSIS\#\#CMSIS5\#\#CoreM\#\#\#\#5.8.0+renesas.0.fsp.3.5.0/all=1372010515,ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm23.h|2327633156,ra/arm/CMSIS_5/CMSIS/Core/Include/core_sc000.h|2701379970,ra/arm/CMSIS_5/CMSIS/Core/Include/mpu_armv8.h|1494441116,ra/arm/CMSIS_5/CMSIS/Core/Include/mpu_armv7.h|302860276,ra/arm/CMSIS_5/CMSIS/Core/Include/cachel1_armv7.h|4290386133,ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm0plus.h|2635219934,ra/arm/CMSIS_5/CMSIS/Core/Include/tz_context.h|965562395,ra/arm/CMSIS_5/CMSIS/Core/Include/cmsis_gcc.h|364344841,ra/arm/CMSIS_5/CMSIS/Core/Include/core_sc300.h|3007265674,ra/arm/CMSIS_5/CMSIS/Core/Include/core_armv8mbl.h|1044777225,ra/arm/CMSIS_5/CMSIS/Core/Include/cmsis_armcc.h|1564341101,ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm7.h|3358993753,ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm4.h|2718020009,ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm33.h|1168186370,ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm55.h|304461792,ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm3.h|1745843273,ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm0.h|2851112248,ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm1.h|3898569239,ra/arm/CMSIS_5/CMSIS/Core/Include/cmsis_armclang.h|3127123217,ra/arm/CMSIS_5/CMSIS/Core/Include/core_cm35p.h|3163610011,ra/arm/CMSIS_5/CMSIS/Core/Include/pmu_armv8.h|3911746910,ra/arm/CMSIS_5/CMSIS/Core/Include/cmsis_armclang_ltm.h|1577199483,ra/arm/CMSIS_5/CMSIS/Core/Include/cmsis_iccarm.h|1017116116,ra/arm/CMSIS_5/CMSIS/Core/Include/cmsis_compiler.h|1441545198,ra/arm/CMSIS_5/LICENSE.txt|3552689244,ra/arm/CMSIS_5/CMSIS/Core/Include/core_armv81mml.h|2333906976,ra/arm/CMSIS_5/CMSIS/Core/Include/cmsis_version.h|2381390623,ra/arm/CMSIS_5/CMSIS/Core/Include/core_armv8mml.h
11+
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#BSP\#\#ra6m4\#\#device\#\#R7FA6M4AF3CFP\#\#3.5.0/libraries=
12+
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#BSP\#\#ra6m4\#\#fsp\#\#\#\#3.5.0/libraries=
13+
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#BSP\#\#ra6m4\#\#fsp\#\#\#\#3.5.0/all=1009023542,ra/fsp/src/bsp/mcu/ra6m4/bsp_elc.h|3301568719,ra/fsp/src/bsp/mcu/ra6m4/bsp_feature.h|2347061782,ra/fsp/src/bsp/mcu/ra6m4/bsp_mcu_info.h
14+
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#HAL\ Drivers\#\#all\#\#r_ioport\#\#\#\#3.5.0/all=2208590403,ra/fsp/inc/instances/r_ioport.h|1939984091,ra/fsp/inc/api/r_ioport_api.h|3254285722,ra/fsp/src/r_ioport/r_ioport.c
15+
com.renesas.cdt.ddsc.threads.configurator/collapse/module.driver.uart_on_sci_uart.2044193823=false
16+
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#HAL\ Drivers\#\#all\#\#r_sci_uart\#\#\#\#3.5.0/all=3094200246,ra/fsp/src/r_sci_uart/r_sci_uart.c|1889256766,ra/fsp/inc/instances/r_sci_uart.h|3916852077,ra/fsp/inc/api/r_uart_api.h|1610456547,ra/fsp/inc/api/r_transfer_api.h
17+
com.renesas.cdt.ddsc.packs.componentfiles/Arm\#\#CMSIS\#\#CMSIS5\#\#CoreM\#\#\#\#5.8.0+renesas.0.fsp.3.5.0/libraries=
18+
com.renesas.cdt.ddsc.packs.componentfiles/Renesas\#\#HAL\ Drivers\#\#all\#\#r_ioport\#\#\#\#3.5.0/libraries=
19+
com.renesas.cdt.ddsc.packs.componentfiles/RECH\#\#BSP\#\#Board\#\#RA6M4_IoT\#\#\#\#3.5.0/libraries=

bsp/renesas/ra6m4-iot/Kconfig

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
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 "../.."
12+
13+
# you can change the RTT_ROOT default "../.." to your rtthread_root,
14+
# example : default "F:/git_repositories/rt-thread"
15+
16+
config PKGS_DIR
17+
string
18+
option env="PKGS_ROOT"
19+
default "packages"
20+
21+
config ENV_DIR
22+
string
23+
option env="ENV_ROOT"
24+
default "/"
25+
26+
source "$RTT_DIR/Kconfig"
27+
source "$PKGS_DIR/Kconfig"
28+
source "$BSP_DIR/drivers/Kconfig"
29+
30+
config SOC_FAMILY_RENESAS
31+
bool
32+
default y
33+
34+
config SOC_SERIES_R7FA6M4AF
35+
bool
36+
select ARCH_ARM_CORTEX_M4
37+
select SOC_FAMILY_RENESAS
38+
default y
Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
<?xml version="1.0" encoding="utf-8"?>
2+
<v1:pinSettings xmlns:v1="http://www.tasking.com/schema/pinsettings/v1.1">
3+
<v1:pinMappingsRef version="2.05" file="" />
4+
<v1:deviceSetting id="renesas.ra6m4_fp" pattern="R7FA6M4****FP">
5+
<v1:packageSetting id="renesas.100lqfp" />
6+
</v1:deviceSetting>
7+
<v1:configSetting configurationId="debug0.mode" altId="debug0.mode.jtag" />
8+
<v1:configSetting configurationId="p108.gpio_mode" altId="p108.gpio_mode.gpio_mode_peripheral" />
9+
<v1:configSetting configurationId="p108" altId="p108.debug0.tms">
10+
<v1:connectionSetting altId="debug0.tms.p108" />
11+
</v1:configSetting>
12+
<v1:configSetting configurationId="debug0.tms" altId="debug0.tms.p108">
13+
<v1:connectionSetting altId="p108.debug0.tms" />
14+
</v1:configSetting>
15+
<v1:configSetting configurationId="p109.gpio_mode" altId="p109.gpio_mode.gpio_mode_peripheral" />
16+
<v1:configSetting configurationId="p109" altId="p109.debug0.tdo">
17+
<v1:connectionSetting altId="debug0.tdo.p109" />
18+
</v1:configSetting>
19+
<v1:configSetting configurationId="debug0.tdo" altId="debug0.tdo.p109">
20+
<v1:connectionSetting altId="p109.debug0.tdo" />
21+
</v1:configSetting>
22+
<v1:configSetting configurationId="p110.gpio_mode" altId="p110.gpio_mode.gpio_mode_peripheral" />
23+
<v1:configSetting configurationId="p110" altId="p110.debug0.tdi">
24+
<v1:connectionSetting altId="debug0.tdi.p110" />
25+
</v1:configSetting>
26+
<v1:configSetting configurationId="debug0.tdi" altId="debug0.tdi.p110">
27+
<v1:connectionSetting altId="p110.debug0.tdi" />
28+
</v1:configSetting>
29+
<v1:configSetting configurationId="p300.gpio_mode" altId="p300.gpio_mode.gpio_mode_peripheral" />
30+
<v1:configSetting configurationId="p300" altId="p300.debug0.tck">
31+
<v1:connectionSetting altId="debug0.tck.p300" />
32+
</v1:configSetting>
33+
<v1:configSetting configurationId="debug0.tck" altId="debug0.tck.p300">
34+
<v1:connectionSetting altId="p300.debug0.tck" />
35+
</v1:configSetting>
36+
</v1:pinSettings>

bsp/renesas/ra6m4-iot/README.md

Lines changed: 183 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,183 @@
1+
# 瑞萨 IOT-RA6M4 开发板 BSP 说明
2+
3+
## 简介
4+
5+
本文档为瑞萨 IOT-RA6M4 开发板提供的 BSP (板级支持包) 说明。通过阅读快速上手章节开发者可以快速地上手该 BSP,将 RT-Thread 运行在开发板上。
6+
7+
主要内容如下:
8+
9+
- 开发板介绍
10+
- BSP 快速上手指南
11+
12+
## 开发板介绍
13+
14+
基于瑞萨 RA6M4 MCU 开发的 IOT-RA6M4 MCU 评估板,通过灵活配置软件包和 IDE,可帮助用户对 RA6M4 MCU 群组的特性轻松进行评估,并对嵌入系统应用程序进行开发。
15+
16+
该开发板常用 **板载资源** 如下:
17+
18+
- MCU:R7FA6M4AF3CFP,200MHz,Arm Cortex®-M33 内核,1MB 代码闪存, 256kB SRAM
19+
- 调试接口:板载 J-Link 接口
20+
- 扩展接口:两个 PMOD 连接器
21+
22+
## 外设支持
23+
24+
本 BSP 目前对外设的支持情况如下:
25+
26+
| **片上外设** | **支持情况** | **备注** |
27+
| :----------------: | :----------------: | :------------- |
28+
| UART | 支持 | UART6 为默认日志输出端口 |
29+
| GPIO | 支持 | |
30+
| IIC | 支持 | 软件 |
31+
| WDT | 支持 | |
32+
| RTC | 支持 | |
33+
| ADC | 支持 | |
34+
| DAC | 支持 | |
35+
| SPI | 支持 | |
36+
| FLASH | 支持 | |
37+
| PWM | 支持 | |
38+
| CAN | 支持 | |
39+
| 持续更新中... | | |
40+
| **外接外设** | **支持情况** | **备注** |
41+
| WiFi 模块 | 支持 | [RW007 WiFi 网络模块](https://github.com/RT-Thread-packages/rw007) |
42+
| 温湿度传感器 | 支持 | [HS300x 温湿度模块](https://github.com/Guozhanxin/hs300x) |
43+
| 室内空气质量传感器 | 支持 | [zmod4410 室内空气质量模块](https://github.com/ShermanShao/zmod4410) |
44+
45+
46+
## 使用说明
47+
48+
使用说明分为如下两个章节:
49+
50+
- 快速上手
51+
52+
本章节是为刚接触 RT-Thread 的新手准备的使用说明,遵循简单的步骤即可将 RT-Thread 操作系统运行在该开发板上,看到实验效果 。
53+
- 进阶使用
54+
55+
本章节是为需要在 RT-Thread 操作系统上使用更多开发板资源的开发者准备的。通过使用 ENV 工具对 BSP 进行配置,可以开启更多板载资源,实现更多高级功能。
56+
57+
### 快速上手
58+
59+
本 BSP 目前仅提供 MDK5 工程。下面以 MDK5 开发环境为例,介绍如何将系统运行起来。
60+
61+
**硬件连接**
62+
63+
使用 USB 数据线连接开发板到 PC,使用 J-link 接口下载和 DEBUG 程序。使用 USB 转串口工具连接 UART6:P305(TXD)、P304(RXD)。
64+
65+
**编译下载**
66+
67+
- 编译:双击 project.uvprojx 文件,打开 MDK5 工程,编译程序。
68+
69+
> 注意:此工程需要使用 J-Flash Lite 工具烧录程序。建议使用 V7.50 及以上版本烧录工程。[J-Link 下载链接](https://www.segger.com/downloads/jlink/)
70+
71+
- 下载:打开 J-Flash lite 工具,选择芯片型号 R7FA6M4AF,点击 OK 进入工具。选择 BSP 目录下 MDK 编译出的 /object/ra6m4.hex 文件,点击 Program Device 按钮开始烧录。具体操作过程可参考下图步骤:
72+
73+
![image-20211011181555421](docs/picture/jflash1.png)
74+
75+
![image-20211011182047981](docs/picture/jflash2.png)
76+
77+
![image-20211011182434519](docs/picture/jflash.png)
78+
79+
![image-20211011182949604](docs/picture/jflash3.png)
80+
81+
**查看运行结果**
82+
83+
下载程序成功之后,系统会自动运行并打印系统信息。
84+
85+
连接开发板对应串口到 PC , 在终端工具里打开相应的串口(115200-8-1-N),复位设备后,可以看到 RT-Thread 的输出信息。输入 help 命令可查看系统中支持的命令。
86+
87+
```bash
88+
\ | /
89+
- RT - Thread Operating System
90+
/ | \ 4.0.4 build Oct 11 2021
91+
2006 - 2021 Copyright by rt-thread team
92+
93+
Hello RT-Thread!
94+
msh >
95+
msh >help
96+
RT-Thread shell commands:
97+
reboot - Reboot System
98+
help - RT - Thread shell help.
99+
ps - List threads in the system.
100+
free - Show the memory usage in the system.
101+
hello - say hello world
102+
clear - clear the terminal screen
103+
version - show RT - Thread version information
104+
list_thread - list thread
105+
list_sem - list semaphore in system
106+
list_event - list event in system
107+
list_mutex - list mutex in system
108+
list_mailbox - list mail box in system
109+
list_msgqueue - list message queue in system
110+
list_timer - list timer in system
111+
list_device - list device in system
112+
list - list all commands in system
113+
114+
msh >
115+
```
116+
117+
**应用入口函数**
118+
119+
应用层的入口函数在 **bsp\renesas\ra6m4-iot\src\hal_emtry.c** 中 的 `void hal_entry(void)` 。用户编写的源文件可直接放在 src 目录下。
120+
121+
```c
122+
void hal_entry(void)
123+
{
124+
rt_kprintf("\nHello RT-Thread!\n");
125+
126+
while (1)
127+
{
128+
rt_pin_write(LED3_PIN, PIN_HIGH);
129+
rt_thread_mdelay(500);
130+
rt_pin_write(LED3_PIN, PIN_LOW);
131+
rt_thread_mdelay(500);
132+
}
133+
}
134+
```
135+
136+
### 进阶使用
137+
138+
**资料及文档**
139+
140+
- 开发板用户手册: \docs\开发板手册.docx
141+
- [瑞萨RA MCU 基础知识](https://www2.renesas.cn/cn/zh/document/gde/1520091)
142+
- [RA6 MCU 快速设计指南](https://www2.renesas.cn/cn/zh/document/apn/ra6-quick-design-guide)
143+
- [RA6M4_datasheet](https://www2.renesas.cn/cn/zh/document/dst/ra6m4-group-datasheet)
144+
- [RA6M4 Group User’s Manual: Hardware](https://www2.renesas.cn/cn/zh/document/man/ra6m4-group-user-s-manual-hardware)
145+
146+
**FSP 配置**
147+
148+
需要修改瑞萨的 BSP 外设配置或添加新的外设端口,需要用到瑞萨的 [FSP](https://www2.renesas.cn/jp/zh/software-tool/flexible-software-package-fsp#document) 配置工具。请务必按照如下步骤完成配置。配置中有任何问题可到[RT-Thread 社区论坛](https://club.rt-thread.org/)中提问。
149+
150+
1. [下载灵活配置软件包 (FSP) | Renesas](https://www.renesas.com/cn/zh/software-tool/flexible-software-package-fsp),请使用 FSP 3.5.0 版本
151+
2. 下载安装完成后,需要添加 IOT-RA6M4 开发板的官方板级支持包
152+
> 在 docs 目录下找到 **IOT-RA6M4 板级支持包:** Xiaoxiongpai_BSP_FSP3.5.0.rar
153+
3. 如何将 **”IOT-RA6M4 板级支持包“**添加到 FSP 中,请参考文档[如何导入板级支持包](https://www2.renesas.cn/document/ppt/1527171?language=zh&r=1527191)
154+
4. 请查看文档:[使用瑞萨 FSP 配置工具](./docs/使用瑞萨FSP配置工具.md)。在 MDK 中通过添加自定义命名来打开当前工程的 FSP 配置。
155+
156+
**ENV 配置**
157+
158+
- 如何使用 ENV 工具:[RT-Thread env 工具用户手册](https://www.rt-thread.org/document/site/#/development-tools/env/env)
159+
160+
此 BSP 默认只开启了 UART6 的功能,如果需使用更多高级功能例如组件、软件包等,需要利用 ENV 工具进行配置。
161+
162+
步骤如下:
163+
1. 在 bsp 下打开 env 工具。
164+
2. 输入`menuconfig`命令配置工程,配置好之后保存退出。
165+
3. 输入`pkgs --update`命令更新软件包。
166+
4. 输入`scons --target=mdk5` 命令重新生成工程。
167+
168+
169+
## FAQ
170+
171+
### 使用 MDK 的 DEBUG 时如果遇到提示 “Error: Flash Download failed Cortex-M33” 怎么办?
172+
173+
可按照下图操作,修改 Utilities 中的选项:
174+
175+
![image-20211214102231248](docs/picture/readme_faq1.png)
176+
177+
## 联系人信息
178+
179+
在使用过程中若您有任何的想法和建议,建议您通过以下方式来联系到我们 [RT-Thread 社区论坛](https://club.rt-thread.org/)
180+
181+
## 贡献代码
182+
183+
如果您对 IOT-RA6M4 感兴趣,并且有一些好玩的项目愿意与大家分享的话欢迎给我们贡献代码,您可以参考 [如何向 RT-Thread 代码贡献](https://www.rt-thread.org/document/site/#/rt-thread-version/rt-thread-standard/development-guide/github/github)。
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
2+
/*
3+
* Auto generated Run-Time-Environment Configuration File
4+
* *** Do not modify ! ***
5+
*
6+
* Project: 'project'
7+
* Target: 'Target 1'
8+
*/
9+
10+
#ifndef RTE_COMPONENTS_H
11+
#define RTE_COMPONENTS_H
12+
13+
14+
15+
#endif /* RTE_COMPONENTS_H */

bsp/renesas/ra6m4-iot/SConscript

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# for module compiling
2+
import os
3+
Import('RTT_ROOT')
4+
Import('rtconfig')
5+
from building import *
6+
7+
cwd = GetCurrentDir()
8+
src = []
9+
CPPPATH = []
10+
list = os.listdir(cwd)
11+
12+
if rtconfig.CROSS_TOOL == 'iar':
13+
print("\nThe current project does not support iar build\n")
14+
Return('group')
15+
elif rtconfig.CROSS_TOOL == 'gcc':
16+
CPPPATH = [cwd]
17+
src = Glob('./src/*.c')
18+
19+
group = DefineGroup('Applications', src, depend = [''], CPPPATH = CPPPATH)
20+
21+
for d in list:
22+
path = os.path.join(cwd, d)
23+
if os.path.isfile(os.path.join(path, 'SConscript')):
24+
group = group + SConscript(os.path.join(d, 'SConscript'))
25+
26+
Return('group')

bsp/renesas/ra6m4-iot/SConstruct

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
import os
2+
import sys
3+
import rtconfig
4+
5+
if os.getenv('RTT_ROOT'):
6+
RTT_ROOT = os.getenv('RTT_ROOT')
7+
else:
8+
RTT_ROOT = os.path.normpath(os.getcwd() + '/../../..')
9+
10+
sys.path = sys.path + [os.path.join(RTT_ROOT, 'tools')]
11+
try:
12+
from building import *
13+
except:
14+
print('Cannot found RT-Thread root directory, please check RTT_ROOT')
15+
print(RTT_ROOT)
16+
exit(-1)
17+
18+
TARGET = 'rtthread.' + rtconfig.TARGET_EXT
19+
20+
DefaultEnvironment(tools=[])
21+
env = Environment(tools = ['mingw'],
22+
AS = rtconfig.AS, ASFLAGS = rtconfig.AFLAGS,
23+
CC = rtconfig.CC, CCFLAGS = rtconfig.CFLAGS,
24+
AR = rtconfig.AR, ARFLAGS = '-rc',
25+
LINK = rtconfig.LINK, LINKFLAGS = rtconfig.LFLAGS)
26+
env.PrependENVPath('PATH', rtconfig.EXEC_PATH)
27+
28+
if rtconfig.PLATFORM == 'iar':
29+
env.Replace(CCCOM = ['$CC $CCFLAGS $CPPFLAGS $_CPPDEFFLAGS $_CPPINCFLAGS -o $TARGET $SOURCES'])
30+
env.Replace(ARFLAGS = [''])
31+
env.Replace(LINKCOM = env["LINKCOM"] + ' --map project.map')
32+
33+
Export('RTT_ROOT')
34+
Export('rtconfig')
35+
36+
# prepare building environment
37+
objs = PrepareBuilding(env, RTT_ROOT, has_libcpu=False)
38+
39+
# make a building
40+
DoBuilding(TARGET, objs)

0 commit comments

Comments
 (0)