-
Notifications
You must be signed in to change notification settings - Fork 2
Home
Welcome to the zephyr wiki!
-
Project Overview
Zephyr project for Renesas RA MCU & RZ MPU devices. It requires hal_renesas module: https://github.com/renesas/hal_renesas for operation.
To get started with Zephyr, visit website at https://www.zephyrproject.org/ and explore the documentation and tutorials.
-
Support Renesas RA MCU & RZ MPU Devices & Drivers
Support: Available on "main" branch
Support(1): Available on "wip*" branches
Devices | Kernel porting | GPIO | UART | I2C (Master) | SPI | Flash | System Timer | System Power Management | Clock control | DTC | TRNG (Entropy) | CAN | Flash (OSPI) | SDHC | Flash (QSPI) | ADC | PWM | Counter | USB-FS (Device) | USB-FS (Host) | USB-HS (Device) | USB-HS (Host) | MIPI-DSI | Ethernet | IPM | DAC |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
EK-RA8M1 | - | Support | Support - SCI-B-UART | Support - IIC Master | Support - SPI-B | Support - Flash_hp | Support(1) - ULPT | Support(1) - LPM | Support - CGC | Support | Support | Support - CAN_FD | Support(1) | Support - SDHI | - | Support | Support - GPT | Support - AGT | Support(1) | Planning | Support(1) | Support(1) | - | Support | - | Support |
EK-RA8D1 | - | Support | Support - SCI-B-UART | Support - IIC Master | Support - SPI-B | Support - Flash_hp | Support(1) - ULPT | Support(1) - LPM | Support - CGC | Support | Support | Support - CAN_FD | Support(1) | Support - SDHI | - | Support | Support - GPT | Support - AGT | Support(1) | Planning | Support(1) | Support(1) | Support | Support | - | Support |
MCK-RA8T1 | - | Support | Support - SCI-B-UART | Support - IIC Master | Support - SPI-B | Support - Flash_hp | Support(1) - ULPT | Support(1) - LPM | Support - CGC | Support | Support | Support - CAN_FD | - | Support - SDHI | - | Support | Support - GPT | Support - AGT | Support(1) | Planning | - | - | - | Support | - | Support |
EK-RA6M1 | - | Support | Support - SCI-UART | Support - IIC Master | Support - SPI | Support - Flash_hp | Planning - AGT | Planning - LPM | Support - CGC | Support | Support | Planning | - | Planning | - | Support | Support - GPT | Support - AGT | Support(1) | - | - | - | - | - | - | Support |
EK-RA6M2 | - | Support | Support - SCI-UART | Support - IIC Master | Support - SPI | Support - Flash_hp | Planning - AGT | Planning - LPM | Support - CGC | Support | Support | Planning | - | Planning | - | Support | Support - GPT | Support - AGT | Support(1) | - | - | - | - | - | - | Support |
EK-RA6M3 | - | Support | Support - SCI-UART | Support - IIC Master | Support - SPI | Support - Flash_hp | Planning - AGT | Planning - LPM | Support - CGC | Support | Support | Planning | - | Planning | Support(1) | Support | Support - GPT | Support - AGT | Support(1) | Planning | Support(1) | Support(1) | - | Planning | - | Support |
EK-RA6M4 | - | Support | Support - SCI-UART | Support - IIC Master | Support - SPI | Support - Flash_hp | Planning - AGT | Planning - LPM | Support - CGC | Support | Support | Planning | Planning | Planning | Support(1) | Support | Support - GPT | Support - AGT | Support(1) | Planning | - | - | - | Planning | - | Support |
EK-RA6M5 | - | Support | Support - SCI-UART | Support - IIC Master | Support - SPI | Support - Flash_hp | Planning - AGT | Planning - LPM | Support - CGC | Support | Support | Planning | Planning | Planning | Support(1) | Support | Support - GPT | Support - AGT | Support(1) | Planning | Support(1) | Support(1) | - | Planning | - | Support |
EK-RA6E2 | - | Support | Support - SCI-UART | - | Support - SPI | Support - Flash_hp | Planning - AGTW | Planning - LPM | Support - CGC | Support | Support | Support - CAN_FD | - | - | Support(1) | Support | Support - GPT | Planning | Planning | - | - | - | - | - | - | Support |
FPB-RA6E2 | - | Support | Support - SCI-UART | - | Support - SPI | Support - Flash_hp | Planning - AGTW | Planning - LPM | Support - CGC | Support | Support | - | - | - | - | Support | Support - GPT | Planning | - | - | - | - | - | - | - | Support |
FPB-RA6E1 | - | Support | Support - SCI-UART | Support - IIC Master | Support - SPI | Support - Flash_hp | Planning - AGT | Planning - LPM | Support - CGC | Support | Support | Planning | - | Planning | - | Support | Support - GPT | Support - AGT | - | - | - | - | - | - | - | Support |
EK-RA4E2 | - | Support | Support - SCI-UART | - | Support - SPI | Support - Flash_hp | Planning - AGTW | Planning - LPM | Support - CGC | Support | Support | Support - CAN_FD | - | - | - | Support | Support - GPT | Planning | Planning | - | - | - | - | - | - | Support |
FPB-RA4E1 | - | Support | Support - SCI-UART | Support - IIC Master | Support - SPI | Support - Flash_hp | Planning - AGT | Planning - LPM | Support - CGC | Support | Support | Planning | - | - | - | Support | Support - GPT | Support - AGT | - | - | - | - | - | - | - | Planning |
VOICE-RA4E1 | - | Support | Support - SCI-UART | - | - | Support - Flash_hp | Planning - AGT | Planning - LPM | Support - CGC | Support | Support | Planning | - | - | Planning | - | Support - GPT | Support - AGT | Support(1) | - | - | - | - | - | - | Planning |
EK-RA4M2 | - | Support | Support - SCI-UART | Support - IIC Master | Support - SPI | Support - Flash_hp | Planning - AGT | Planning - LPM | Support - CGC | Support | Support | Planning | - | Planning | Planning | Support | Support - GPT | Support - AGT | Support(1) | Planning | - | - | - | - | - | Support |
EK-RA4M3 | - | Support | Support - SCI-UART | Support - IIC Master | Support - SPI | Support - Flash_hp | Planning - AGT | Planning - LPM | Support - CGC | Support | Support | Planning | - | Planning | Planning | Support | Support - GPT | Support - AGT | Support(1) | Planning | - | - | - | - | - | Support |
EK-RA4L1 | - | Support(1) | Support(1) - SCI-UART | Support(1) - IIC Master | Support(1) - SPI | Planning - Flash_hp | Planning - AGTW | Planning - LPM | Support(1) - CGC | Support(1) | Planning | Support(1) - CAN_FD | - | - | Planning | Support(1) | Support(1) - GPT | Planning | Planning | Planning | - | - | - | - | - | Planning |
EK-RA4W1 | - | Support | Support - SCI-UART | Support - IIC Master | Support - SPI | Planning | Planning - AGT | Planning - LPM | Support - CGC | Support | Support | Planning | - | - | - | Support | Support - GPT | Support - AGT | - | - | - | - | - | - | - | Planning |
EK-RA4M1 | - | Support(1) | Support(1) - SCI-UART | Planning - IIC Master | Support(1) - SPI | Planning | Planning - AGT | Planning - LPM | Support(1) - CGC | Support(1) | Planning | Planning | - | - | - | Planning | Planning | Support(1) - AGT | Planning | - | - | - | - | - | - | Planning |
EK-RA2A1 | - | Support | Support - SCI-UART | Support - IIC Master | Support - SPI | Planning | Planning - AGT | Planning - LPM | Support - CGC | Planning | Support | Planning | - | - | - | Planning | Support - GPT | Support - AGT | Planning | - | - | - | - | - | - | Support |
EK-RA2L1 | - | Planning | Planning - SCI-UART | Planning - IIC Master | Planning | Planning | Planning - AGT | Planning - LPM | Planning - CGC | Planning | Planning | Planning | - | - | - | Planning | Planning | Planning | - | - | - | - | - | - | - | Planning |
RZ/G3S_SMARC | - | Planning | Planning - SCIF-UART | Planning - IIC Master | Planning - SPI | - | Planning - GTM | - | Planning - CPG | - | - | Planning - CAN_FD | - | Planning | Planning | Planning | Planning - GPT | Planning - GTM | Planning | Planning | Planning | Planning | - | Planning | Planning - MHU | Planning |
RSKRX130 | Support(1) | Support(1) | Support(1) | Planning - IIC Master | Planning | Planning | Support(1) | Planning | Support(1) | Planning | - | - | - | - | - | Planning | Planning | - | - | - | - | - | - | - | - | Planning |
- Repository branches information
Branch name | Information |
---|---|
ra8-support-PR1.3-ethernet | Same feature as ra8-support-PR1.3-integrated with addtional ethernet driver support |
ra8-support-PR1.3-integrated | Support RA8 devices and drivers described in Support RA MCU Devices & Drivers Jul 31: - Restructure with ra8-support-1.2 after it merged into zephyrproject-rtos - Add support for I2C driver (master) - Fix SPI bitbang's issue in EK_RA8D1 and MCK_RA8T1 |
ra8-support-PR1.3 | Zephyr RTOS upstream branch Jul 31: - Add basic support for EK-RA8D1 and MCK-RA8T1 boards |
ra8-support-1.2 | Support EK_RA8M1 and UART only - Merged with zephyrproject-rtos/zephyr |
wip_ra | Work in progress for RA platforms. Contain latest supports for RA platforms. It included modules under review in Pull Request (PR). |
rzg3s-support-1.1 | Support RZG3S-SMARC with GPIO and UART only |
upstream/rx_zephyr_support_PR1.1 | Upstream branch, basic support for RX architecture: + Support for Renesas RX architecture on Zephyr + RX130 SoC and RSKRX130 board support for RX SoC + Serial interface driver support (SCI UART) + Pinctrl driver support for RX SoC + GPIO driver support for RX SoC + Clock control driver support for RX SoC |
wip/rx_support_alpha1.2 | New feature update for RSKRX130 board: + Add 64-bit system timer feature + Add tickless capable system timer + Support I2C driver (Master mode) for RX SoC + Support SPI driver for RX SoC + Support PWM driver for RX SoC + Add support external interrupt configuration feature for GPIO for RX SoC |
- Getting Started:
This getting started guide for Ubuntu environment (20.04 LTS).
For Windows environment, please refer to Getting started guide for Windows environment
For other environments, please visit Zephyr Getting Started
-
Install dependencies
wget https://apt.kitware.com/kitware-archive.sh
sudo bash kitware-archive.sh
sudo apt install --no-install-recommends git cmake ninja-build gperf ccache dfu-util device-tree-compiler wget python3-dev python3-pip python3-setuptools python3-tk python3-wheel xz-utils file make gcc gcc-multilib g++-multilib libsdl2-dev libmagic1
Verify the versions of the main dependencies installed on your system
cmake --version
python3 --version
dtc --version
Tools Min. Version CMake 3.20.5 Python 3.10 Devicetree compiler 1.4.6 -
Get Zephyr and install Python dependencies
-
Install west, and make sure ~/.local/bin is on your PATH environment variable:
pip3 install --user -U west
echo 'export PATH=~/.local/bin:"$PATH"' >> ~/.bashrc
source ~/.bashrc
-
Get the Zephyr source code
west init -m https://github.com/renesas/zephyr.git --mr wip_ra ~/zephyrproject
cd ~/zephyrproject
west update
-
Export a Zephyr CMake package. This allows CMake to automatically load boilerplate code required for building Zephyr applications
west zephyr-export
-
Install additional Python dependencies
pip3 install --user -r ~/zephyrproject/zephyr/scripts/requirements.txt
-
-
Install the Zephyr SDK
-
Download and verify the Zephyr SDK bundle
Note: Support SDKv0.16.8 or above
cd ~
wget https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.17.0/zephyr-sdk-0.17.0_linux-x86_64.tar.xz
wget -O - https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.17.0/sha256.sum | shasum --check --ignore-missing
-
Extract the Zephyr SDK bundle archive:
tar xvf zephyr-sdk-0.17.0_linux-x86_64.tar.xz
-
Run the Zephyr SDK bundle setup script:
cd zephyr-sdk-0.17.0
./setup.sh
-
Install udev rules, which allow you to flash most Zephyr boards as a regular user
sudo cp ~/zephyr-sdk-0.17.0/sysroots/x86_64-pokysdk-linux/usr/share/openocd/contrib/60-openocd.rules /etc/udev/rules.d
sudo udevadm control --reload
-
-
Build a Zephyr sample
-
For EK_RA8M1
cd ~/zephyrproject/zephyr
west build -p always -b ek_ra8m1 samples/basic/blinky
-
For EK_RA8D1
cd ~/zephyrproject/zephyr
west build -p always -b ek_ra8d1 samples/basic/blinky
-
For MCK_RA8T1
cd ~/zephyrproject/zephyr
west build -p always -b mck_ra8t1 samples/basic/blinky
-
For EK_RA6M3
cd ~/zephyrproject/zephyr
west build -p always -b ek_ra6m3 samples/basic/blinky
-
For RZG3S_SMARC
cd ~/zephyrproject/zephyr
west build -p always -b rzg3s_smarc/r9a08g045s33gbg/cm33 samples/hello_world
-
For RSK-RX130-512KB
Currently Zephyr SDK is not supported we need to install GCC for RX tool chain separately:
-
Download and install GCC for RX v8.3.0.202405 toolchain:
https://llvm-gcc-renesas.com/rx-download-toolchains/
-
Set env variable:
$ export RXGCC_TOOLCHAIN_PATH=<Path into your installed tool chain> $ export ZEPHYR_TOOLCHAIN_VARIANT=rxgcc
-
Build blinky sample
$ cd ~/zephyrproject/zephyr $ west build -p always -b rsk_rx130_512kb samples/basic/blinky
-
-
-
Flash the Sample
CAUTION: Please use linker which provided with RA MCU, RZ MPU. If use with a modified linker, please ensure that OFS region is reserved, or it can damage MCU and MPU.
west flash
-
Note: It is required to install SEGGER JLink (https://www.segger.com/) for west flash. And make sure installed folder is on your PATH environment variable:
For example,
wget --post-data 'accept_license_agreement=accepted&non_emb_ctr=confirmed&submit=Download+software' --no-check-certificate https://www.segger.com/downloads/jlink/JLink_Linux_V796f_x86_64.tgz
tar -xzf JLink_Linux_V796f_x86_64.tgz -C ~/
export PATH=~/JLink_Linux_V796f_x86_64/:$PATH
-
Refer Hardware connection before flash image.
-
-
Other applications
-
UART (echo_bot)
https://docs.zephyrproject.org/latest/samples/drivers/uart/echo_bot/README.html
cd ~/zephyrproject/zephyr
west build -p always -b ek_ra8m1 samples/drivers/uart/echo_bot
west flash
-
SPI (SPI bitbang)
- Note: In this case, SPI bitbang will NOT demonstrate for the bitbang SPI driver (Software-Driven GPIO method). It is re-used to demonstrate for SPI driver. Refer to Hardware connection of each board to add additional config and overlay files. These modified configurations will replace the SPI bitbang driver with the RA SPI driver for hardware-based SPI communication.
https://docs.zephyrproject.org/latest/samples/drivers/spi_bitbang/README.html
cd ~/zephyrproject/zephyr
west build -p always -b ek_ra8m1 samples/drivers/spi_bitbang
west flash
-
DHCPv4 client
https://docs.zephyrproject.org/latest/samples/net/dhcpv4_client/README.html
Before flashing application to board, start dhcp server on host PC according to sample guideline
cd ~/zephyrproject/zephyr
west build -p always -b ek_ra8m1 samples/net/dhcpv4_client
west flash
-
USB MASS
https://docs.zephyrproject.org/latest/samples/subsys/usb/mass/README.html
cd ~/zephyrproject/zephyr
west build -p always -b ek_ra6m3 samples/subsys/usb/mass -DCONF_FILE=usbd_next_prj.conf -DDTC_OVERLAY_FILE=ramdisk.overlay
west flash
-
-
Hardware connection
-
Special topic for DTC (deprecated): DTC is used with UART (Asynchronous API) and is supported inside hal_renesas as default.
-
Limitations
- Drivers are verified limitedly with zTest only.
Limitations for RA
* ULPT (timer) is supported as timer in system low power management. To get its feature, must enable PM (CONFIG_PM=y) in application. * CGC (Clock control) has just supported 3 basic API: 1. clock_control_on() 2. clock_control_off() 3. clock_control_get_rate() * RSIP (TRNG - Entropy) only supports API: entropy_get_entropy()
-
Related Links & Contact Information
Zephyr: https://docs.zephyrproject.org/
RA Product Information: www.renesas.com/ra
RA Product Support Forum: www.renesas.com/ra/forum
RZ Product Information: www.renesas.com/en/products/microcontrollers-microprocessors/rz-mpus
RZ Product Support Forum: https://community.renesas.com/rz
Support: www.renesas.com/support
-
History
Date | Description |
---|---|
April 30, 2024 | Add "ra8-support-1.2" branch which minimal support for EK_RA8M1 (GPIO, UART) |
May 10, 2024 | - Add "ra8-support-PR1.3" branch which support for EK_RA8D1, MCK_RA8T1, SPI, Flash, ULPT (timer), LPM (system power managment), CGC, DTC, RSIP - Add wiki page which guide for setup environment and samples' execution in RA8 boards with ra8-support-PR1.3 branch |
June 28, 2024 | - Update "ra8-support-PR1.3" branch: + Re-structure with ra8-support-1.2 after it merged to zephyrproject-rtos + Add I2C driver (master) + Fix issue of SPI bitbang - Wiki: + [Home] Add updated information of ra8-support-PR1.3 - [Home] Update SDK version to v0.16.8 - [Home] Remove SPI bitbang limitation in EK_RA8D1 and MCK_RA8T1 + [EK_RA8D1 Hardware connection] [EK_RA8M1 Hardware connection] [MCK_RA8T1 Hardware connection] Add hardware connection for I2C sample + [Getting started guide for Windows environment] Update SDK version to v0.16.8 |
July 8, 2024 | - Update "ra8-support-PR1.3-ethernet" branch + Add ethernet driver support for RA8 board Wiki: - [Home] Update dhcpv4 client sample - [EK_RA8M1 Hardware connection] Update hardware setup for Ethernet dhcpv4 client sample verification |
July 31, 2024 | - Add "ra8-support-1.3-integrated" branch as backup branch of "ra8-support-PR1.3", "ra8-support-PR1.3" is now change to only support for the RA8D1 and RA8T1 board support on Zephyr for upstreaming purpose |
October 23, 2024 | - Add "wip_ra" branch which is integrated branch for work in progress (under review in PR) of RA platforms |
November 12, 2024 | Add "rzg3s-support-1.1" branch which minimal support for RZ/G3S_SMARC (GPIO, UART) |
November 18, 2024 | Add branch "upstream/rx_zephyr_support_PR1.1" with below support: + Add support for Renesas RX architecture on Zephyr + RX130 SoC and RSKRX130 board support for RX SoC + Serial interface driver support (SCI UART) + Pinctrl driver support for RX SoC + GPIO driver support for RX SoC + Clock control driver support for RX SoC |
December 23, 2024 | Add support branch "wip/rx_support_alpha1.2" branch with below support for RSK-RX130 board + Add 64-bit system timer feature + Add tickless capable system timer + Support I2C driver (Master mode) for RX SoC + Support SPI driver for RX SoC + Support PWM driver for RX SoC + Add support external interrupt configuration feature for GPIO for RX SoC |
January 24, 2025 | Update "wip_ra" branch + Rebase with "main" branch + Add support for RA4E1 (FPB and VOICE boards) + Add support for USB-FS (Device) and USB-HS (Host) drivers + Add support for dac driver + Fix interrupt numbers bug for ra4w1 |
Feb 14, 2025 | Update information for EK-RA4L1 |
- Home
- Getting started guide for Windows environment
- EK_RA8M1 Hardware connection
- EK_RA8D1 Hardware connection
- MCK_RA8T1 Hardware connection
- EK_RA6M3 Hardware connection
- VOICE_RA4E1 Hardware connection
- EK_RA4L1 Hardware connection
- Special topic for DTC(deprecated)
- Run AWS IOT core MQTT sample on EK‐RA8M1
- RZG3S_SMARC Hardware connection
- RSKRX130 Hardware Connection