Skip to content

boards: renesas: Add support for MCB-RX26T board #93638

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 6 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions boards/renesas/mcb_rx26t/Kconfig.mcb_rx26t
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2025 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0

config BOARD_MCB_RX26T
select SOC_R5F526TFDDFP
9 changes: 9 additions & 0 deletions boards/renesas/mcb_rx26t/board.cmake
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
# Copyright (c) 2025 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0

# options after "--tool-opt=" are directly passed to the tool. So instead of "--iface=JTAG" you could also write "--tool-opt=-if JTAG"
board_runner_args(jlink "--device=R5F526TF" "--iface=FINE" "--speed=1000" "--tool-opt=-jtagconf -1,-1 -autoconnect 1")
board_runner_args(rfp "--device=RX200" "--tool=e2l" "--interface=fine" "--erase")

include(${ZEPHYR_BASE}/boards/common/rfp.board.cmake)
include(${ZEPHYR_BASE}/boards/common/jlink.board.cmake)
5 changes: 5 additions & 0 deletions boards/renesas/mcb_rx26t/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
board:
name: mcb_rx26t
vendor: renesas
socs:
- name: r5f526tfddfp
156 changes: 156 additions & 0 deletions boards/renesas/mcb_rx26t/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,156 @@
.. zephyr:board:: mcb_rx26t

Overview
********

MCB-RX26T Type B is a CPU board for motor control evaluation. By using this product in combination with
an inverter board, motor control using RX26T can be easily performed.

**MCU Native Pin Access**

The MCB-RX26T Type B includes:

- CPU maximum operating frequency 120MHz, 32-bit RXv3 Core
- Package/Pin count: LFQFP/100 pin
- ROM/RAM: 512KB/48KB
- MCU input clock: 10MHz (Generate with external crystal oscillator)

**System Control and Debugging**

- Power supply: DC 5V,3.3V (selectable with jumper switch) Select one way automatically from the below

- USB-powered (debug port)
- External power supply via standard input

- Debugging support:

- Via E2lite debugger with E2OB (Onboard debugger circuit)

- Connector:

- Inverter board connector
- USB connector for E2 OB
- SCI connector for Renesas Motor Workbench communication
- Through hole for CAN communication
- Through hole for SPI communication
- PMOD connectors

- User LEDs and buttons:

- Four User LEDs
- Power LED indicating availability of regulated power
- One Reset button

Hardware
********
Detailed hardware features can be found at:

- RX26T MCU: `RX26T Group User's Manual Hardware`_
- MCB-RX26T Type B: `MCB-RX26T Type B - User's Manual`_

Note:
The CPU used in the RX26T is based on the RXv3 core. However, the current version of the Zephyr kernel
only supports the RXv1 core. Since the RXv3 core is backward-compatible with RXv1, it works with this version.
But the following limitations apply:

- FPU context saving is not supported. Do not use the FPU.
- Register bank save function is not supported. Do not use instructions for register bank save function.
- Accumulator register saving is not supported. Do not use DSP instructions or any libraries that include DSP instructions.

Supported Features
==================

.. zephyr:board-supported-hw::

Programming and Debugging
*************************

.. zephyr:board-supported-runners::

Applications for the ``mcb_rx26t`` board target configuration can be
built, flashed, and debugged as below.

Currently, the Zephyr SDK hasn't added support for RX builds yet, so the GCC for RX toolchain is required and build system
need to be set to use "cross-compile".

- Download and install GCC for RX v8.3.0.202405 toolchain:

https://llvm-gcc-renesas.com/rx-download-toolchains/

- Set env variable:

.. code-block:: console

export ZEPHYR_TOOLCHAIN_VARIANT=cross-compile
export CROSS_COMPILE=<Path to your toolchain>/bin/rx-elf-

- Build the Blinky Sample for MCB-RX26T Type B:

.. code-block:: console

cd ~/zephyrproject/zephyr
west build -p always -b mcb_rx26t samples/basic/blinky

Flashing
========

Program can be flashed to MCB-RX26T via e2lite E2OB (Onboard debugger circuit).

To flash the program to board

1. Connect from board's debug connector port to host PC using USB connector for E2 OB.

2. Execute west command

.. code-block:: console

west flash

Debugging
=========

You can use `Renesas Debug extension`_ on Visual Studio code for a visual debug interface.
The configuration for launch.json is as below.

.. code-block:: json

