Rishka
RISC-V virtual runtime in C/C++ made for ESP32-WROVER
|
Rishka is a RISC-V virtual runtime in C/C++ made for ESP32-WROVER with PSRAM specifically developed as kernel for Jessy OS.
The Rishka virtual runtime is a system designed to run special RISC-V binaries smoothly on ESP32-WROVER microcontroller units. Under the hood, the virtual machine serves as the main engine, while the kernel acts as its core component. The kernel handles system calls efficiently, providing a range of interfaces for accessing different system features and services.
Simple comparison of Rishka-based OS and Linux-based OS (with an Ubuntu logo, lol).
These include basic functions like managing files, as well as more complex tasks like controlling GPIO pins, attaching and detaching interrupts, and communication protocols such as I2C and SPI. Additionally, the kernel manages system utilities specific to the Jessy OS, handling tasks like sub-process runtime and memory allocation.
Rishka VM is a lightweight and efficient virtual runtime environment designed for RISC-V binaries on ESP32-WROVER microcontrollers. Follow these steps to integrate Rishka into your Arduino projects:
File > Examples > rishka
and select an example suitable for your project.To use rishka-cc
, you can get it from the release page if available or compile it yourself by typing the following on your terminal. Just make sure you have installed Rust compiler and Cargo package manager on your system.
Alternatively, you can install the rishka-cc
tool by typing the following below on your system terminal:
Before using rishka-cc
, you must configure two (2) environment variables, as shown below.
The RISHKA_LIBPATH
must be a folder where the librishka.h
header file is located, while the RISHKA_SCRIPTS
should be a folder where both launch.s
and the link.ld
files are located. For example, assuming Rishka was moved to the libraries folder on Arduino IDE:
If no problems occured and was configured as instructed, you can now seamlessly use the rishka-cc
.
To compile SDK examples provided with Rishka, follow these steps:
Replace <source-file>
with the path to the source file of the example you want to compile and <output-name>
with the desired name for the output binary.
Examples:
Now you have successfully compiled the example and can proceed with using the generated binary file.
Dumping raw binary files can be helpful in debugging programs, traditionally. Hence, a simple script in Qrepo is available to dump instructions from a raw binary file of Rishka. You can utilize it by typing the following:
This example demonstrates the usage of Rishka virtual machine on an ESP32-WROVER microcontroller. It initializes serial communication and SD card, waits for user input via serial port, loads the specified file into the Rishka VM, executes it, and then waits for the next input.
Contributions to Rishka are highly encouraged and appreciated! To contribute new features, bug fixes, or enhancements, please adhere to the following guidelines:
git checkout -b feature-name
.git commit -m "Added new feature"
.git push origin feature-name
.Rishka is distributed under the GNU General Public License v3.0. For further details, refer to the LICENSE file.