Skip to content

Commit 92c5da8

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

File tree

9 files changed

+285
-0
lines changed

9 files changed

+285
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2024 Renesas Electronics Corporation
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config BOARD_FPB_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/fpb_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: fpb_rx140
3+
full_name: Fast Prototyping Board for RX140
4+
vendor: renesas
5+
socs:
6+
- name: r5f51406
87.7 KB
Loading
Lines changed: 148 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,148 @@
1+
.. zephyr:board:: fpb_rx140
2+
3+
Overview
4+
********
5+
6+
The Fast Prototyping Board for RX140 MCU Group comes equipped with an RX140 MCU
7+
(R5F51406BGFN). The board is inexpensive for RX140 evaluation and prototype development of
8+
various applications. It has an emulator circuit so you can write/debug programs just by
9+
connecting it to a PC with a USB cable. In addition, it has high expandability with Arduino Uno
10+
and two Pmod™ connectors as standard, and through-hole access to all pins of the
11+
microcontroller.
12+
13+
**MCU Native Pin Access**
14+
15+
- R5F51406ADFN MCU
16+
17+
- Max 48MHz, 32-bit RXv2 core (RXv2)
18+
- 256 KB Flash, 64 KB RAM
19+
- 80-pin, LFQFP package
20+
21+
- Native pin access through 2 x 40-pin male headers (not fitted)
22+
- RX MCU current measurement point for precision current consumption measurement
23+
- RX MCU on-chip oscillators as main clock
24+
- Providing 32.768 kHz crystal oscillator as sub clock
25+
26+
**System Control and Ecosystem Access**
27+
28+
- Two 5 V input sources
29+
30+
- USB
31+
- External power supply (using 2-pin header [not fitted])
32+
33+
- On-board debugger / programmer (E2 emulator On Board (referred as E2OB, FINE Interface))
34+
35+
- User LEDs and switches
36+
37+
- Two User LEDs (green)
38+
- Power LED (green) indicating availability of regulated power
39+
- Debug LED (yellow) indicating the debug connection
40+
- One User switch
41+
- One Reset switch
42+
43+
- Two popular ecosystem expansions
44+
45+
- Two Digilent PmodTM
46+
- Arduino® (Uno R3) connector
47+
48+
Hardware
49+
********
50+
Detailed hardware features can be found at:
51+
52+
- RX140 MCU: `RX140 Group User's Manual Hardware`_
53+
- FPB-RX140: `FPB_RX140 - User's Manual`_
54+
55+
Supported Features
56+
==================
57+
58+
.. zephyr:board-supported-hw::
59+
60+
Programming and Debugging
61+
*************************
62+
63+
.. zephyr:board-supported-runners::
64+
65+
Applications for the ``fpb_rx140`` board can be built, flashed, and debugged using standard
66+
Zephyr workflows. Refer to :ref:`build_an_application` and :ref:`application_run` for more details.
67+
68+
**Note:** Currently, the RX140 is built and programmed using the Renesas GCC RX toolchain.
69+
Please follow the steps below to program it onto the board:
70+
71+
- Download and install GCC for RX toolchain:
72+
73+
https://llvm-gcc-renesas.com/rx-download-toolchains/
74+
75+
- Set env variable:
76+
77+
.. code-block:: console
78+
79+
export ZEPHYR_TOOLCHAIN_VARIANT=cross-compile
80+
export CROSS_COMPILE=<Path/to/your/toolchain>/bin/rx-elf-
81+
82+
- Build the Blinky Sample for FPB-RX140
83+
84+
.. code-block:: console
85+
86+
cd ~/zephyrproject/zephyr
87+
west build -p always -b fpb_rx140 samples/basic/blinky
88+
89+
Flashing
90+
========
91+
92+
The program can be flashed to RSK-RX140 using the **E2OB** by connecting the board to the host PC
93+
and open Jumper J4.
94+
Here’s an example for building and flashing the :zephyr:code-sample:`hello_world` application.
95+
96+
.. zephyr-app-commands::
97+
:zephyr-app: samples/hello_world
98+
:board: rsk_rx140
99+
:goals: build flash
100+
101+
Debugging
102+
=========
103+
104+
You can use `Renesas Debug extension`_ on Visual Studio Code for a visual debug interface.
105+
The configuration for launch.json is as below.
106+
107+
.. code-block:: json
108+
109+
{
110+
"version": "0.2.0",
111+
"configurations": [
112+
{
113+
"type": "renesas-hardware",
114+
"request": "launch",
115+
"name": "RX140 Renesas Debugging E2lite",
116+
"target": {
117+
"deviceFamily": "RX",
118+
"device": "R5F51406",
119+
"debuggerType": "E2LITE"
120+
"serverParameters": [
121+
"-uUseFine=", "1",
122+
"-w=", "0",
123+
],
124+
}
125+
}
126+
]
127+
}
128+
129+
References
130+
**********
131+
132+
- `FPB_RX140 Website`_
133+
- `RX140 MCU group Website`_
134+
135+
.. _FPB_RX140 Website:
136+
https://www.renesas.com/en/design-resources/boards-kits/fpb-rx140
137+
138+
.. _RX140 MCU group Website:
139+
https://www.renesas.com/en/products/rx140
140+
141+
.. _FPB_RX140 - User's Manual:
142+
https://www.renesas.com/en/document/mat/fpb-rx140-v1-users-manual
143+
144+
.. _RX140 Group User's Manual Hardware:
145+
https://www.renesas.com/en/document/mah/rx140-group-users-manual-hardware-rev120
146+
147+
.. _Renesas Debug extension:
148+
https://marketplace.visualstudio.com/items?itemName=RenesasElectronicsCorporation.renesas-debug
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+
sci5_default: sci5_default {
9+
group1 {
10+
psels = <RX_PSEL(RX_PSEL_SCI_5, 10, 4)>, /* TX */
11+
<RX_PSEL(RX_PSEL_SCI_5, 10, 3)>; /* RX */
12+
};
13+
};
14+
};
Lines changed: 75 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,75 @@
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 "fpb_rx140-pinctrl.dtsi"
12+
13+
/ {
14+
model = "Renesas FPB+RX140 KIT";
15+
compatible = "renesas,fpb_rx140";
16+
17+
chosen {
18+
zephyr,sram = &sram0;
19+
zephyr,flash = &code_flash;
20+
zephyr,flash-controller = &flash;
21+
zephyr,console = &uart5;
22+
zephyr,shell-uart = &uart5;
23+
};
24+
25+
leds {
26+
compatible = "gpio-leds";
27+
28+
led1: led1 {
29+
gpios = <&ioport2 0 GPIO_ACTIVE_LOW>;
30+
label = "LED1";
31+
};
32+
33+
led2: led2 {
34+
gpios = <&ioport3 2 GPIO_ACTIVE_LOW>;
35+
label = "LED2";
36+
};
37+
};
38+
39+
aliases {
40+
led0 = &led1;
41+
led1 = &led2;
42+
};
43+
};
44+
45+
&subclk {
46+
status = "okay";
47+
};
48+
49+
&pclkblock {
50+
clocks = <&hoco>;
51+
};
52+
53+
&cmt {
54+
clock-frequency = <3000000>;
55+
status = "okay";
56+
};
57+
58+
&ioport2 {
59+
status = "okay";
60+
};
61+
62+
&ioport3 {
63+
status = "okay";
64+
};
65+
66+
&sci5 {
67+
pinctrl-0 = <&sci5_default>;
68+
pinctrl-names = "default";
69+
status = "okay";
70+
71+
uart5: uart {
72+
current-speed = <115200>;
73+
status = "okay";
74+
};
75+
};
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: fpb_rx140
5+
name: Fast Prototyping Board 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)