Skip to content

Commit 7255b92

Browse files
Hau Hoquytranpzz
authored andcommitted
boards: renesas: Initial support for RSK-RX140 board
Initial commit to support for RSK-RX140 board Signed-off-by: Hau Ho <[email protected]>
1 parent 92c5da8 commit 7255b92

File tree

9 files changed

+295
-0
lines changed

9 files changed

+295
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_RSK_RX140
5+
select SOC_R5F51406
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
# Copyright (c) 2025 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# options after "--tool-opt=" are directly passed to the tool. So instead of "--iface=JTAG" you could also write "--tool-opt=-if JTAG"
5+
board_runner_args(jlink "--device=R5F51406" "--iface=FINE" "--speed=1000" "--tool-opt=-jtagconf -1,-1 -autoconnect 1")
6+
board_runner_args(rfp "--device=RX100" "--tool=e2l" "--interface=fine" "--erase")
7+
8+
include(${ZEPHYR_BASE}/boards/common/rfp.board.cmake)
9+
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)

boards/renesas/rsk_rx140/board.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
board:
2+
name: rsk_rx140
3+
full_name: Renesas Starter Kit for RX140
4+
vendor: renesas
5+
socs:
6+
- name: r5f51406
Lines changed: 151 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,151 @@
1+
.. zephyr:board:: rsk_rx140
2+
3+
Overview
4+
********
5+
6+
The Renesas Starter Kit for RX140 is an evaluation and starter kit for developers who are new
7+
to the RX140 MCU family (Program Flash 256KB, RAM 64KB, Pin Count 80-pin).
8+
The kit includes an LCD display module and an on-chip debugging emulator
9+
10+
**MCU Native Pin Access**
11+
12+
The RSK-RX140 includes:
13+
14+
- 48-MHz, 32-bit RX140 MCU (R5F51406BDFN, 80-pin LFQFP package)
15+
- Direct MCU pin access through standard headers for easy peripheral integration
16+
- On-board 8 MHz crystal, 32.768 kHz sub-clock, and internal oscillators
17+
- Multiple low power consumption modes
18+
19+
**System Control and Debugging**
20+
21+
- USB Mini-B connector for serial communication (via on-board RL78/G1C USB-to-Serial MCU)
22+
- Power source options:
23+
24+
- USB-powered
25+
- External DC supply (5V input jack)
26+
- Debugger supply (E2 Lite)
27+
28+
- Debugging support:
29+
30+
- Via E2 Lite debugger (14-pin connector)
31+
32+
- User LEDs and buttons:
33+
34+
- Four User LEDs (green, orange, red x2)
35+
- Power LED (green)
36+
- One Reset button, three User buttons
37+
- One potentiometer (connected to ADC input)
38+
39+
- Ecosystem expansions:
40+
41+
- Two Digilent Pmod connectors (LCD and Spare)
42+
- On-board 2Kbit I2C EEPROM
43+
44+
**Special Feature Access**
45+
46+
- Capacitive touch sensing (slider x1, buttons x2)
47+
- CAN and LIN transceivers
48+
- IEC60730 compliance support
49+
- Security functions (built-in Trusted Secure IP)
50+
51+
Hardware
52+
********
53+
Detailed hardware features can be found at:
54+
55+
- RX140 MCU: `RX140 Group User's Manual Hardware`_
56+
- RSK-RX140: `RSK_RX140 - User's Manual`_
57+
58+
Supported Features
59+
==================
60+
61+
.. zephyr:board-supported-hw::
62+
63+
Programming and Debugging
64+
*************************
65+
66+
.. zephyr:board-supported-runners::
67+
68+
Applications for the ``rsk_rx140`` board can be built, flashed, and debugged using standard
69+
Zephyr workflows. Refer to :ref:`build_an_application` and :ref:`application_run` for more details.
70+
71+
**Note:** Currently, the RX140 is built and programmed using the Renesas GCC RX toolchain.
72+
Please follow the steps below to program it onto the board:
73+
74+
- Download and install GCC for RX toolchain:
75+
76+
https://llvm-gcc-renesas.com/rx-download-toolchains/
77+
78+
- Set env variable:
79+
80+
.. code-block:: console
81+
82+
export ZEPHYR_TOOLCHAIN_VARIANT=cross-compile
83+
export CROSS_COMPILE=<Path/to/your/toolchain>/bin/rx-elf-
84+
85+
- Build the Blinky Sample for RSK-RX140
86+
87+
.. code-block:: console
88+
89+
cd ~/zephyrproject/zephyr
90+
west build -p always -b rsk_rx140 samples/basic/blinky
91+
92+
Flashing
93+
========
94+
95+
The program can be flashed to RSK-RX140 using the **E2 Lite debugger** by
96+
connecting the board's 14-pin debug connector to the host PC.
97+
Here’s an example for building and flashing the :zephyr:code-sample:`hello_world` application.
98+
99+
.. zephyr-app-commands::
100+
:zephyr-app: samples/hello_world
101+
:board: rsk_rx140
102+
:goals: build flash
103+
104+
Debugging
105+
=========
106+
107+
You can use `Renesas Debug extension`_ on Visual Studio Code for a visual debug interface.
108+
The configuration for launch.json is as below.
109+
110+
.. code-block:: json
111+
112+
{
113+
"version": "0.2.0",
114+
"configurations": [
115+
{
116+
"type": "renesas-hardware",
117+
"request": "launch",
118+
"name": "RX140 Renesas Debugging E2lite",
119+
"target": {
120+
"deviceFamily": "RX",
121+
"device": "R5F51406",
122+
"debuggerType": "E2LITE"
123+
"serverParameters": [
124+
"-uUseFine=", "1",
125+
"-w=", "0",
126+
],
127+
}
128+
}
129+
]
130+
}
131+
132+
References
133+
**********
134+
135+
- `RSK_RX140 Website`_
136+
- `RX140 MCU group Website`_
137+
138+
.. _RSK_RX140 Website:
139+
https://www.renesas.com/en/design-resources/boards-kits/rsk-rx140
140+
141+
.. _RX140 MCU group Website:
142+
https://www.renesas.com/en/products/rx140
143+
144+
.. _RSK_RX140 - User's Manual:
145+
https://www.renesas.com/en/document/mat/renesas-starter-kit-rx140-users-manual
146+
147+
.. _RX140 Group User's Manual Hardware:
148+
https://www.renesas.com/en/document/mah/rx140-group-users-manual-hardware-rev120
149+
150+
.. _Renesas Debug extension:
151+
https://marketplace.visualstudio.com/items?itemName=RenesasElectronicsCorporation.renesas-debug
77.5 KB
Loading
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
/*
2+
* Copyright (c) 2025 Renesas Electronics Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&pinctrl {
8+
sci1_default: sci1_default {
9+
group1 {
10+
psels = <RX_PSEL(RX_PSEL_SCI_1, 2, 6)>, /* TX */
11+
<RX_PSEL(RX_PSEL_SCI_1, 3, 0)>; /* RX */
12+
};
13+
};
14+
};
Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
/*
2+
* Copyright (c) 2025 Renesas Electronics Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/dts-v1/;
8+
9+
#include <renesas/r5f51406.dtsi>
10+
#include <dt-bindings/gpio/gpio.h>
11+
#include "rsk_rx140-pinctrl.dtsi"
12+
13+
/ {
14+
model = "Renesas RSK+RX140 KIT";
15+
compatible = "renesas,rsk_rx140";
16+
17+
chosen {
18+
zephyr,sram = &sram0;
19+
zephyr,flash = &code_flash;
20+
zephyr,flash-controller = &flash;
21+
zephyr,console = &uart1;
22+
zephyr,shell-uart = &uart1;
23+
};
24+
25+
leds {
26+
compatible = "gpio-leds";
27+
28+
led1: led1 {
29+
gpios = <&ioport0 4 GPIO_ACTIVE_LOW>;
30+
label = "LED1";
31+
};
32+
33+
led3: led3 {
34+
gpios = <&ioport0 7 GPIO_ACTIVE_LOW>;
35+
label = "LED3";
36+
};
37+
};
38+
39+
aliases {
40+
led0 = &led1;
41+
led1 = &led3;
42+
};
43+
};
44+
45+
&xtal {
46+
clock-frequency = <DT_FREQ_M(8)>;
47+
mosel = <0>;
48+
#clock-cells = <0>;
49+
status = "okay";
50+
};
51+
52+
&subclk {
53+
status = "okay";
54+
};
55+
56+
&pll {
57+
status = "okay";
58+
};
59+
60+
&cmt {
61+
clock-frequency = <3000000>;
62+
status = "okay";
63+
};
64+
65+
&ioport0 {
66+
status = "okay";
67+
};
68+
69+
&ioport3 {
70+
status = "okay";
71+
};
72+
73+
&sci1 {
74+
pinctrl-0 = <&sci1_default>;
75+
pinctrl-names = "default";
76+
status = "okay";
77+
78+
uart1: uart {
79+
current-speed = <115200>;
80+
status = "okay";
81+
};
82+
};
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
# Copyright (c) 2025 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
identifier: rsk_rx140
5+
name: Renesas Starter Kit for RX140
6+
type: mcu
7+
arch: rx
8+
toolchain:
9+
- cross-compile
10+
supported:
11+
- gpio
12+
- serial
13+
- timer
14+
ram: 64
15+
flash: 256
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
# Copyright (c) 2025 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
# Enable GPIO
5+
CONFIG_GPIO=y
6+
7+
# Enable UART driver
8+
CONFIG_SERIAL=y
9+
CONFIG_UART_INTERRUPT_DRIVEN=y
10+
11+
# Enable console
12+
CONFIG_CONSOLE=y
13+
CONFIG_UART_CONSOLE=y

0 commit comments

Comments
 (0)