Renode: what is this framework and why should you care?

IO renewal

Renode is a recent project that not many people know about, but it could be very interesting for many makers, hobbyists who create prototypes with Arduino or Raspberry Pi , and developers who create IoT projects and embedded systems. For this reason, it's gaining increasing support, tutorials, and online content.

To learn more about this interesting open-source project , you can read this article with the essentials to understand it and start working with it in your future projects…

What is a framework?

framework

Renode is a framework , like many others. For those who don't yet know what that is, a framework is a standardized set of tools used for various purposes, with the goal of saving time, such as development, troubleshooting, adding support for programs, libraries, tools, and so on.

What is Renode?

In the case of Renode, it's a framework that accelerates the development of embedded and IoT systems by allowing the simulation of physical hardware systems, including CPUs, I/O peripherals, sensors, and other environmental elements. Therefore, it allows you to run, debug, and test developed software without modifying your PC or using other platforms.

As for supported motherboards , it has a large number of them . These include Xilinx, ST Micro, Microchip PolarFire, SiFive, etc.

You should also know that Renode is an open-source project , although it has commercial backing from Antmicro. Furthermore, it allows for the simulation of Arm and RISC-V hardware, enabling rapid development and support for software developers working in the IoT field.

Renode is very comprehensive, powerful, and functional. So much so, that the TensorFlow Lite team itself uses it to accelerate automated development on Arm and RISC-V platforms , as well as x86, SPARC, and PowerPC. This is all done without needing physical hardware from these platforms for testing.

More information – Official Renode.io project website

Supported platforms

Regarding the platforms supported by the Renode framework, from which you can work, they are:

In terms of weight, it is barely a few tens of MB, so it is not a heavy package.

Install Renode step by step on Linux

Using the Ubuntu distro as a reference, installing Renode is as simple as following these steps:

  • Satisfy dependencies, such as that of Suit:
sudo apt update
sudo apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-keys 3FA7E0328081BFF6A14DA29AA6A19B38D3D831EF
sudo apt install apt-transport-https ca-certificates
echo "deb https://download.mono-project.com/repo/ubuntu stable-xenial main" | sudo tee /etc/apt/sources.list.d/mono-official-stable.list
sudo apt update
sudo apt install mono-complete

  • After that, you have to satisfy other dependencies:
sudo apt-get install policykit-1 libgtk2.0-0 screen uml-utilities gtk-sharp2 libc6-dev

  • Now, access this web and download el DEB package.
  • The next thing will be to go to the Downloads directory where you have downloaded the .deb and install (Remember to replace the name with the version that corresponds to you):
cd Descargas

sudo dpkg -i renode_1.7.1_amd64.deb

Run Renode for the first time and first steps

You can now run Renode for the first time and start your first projects. To run it, simply execute the following command:

renode

This opens a Renode workspace where you can enter commands to create or manage your first machine. For example, to create a machine to simulate the STM32F4 Discovery board:

mach create
machine LoadPlatformDescription @platforms/boards/stm32f4_discovery-kit
.repl 

You can also see the peripherals available for the platform with:

(machine-0) peripherals

By the way, machine-0 will be the default machine name if you haven't chosen another one. It will appear as "prompt" once you create the machine…

To load the program you want to run on this simulated machine for testing, you can use (e.g., this one from Antmicro):

sysbus LoadELF @http://antmicro.com/projects/renode/stm32f4discovery.elf-s_445441-827a0dedd3790f4559d7518320006613768b5e72

You could also load it from a local address , for example, imagine you want to load a program that you have in:

sysbus LoadELF @mi-ejemplo.elf
You can see all the commands you can use and help if you use the command help within the Renode environment.

Then you can start the emulation :

start

Or stop it with:

pause

I hope it has been helpful for you…

Renode tutorials

Although it's not very common, there are increasingly more tutorials and websites where you can find information on using Renode. In addition, the official website itself has a section of video tutorials to help you learn the basics to get started with your projects.

See tutorials

See documentation and wiki


Add as preferred source in Google