Skip to content

Commit 88d0eb0

Browse files
authored
[bsp][renesas]add EK-RA2A1 support #10610
1 parent bac64ca commit 88d0eb0

File tree

174 files changed

+104872
-1
lines changed

Some content is hidden

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

174 files changed

+104872
-1
lines changed

.github/ALL_BSP_COMPILE.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -262,6 +262,7 @@
262262
"renesas/rzt2m_rsk",
263263
"renesas/rzn2l_rsk",
264264
"renesas/rzn2l_etherkit",
265+
"renesas/ra2a1-ek",
265266
"frdm-k64f",
266267
"xplorer4330/M4"
267268
]
@@ -501,4 +502,4 @@
501502
]
502503
}
503504
]
504-
}
505+
}

bsp/renesas/libraries/HAL_Drivers/config/drv_config.h

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
* Date Author Notes
88
* 2021-07-29 KyleChan first version
99
* 2022-12-7 Vandoul ADD ra4m2
10+
* 2025-08-17 CYFS ADD ra2a1
1011
*/
1112

1213
#ifndef __DRV_CONFIG_H__
@@ -203,6 +204,30 @@ extern "C"
203204
#endif
204205
#endif /* SOC_SERIES_R7FA6E2 */
205206

207+
#if defined(SOC_SERIES_R7FA2A1)
208+
#include "ra2a1/uart_config.h"
209+
210+
#ifdef BSP_USING_ADC
211+
#include "ra2a1/adc_config.h"
212+
#endif
213+
214+
#ifdef BSP_USING_DAC
215+
#include "ra2a1/dac_config.h"
216+
#endif
217+
218+
#ifdef BSP_USING_PWM
219+
#include "ra2a1/pwm_config.h"
220+
#endif
221+
222+
#ifdef BSP_USING_TIM
223+
#include "ra2a1/timer_config.h"
224+
#endif
225+
226+
#ifdef BSP_USING_CAN
227+
#include "ra2a1/can_config.h"
228+
#endif
229+
#endif /* SOC_SERIES_R7FA2A1 */
230+
206231
#ifdef __cplusplus
207232
}
208233
#endif
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Copyright (c) 2006-2025, RT-Thread Development Team
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2025-08-17 CYFS first version
9+
*/
10+
11+
#ifndef __ADC_CONFIG_H__
12+
#define __ADC_CONFIG_H__
13+
14+
#include <rtthread.h>
15+
#include <rtdevice.h>
16+
#include "hal_data.h"
17+
#ifdef __cplusplus
18+
extern "C" {
19+
#endif
20+
21+
#if defined(BSP_USING_ADC0) || defined(BSP_USING_ADC1)
22+
23+
struct rt_adc_dev
24+
{
25+
struct rt_adc_ops ops;
26+
struct rt_adc_device adc_device;
27+
};
28+
29+
struct ra_adc_map
30+
{
31+
const char *device_name;
32+
const adc_cfg_t *g_cfg;
33+
const adc_ctrl_t *g_ctrl;
34+
const adc_channel_cfg_t *g_channel_cfg;
35+
};
36+
#endif
37+
#endif
38+
39+
#ifdef __cplusplus
40+
}
41+
#endif
42+
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
/*
2+
* Copyright (c) 2006-2025, RT-Thread Development Team
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2025-08-17 CYFS first version
9+
*/
10+
11+
#ifndef __CAN_CONFIG_H__
12+
#define __CAN_CONFIG_H__
13+
14+
#include <rtthread.h>
15+
#include "hal_data.h"
16+
17+
#ifdef __cplusplus
18+
extern "C" {
19+
#endif
20+
21+
#if defined(BSP_USING_CAN0)
22+
#ifndef CAN0_CONFIG
23+
#define CAN0_CONFIG \
24+
{ \
25+
.name = "can0", \
26+
.num_of_mailboxs = CAN_NO_OF_MAILBOXES_g_can0, \
27+
.p_api_ctrl = &g_can0_ctrl, \
28+
.p_cfg = &g_can0_cfg, \
29+
}
30+
#endif /* CAN0_CONFIG */
31+
#endif /* BSP_USING_CAN0 */
32+
33+
#if defined(BSP_USING_CAN1)
34+
#ifndef CAN1_CONFIG
35+
#define CAN1_CONFIG \
36+
{ \
37+
.name = "can1", \
38+
.num_of_mailboxs = CAN_NO_OF_MAILBOXES_g_can1, \
39+
.p_api_ctrl = &g_can1_ctrl, \
40+
.p_cfg = &g_can1_cfg, \
41+
}
42+
#endif /* CAN1_CONFIG */
43+
#endif /* BSP_USING_CAN1 */
44+
45+
#ifdef __cplusplus
46+
}
47+
#endif
48+
#endif
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Copyright (c) 2006-2025, RT-Thread Development Team
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2025-08-17 CYFS first version
9+
*/
10+
11+
#ifndef __DAC_CONFIG_H__
12+
#define __DAC_CONFIG_H__
13+
14+
#include <rtthread.h>
15+
#include <rtdevice.h>
16+
#include "hal_data.h"
17+
#ifdef __cplusplus
18+
extern "C" {
19+
#endif
20+
21+
#ifdef BSP_USING_DAC
22+
struct ra_dac_map
23+
{
24+
char name;
25+
const struct st_dac_cfg *g_cfg;
26+
const struct st_dac_instance_ctrl *g_ctrl;
27+
};
28+
29+
struct ra_dac_dev
30+
{
31+
rt_dac_device_t ra_dac_device_t;
32+
struct ra_dac_map *ra_dac_map_dev;
33+
};
34+
#endif
35+
36+
#endif
37+
38+
#ifdef __cplusplus
39+
}
40+
#endif
41+
Lines changed: 68 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,68 @@
1+
/*
2+
* Copyright (c) 2006-2025, RT-Thread Development Team
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2025-08-17 CYFS first version
9+
*/
10+
#ifndef __PWM_CONFIG_H__
11+
#define __PWM_CONFIG_H__
12+
13+
#include <rtthread.h>
14+
#include <drv_config.h>
15+
#include "hal_data.h"
16+
17+
#ifdef __cplusplus
18+
extern "C" {
19+
#endif
20+
21+
enum
22+
{
23+
#ifdef BSP_USING_PWM0
24+
BSP_PWM0_INDEX,
25+
#endif
26+
#ifdef BSP_USING_PWM1
27+
BSP_PWM1_INDEX,
28+
#endif
29+
#ifdef BSP_USING_PWM2
30+
BSP_PWM2_INDEX,
31+
#endif
32+
#ifdef BSP_USING_PWM3
33+
BSP_PWM3_INDEX,
34+
#endif
35+
#ifdef BSP_USING_PWM4
36+
BSP_PWM4_INDEX,
37+
#endif
38+
#ifdef BSP_USING_PWM5
39+
BSP_PWM5_INDEX,
40+
#endif
41+
#ifdef BSP_USING_PWM6
42+
BSP_PWM6_INDEX,
43+
#endif
44+
#ifdef BSP_USING_PWM7
45+
BSP_PWM7_INDEX,
46+
#endif
47+
#ifdef BSP_USING_PWM8
48+
BSP_PWM8_INDEX,
49+
#endif
50+
#ifdef BSP_USING_PWM9
51+
BSP_PWM9_INDEX,
52+
#endif
53+
BSP_PWMS_NUM
54+
};
55+
56+
#define PWM_DRV_INITIALIZER(num) \
57+
{ \
58+
.name = "pwm"#num , \
59+
.g_cfg = &g_timer##num##_cfg, \
60+
.g_ctrl = &g_timer##num##_ctrl, \
61+
.g_timer = &g_timer##num, \
62+
}
63+
64+
#ifdef __cplusplus
65+
}
66+
#endif
67+
68+
#endif /* __PWM_CONFIG_H__ */
Lines changed: 58 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,58 @@
1+
/*
2+
* Copyright (c) 2006-2025, RT-Thread Development Team
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*
6+
* Change Logs:
7+
* Date Author Notes
8+
* 2025-08-17 CYFS first version
9+
*/
10+
11+
#ifndef __UART_CONFIG_H__
12+
#define __UART_CONFIG_H__
13+
14+
#include <rtthread.h>
15+
#include "hal_data.h"
16+
17+
#ifdef __cplusplus
18+
extern "C" {
19+
#endif
20+
21+
#if defined(BSP_USING_UART0)
22+
#ifndef UART0_CONFIG
23+
#define UART0_CONFIG \
24+
{ \
25+
.name = "uart0", \
26+
.p_api_ctrl = &g_uart0_ctrl, \
27+
.p_cfg = &g_uart0_cfg, \
28+
}
29+
#endif /* UART0_CONFIG */
30+
#endif /* BSP_USING_UART0 */
31+
32+
#if defined(BSP_USING_UART1)
33+
#ifndef UART1_CONFIG
34+
#define UART1_CONFIG \
35+
{ \
36+
.name = "uart1", \
37+
.p_api_ctrl = &g_uart1_ctrl, \
38+
.p_cfg = &g_uart1_cfg, \
39+
}
40+
#endif /* UART1_CONFIG */
41+
#endif /* BSP_USING_UART1 */
42+
43+
#if defined(BSP_USING_UART9)
44+
#ifndef UART9_CONFIG
45+
#define UART9_CONFIG \
46+
{ \
47+
.name = "uart9", \
48+
.p_api_ctrl = &g_uart9_ctrl, \
49+
.p_cfg = &g_uart9_cfg, \
50+
}
51+
#endif /* UART9_CONFIG */
52+
#endif /* BSP_USING_UART9 */
53+
54+
#ifdef __cplusplus
55+
}
56+
#endif
57+
58+
#endif

bsp/renesas/libraries/Kconfig

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,4 +59,10 @@ config SOC_SERIES_R7FA6E2
5959
bool
6060
select ARCH_ARM_CORTEX_M33
6161
select SOC_FAMILY_RENESAS_RA
62+
default n
63+
64+
config SOC_SERIES_R7FA2A1
65+
bool
66+
select ARCH_ARM_CORTEX_M23
67+
select SOC_FAMILY_RENESAS_RA
6268
default n

bsp/renesas/ra2a1-ek/.api_xml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
2+
<ddscApi/>

0 commit comments

Comments
 (0)