{
"version": "0.2.0",
"configurations": [
{
"type": "renesas-hardware",
"request": "launch",
"name": "Renesas GDB Hardware Debugging",
"target": {
"deviceFamily": "RX",
"device": "R5F526TF",
"debuggerType": "E2LITE",
"serverParameters": [
"-uUseFine=", "1",
"-w=", "1",
],
}
}
]
}


References
**********

- `MCB-RX26T Type B Website`_
- `RX26T MCU group Website`_

.. _MCB-RX26T Type B Website:
https://www.renesas.com/en/design-resources/boards-kits/mcb-rx26t-type-b

.. _RX26T MCU group Website:
https://www.renesas.com/en/products/microcontrollers-microprocessors/rx-32-bit-performance-efficiency-mcus/rx26t-32-bit-microcontroller-optimized-dual-motor-and-pfc-control
.. _MCB-RX26T Type B - User's Manual:
https://www.renesas.com/en/document/mat/mcb-rx26t-type-b-users-manual

.. _RX26T Group User's Manual Hardware:
https://www.renesas.com/en/document/mah/rx26t-group-users-manual-hardware

.. _Renesas Debug extension:
https://marketplace.visualstudio.com/items?itemName=RenesasElectronicsCorporation.renesas-debug
Binary file added boards/renesas/mcb_rx26t/doc/mcb_rx26t.webp
Binary file not shown.
14 changes: 14 additions & 0 deletions boards/renesas/mcb_rx26t/mcb_rx26t-pinctrl.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
/*
* Copyright (c) 2025 Renesas Electronics Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/

&pinctrl {
sci12_default: sci12_default {
group1 {
psels = <RX_PSEL(0x0C, 11, 5)>, /* TX - PB5 */
<RX_PSEL(0x0C, 11, 6)>; /* RX - PB6 */
};
};
};
91 changes: 91 additions & 0 deletions boards/renesas/mcb_rx26t/mcb_rx26t.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
/*
* Copyright (c) 2025 Renesas Electronics Corporation
*
* SPDX-License-Identifier: Apache-2.0
*/

/dts-v1/;

#include <renesas/r5f526tfddfp.dtsi>
#include <dt-bindings/gpio/gpio.h>
#include "mcb_rx26t-pinctrl.dtsi"

/ {
model = "Renesas MCB-RX26T KIT";
compatible = "renesas,mcb_rx26t","renesas,rxv3";

chosen {
zephyr,sram = &sram0;
zephyr,flash = &code_flash;
zephyr,console = &uart12;
zephyr,shell-uart = &uart12;
};

leds {
compatible = "gpio-leds";

led1: led1 {
gpios = <&ioport2 1 GPIO_ACTIVE_LOW>;
label = "LED1";
};

led2: led2 {
gpios = <&ioport2 0 GPIO_ACTIVE_LOW>;
label = "LED2";
};

led3: led3 {
gpios = <&ioport6 5 GPIO_ACTIVE_LOW>;
label = "LED3";
};

led4: led4 {
gpios = <&ioport6 4 GPIO_ACTIVE_LOW>;
label = "LED3";
};
};

aliases {
led0 = &led1;
led1 = &led2;
led2 = &led3;
led3 = &led4;
};
};

&xtal {
clock-frequency = <DT_FREQ_M(10)>;
mosel = <0>;
#clock-cells = <0>;
status = "okay";
};

&pll {
div = <1>;
mul = <RX_PLL_MUL_24>;
status = "okay";
};

&cmt {
clock-frequency = <60000000>;
status = "okay";
};

&ioport2 {
status = "okay";
};

&ioport6 {
status = "okay";
};

&sci12 {
pinctrl-0 = <&sci12_default>;
pinctrl-names = "default";
status = "okay";

uart12: uart {
current-speed = <115200>;
status = "okay";
};
};
15 changes: 15 additions & 0 deletions boards/renesas/mcb_rx26t/mcb_rx26t.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
# Copyright (c) 2025 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0

identifier: mcb_rx26t
name: Renesas MCB-RX26T
type: mcu
arch: rx
toolchain:
- rxgcc
supported:
- gpio
- serial
- timer
ram: 64
flash: 512
13 changes: 13 additions & 0 deletions boards/renesas/mcb_rx26t/mcb_rx26t_defconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2025 Renesas Electronics Corporation
# SPDX-License-Identifier: Apache-2.0

# Enable GPIO
CONFIG_GPIO=y

# Enable UART driver
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y

# Enable console
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y
Loading
Loading