Running Linux and Zephyr on the Renesas RZ/G2L MPU in Renode

Published:

Topics: Open simulation, Open source tools

One of Renode’s practical advantages for real-world systems is its ability to simulate heterogeneous multi-core systems, such as ones including both Cortex-A and Cortex-M cores.

A recent example of an interesting platform of this kind that was added to Renode is the RZ/G2L MPU from Renesas, which combines the high-performance capabilities of its Linux-enabled ARM Cortex-A55 dual-core CPU with an ARM Cortex-M33 core which can run an auxiliary real-time operating system such as Zephyr.

With a host of interfaces, such as MIPI CSI-2, DSI, USB 2.0, and Gbit Ethernet, the platform makes for a good choice in building industrial human-machine interfaces (HMIs) and embedded devices with video capabilities for customers who focus on on-device graphics processing, from robotics, to automotive, space, agriculture, to mining.

In this article, we introduce Renode support for the Renesas RZ/GL2 MPU, and present how to run the platform with Linux and Zephyr demos, along with basic tests, and the peripherals that Renode currently supports.

Linux and Zephyr on RZ/G2L

Running RZ/G2L in Renode with Linux and Zephyr demos

Renode’s goal is to let you run unmodified software in a simulated environment, in order to reproduce your development and production environment, possibly including a complex boot flow, as closely as possible.

Here we will show you how to run some demos we provide with Renode that exercise both the Cortex-A55 and the Cortex-M33 cores.

First, make sure you have the latest version of Renode. If you are using Linux, you can get it by using these commands:

mkdir renode_portable
wget https://builds.renode.io/renode-latest.linux-portable.tar.gz
tar xf  renode-latest.linux-portable.tar.gz -C renode_portable --strip-components=1

Check the installation instructions to find other available builds and releases for other systems. Make sure you look at nightly builds of Renode.

To run the RZ/G2L Linux demo running on the Cortex-A55 core, start Renode, and (in the window that pops up) enter the following commands:

(monitor) start @scripts/single-node/rzg2l_linux.resc

Note: you can also use the rzg2l_uboot.resc script to run a U-Boot demo.

Once you run this command, Renode will open a separate window for console output. You will see the Linux kernel booting up. When prompted, enter the root password root and wait for Linux to reach the command line.

Alternatively, you can use the following command to run the Zephyr demo on the Cortex-M33 processor:

(monitor) start @scripts/single-node/rzg2l_zephyr.resc

Once again, Renode will open a separate window for console output. You will see the Zephyr shell sample prompt. You can explore the demo by running help to see available Zephyr commands.

Interactive development is a key feature of Renode, but its true strength shows in automated testing at scale, which can be done with a variety of tools, including the Robot framework. You can run some mainline tests for RZ/G2L in Renode with this simple command:

./renode-test tests/platforms/Renesas_RZ_G2L.robot

These tests attempt to run various software available for the board, including:

Extending the Renesas portfolio in Renode

For the RZ/G2L platform, aside from Cortex-A, Cortex-M, NVIC, and GIC, the following peripherals are currently supported in Renode:

The recent addition of RZ/G2L complements the growing portfolio of Renesas development platforms supported in Renode. Some other examples include:

You can conveniently check the growing list of platforms that Renode supports in the Renode Zephyr Dashboard. Hint: use the search to quickly filter by keyword adequate to what you are interested in. There is also a U-Boot Dashboard which includes Renode support for Renesas platforms as well.

You can also use System Designer to browse for supported chips (and related devices using those chips), where you will find software samples for both Zephyr and U-Boot. There, you can inspect the result of running those software samples, as well as run them interactively using the Run in Google Colab button. You can also run the Zephyr samples in VS Code, which we described in our previous blog note.

RZ/G2L & the Peripherals

Developing and testing high-speed interface devices with Renode simulation

Renesas’ RZ/G2L (and the compatible RZ/V2L SoC with an AI accelerator) is a great choice for high-performance embedded Linux devices with multimedia requirements, which also require industrial-grade stability. With RZ/G2L now available in Renode simulation, you can start experimenting with your own builds, or take advantage of Antmicro’s decades-long experience with developing high-performance, Linux-enabled platforms.

Regardless of whether you want help with using or expanding support for RZ/G2L in Renode for your project, want to work with us on having a similar platform supported in Renode, or are looking to build an entire complex system backed by simulation-based testing, we will gladly hear from you. Reach out to discuss Antmicro’s commercial services at contact@antmicro.com.

See Also: