-
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 |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
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(1) - SDHI | - | Support | Support - GPT | Support - AGT | Planning | Planning | Support(1) | Planning | - | Support(1) | - |
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(1) - SDHI | - | Support(1) | Support - GPT | Support - AGT | Planning | Planning | Support(1) | Planning | Support(1) | Support(1) | - |
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(1) - SDHI | - | Support(1) | Support - GPT | Support - AGT | Planning | Planning | - | - | - | Support(1) | - |
EK-RA6M1 | - | Support | Support - SCI-UART | Support - IIC Master | Support - SPI | Support(1) - Flash_hp | Planning - AGT | Planning - LPM | Support - CGC | Support | Support(1) | Planning | - | Planning | - | Support(1) | Support(1) - GPT | Support - AGT | - | - | - | - | - | - | - |
EK-RA6M2 | - | Support | Support - SCI-UART | Support - IIC Master | Support - SPI | Support(1) - Flash_hp | Planning - AGT | Planning - LPM | Support - CGC | Support | Support(1) | Planning | - | Planning | - | Support(1) | Support(1) - GPT | Support - AGT | Planning | - | - | - | - | - | - |
EK-RA6M3 | - | Support | Support - SCI-UART | Support - IIC Master | Support - SPI | Support(1) - Flash_hp | Planning - AGT | Planning - LPM | Support - CGC | Support | Support(1) | Planning | - | Planning | Support(1) | Support(1) | Support(1) - GPT | Support - AGT | Planning | Planning | Support(1) | Planning | - | Planning | - |
EK-RA6M4 | - | Support | Support - SCI-UART | Support - IIC Master | Support - SPI | Support(1) - Flash_hp | Planning - AGT | Planning - LPM | Support - CGC | Support | Planning | Planning | Planning | Planning | Support(1) | Support(1) | Support(1) - GPT | Support - AGT | Planning | Planning | - | - | - | Planning | - |
EK-RA6M5 | - | Support | Support - SCI-UART | Support - IIC Master | Support - SPI | Support(1) - Flash_hp | Planning - AGT | Planning - LPM | Support - CGC | Support | Planning | Planning | Planning | Planning | Support(1) | Support(1) | Support(1) - GPT | Support - AGT | Planning | Planning | Support(1) | Planning | - | Planning | - |
EK-RA6E2 | - | Support | Support - SCI-UART | - | Support - SPI | Support(1) - Flash_hp | Planning - AGTW | Planning - LPM | Support - CGC | Support | Planning | Support(1) - CAN_FD | - | - | Support(1) | Support(1) | Support(1) - GPT | Planning | Planning | - | - | - | - | - | - |
FPB-RA6E2 | - | Support | Support - SCI-UART | - | Support - SPI | Support(1) - Flash_hp | Planning - AGTW | Planning - LPM | Support - CGC | Support | Planning | Support(1) - CAN_FD | - | - | - | Support(1) | Support(1) - GPT | Planning | - | - | - | - | - | - | - |
FPB-RA6E1 | - | Support | Support - SCI-UART | Support - IIC Master | Support - SPI | Support(1) - Flash_hp | Planning - AGT | Planning - LPM | Support - CGC | Support | Planning | Planning | - | Planning | - | Support(1) | Support(1) - GPT | Support - AGT | - | - | - | - | - | - | - |
EK-RA4E2 | - | Support | Support - SCI-UART | - | Support - SPI | Support(1) - Flash_hp | Planning - AGTW | Planning - LPM | Support - CGC | Support | Planning | Support(1) - CAN_FD | - | - | - | Support(1) | Support(1) - GPT | Planning | Planning | - | - | - | - | - | - |
EK-RA4M2 | - | Support | Support - SCI-UART | Planning - IIC Master | Support - SPI | Support(1) - Flash_hp | Planning - AGT | Planning - LPM | Support - CGC | Support | Planning | Planning | - | Planning | Planning | Support(1) | Support(1) - GPT | Support - AGT | Planning | Planning | - | - | - | - | - |
EK-RA4M3 | - | Support | Support - SCI-UART | Planning - IIC Master | Support - SPI | Support(1) - Flash_hp | Planning - AGT | Planning - LPM | Support - CGC | Support | Planning | Planning | - | Planning | Planning | Support(1) | Support(1) - GPT | Support - AGT | Planning | Planning | - | - | - | - | - |
EK-RA4W1 | - | Support | Support - SCI-UART | Planning - IIC Master | Support - SPI | Planning | Planning - AGT | Planning - LPM | Support - CGC | Support | Planning | Planning | - | - | - | Support(1) | Support(1) - GPT | Support - AGT | - | - | - | - | - | - | - |
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) | Planning | - | - | - | - | - | - |
EK-RA2A1 | - | Support | Support - SCI-UART | Planning - IIC Master | Support - SPI | Planning | Planning - AGT | Planning - LPM | Support - CGC | Planning | Planning | Planning | - | - | - | Planning | Support(1) - GPT | Support - AGT | Planning | - | - | - | - | - | - |
EK-RA2L1 | - | Planning | Planning - SCI-UART | Planning - IIC Master | Planning | Planning | Planning - AGT | Planning - LPM | Planning - CGC | 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 |
RSKRX130 | Support(1) | Support(1) | Support(1) | Planning - IIC Master | Planning | Planning | Support(1) | Planning | Support(1) | 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). Branch will be maintained on Friday by bi-weekly |
rzg3s-support-1.1 | Support RZG3S-SMARC with GPIO and UART only |
upstream/rx_zephyr_support_PR1.1 | Support for RSKRX130 (RX architecture, GPIO, UART, System timer and Clock control) |
- 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.16.8/zephyr-sdk-0.16.8_linux-x86_64.tar.xz
wget -O - https://github.com/zephyrproject-rtos/sdk-ng/releases/download/v0.16.8/sha256.sum | shasum --check --ignore-missing
-
Extract the Zephyr SDK bundle archive:
tar xvf zephyr-sdk-0.16.8_linux-x86_64.tar.xz
-
Run the Zephyr SDK bundle setup script:
cd zephyr-sdk-0.16.8
./setup.sh
-
Install udev rules, which allow you to flash most Zephyr boards as a regular user
sudo cp ~/zephyr-sdk-0.16.8/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)
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
-
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 "upstream/rx_zephyr_support_PR1.1" branch which minimal support for RSKRX130 |
November 30, 2024 | Update "wip_ra" branch which synchronize with "main" branch and add new support for: + EK-RA4M1 board. + Entropy (TRNG) on EK-RA6M1, EK-RA6M2 and EK-RA6M3. + CAN on EK-RA6E2, FPB-RA6E2 and EK-RA4E2. + OSPI Flash on EK-RA8M1 and EK-RA8D1. + SDHC on EK-RA8M1, EK-RA8D1 and MCK-RA8T1. + ADC on RA6 boards and EK-RA4E2, EK-RA4M2, EK-RA4M3 and EK-RA4W1. + PWM (GPT) on RA6 and RA4 boards (except EK-RA4M1) and EK-RA2A1. + I2C on EK-RA4M2, EK-RA4M3, EK-RA4W1 and EK-RA2A1. |
RA Sample and Demo Hardware configuration
-
EK-RA8P1 Sample and Demo hardware configuration
-
EK-RA8M1 Sample and Demo hardware configuration
-
EK-RA8D1 Sample and Demo hardware configuration
-
MCK-RA8T1 Sample and Demo hardware configuration
-
EK-RA6M1 Sample and Demo hardware configuration
-
EK-RA6M2 Sample and Demo hardware configuration
-
EK-RA6M3 Sample and Demo hardware configuration
-
EK-RA6M4 Sample and Demo hardware configuration
-
EK-RA6M5 Sample and Demo hardware configuration
-
FPB-RA6E1 Sample and Demo hardware configuration
-
FPB-RA6E2 Sample and Demo hardware configuration
-
EK-RA6E2 Sample and Demo hardware configuration
-
FPB-RA4E1 Sample and Demo hardware configuration
-
Voice-RA4E1 Sample and Demo hardware configuration
-
EK-RA4E2 Sample and Demo hardware configuration
-
EK-RA4L1 Sample and Demo hardware configuration
-
EK-RA4M1 Sample and Demo hardware configuration
-
EK-RA4M2 Sample and Demo hardware configuration
-
EK-RA4M3 Sample and Demo hardware configuration
-
EK-RA4W1 Sample and Demo hardware configuration
-
EK-RA2A1 Sample and Demo hardware configuration
-
EK-RA2L1 Sample and Demo hardware configuration
-
AWS MQTT demo application
RX Sample and Demo Hardware configuration
RZ Sample and Demo Hardware configuration
-
RZ/V2H-EVK Sample and Demo hardware configuration
-
RZ/V2N-EVK Sample and Demo hardware configuration
-
RZ/V2L-SMARC Sample and Demo hardware configuration
-
RZ/N2L-RSK Sample and Demo hardware configuration
-
RZ/T2M-RSK Sample and Demo hardware configuration
-
RZ/T2L-RSK Sample and Demo hardware configuration
-
RZ/G3S-SMARC Sample and Demo hardware configuration
-
RZ/G2L-SMARC Sample and Demo hardware configuration
-
RZ/G2LC-SMARC Sample and Demo hardware configuration
-
RZ/G2UL-SMARC Sample and Demo hardware configuration
-
RZ/A3UL-SMARC Sample and Demo hardware configuration
-
RZ/A2M-EVK Sample and Demo hardware configuration