
ESP32 EMULATOR (Repost to align with Subreddit Rules)
ESP32 Emulator, with my own layer of patches on top!
This is a set of patches applied on top of the Espressif QEMU fork (found here: https://github.com/espressif/qemu )
Compared to when i originally made this post, where we only supported ESP-IDF based firmwares at that time, this version now supports Arduino Based firmwares too (to varying levels of success)
The idea was for something small and compact that could be run, and used to quickly test any firmware that may be nice to just verify if it works (without burning out the flash on your ESP32 itself)
The Emulator GUI itself has a few bugs, but the core QEMU package is separate, easy to adapt to any QEMU Manager GUI.
The core of what works
- Basic SPI bus and supported calls (this was tested against real hardware, with a modified version of PURR OS used for tracing and mapping the SPI/i2c calls)
- I2C support (we have proper replicated touch, display, keyboard, and Virtual SDCard support, they also behave the same as real hardware)
- Virtual SDCard support (grab a blank formatted .img file, and you can connect that to the Emulator/QEMU and pass it to the VM itself as well as flash it to a real SDCard and pick up where you left off, it works both directions*)
- Depending on firmware, we can get up to near Real-Time Speed inside the VM, with benchmarks from PURR OS hitting close to 98% of real-time (testing was done when the QEMU Config was set to only use 1 Host CPU core, instead of multithreaded)
*With recent reports from testers, the SD Card Feature seems to be fully working, as one tester is using this emulator to test their own firmwares and projects!
Qemu Patches are separate of Source, so you can pull a fresh fork of QEMU from Espressif, and apply the patches on separately (with 2 scripts to help make it super easy to compile on MSYS MINGW64, or linux!)
Last Key thing to add, it was written in rust, and i know how Memory-Safe its meant to be.
ESP32 Emu Running Launcher firmware (Arduino based firmware)
My In-House offering, PURR OS (at the boot screen) ESP-IDF based firmware
PURR OS About Screen (public release) Using touch to navigate
Navigating Launcher using WASD Keys
My first post got flagged because i attached a link that went against Rule #3. Original version was approved, my edit was not. That's my fault.
still learning to use reddit, bear with me.
Sources:
PURR OS: https://github.com/PastorCatto/PURR-OS-ESP32
ESP32-Emu: https://github.com/PastorCatto/ESP32-Emulator/
Launcher: https://github.com/bmorcelli/Launcher
Please don't nuke this post again, i made sure this time around that it did not go against #2 (low Effort) and #3 (Dangerous/illegal)