Often, reprogramming a microcontroller involves placing it in reset, flashing the code, and letting it fire back up. It usually involves shutting the chip down entirely. However, [bor0] has built a virtual machine that runs on the ESP32, allowing for dynamic program updates to happen.
The code is inspired by the CHIP-8, a relatively ancient interpreter that had some gaming applications. [bor0] had already created a VM simulating the CHIP-8, and repurposed it here, taking out the gaming-related drawing instructions and replacing them with those that control IO pins. Registers have also been changed to 16 bits for added flexibility and headroom.
It’s probably not something with immediate ground-breaking applications for most people, but it’s a different way of working with and programming the ESP32, and that’s pretty neat.
Comments are closed.