{"id":136148,"date":"2022-02-27T18:22:50","date_gmt":"2022-02-28T02:22:50","guid":{"rendered":"https:\/\/lifeboat.com\/blog\/2022\/02\/esp32-virtual-machine-lets-you-change-programs-on-the-fly"},"modified":"2022-02-27T18:22:50","modified_gmt":"2022-02-28T02:22:50","slug":"esp32-virtual-machine-lets-you-change-programs-on-the-fly","status":"publish","type":"post","link":"https:\/\/lifeboat.com\/blog\/2022\/02\/esp32-virtual-machine-lets-you-change-programs-on-the-fly","title":{"rendered":"ESP32 Virtual Machine Lets You Change Programs On The Fly"},"content":{"rendered":"<p><a class=\"aligncenter blog-photo\" href=\"https:\/\/lifeboat.com\/blog.images\/esp32-virtual-machine-lets-you-change-programs-on-the-fly2.jpg\"><\/a><\/p>\n<p>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, <a href=\"https:\/\/github.com\/bor0\/evm-esp32\" target=\"_blank\">allowing for dynamic program updates to happen.<\/a><\/p>\n<p>The code is inspired by the <a href=\"https:\/\/hackaday.com\/2020\/12\/07\/inside-chip-8\/\">CHIP-8,<\/a> 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.<\/p>\n<p>It\u2019s probably not something with immediate ground-breaking applications for most people, but it\u2019s a different way of working with and programming the ESP32, and that\u2019s pretty neat.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>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 [\u2026]<\/p>\n","protected":false},"author":662,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[1523,1509],"tags":[],"class_list":["post-136148","post","type-post","status-publish","format-standard","hentry","category-computing","category-entertainment"],"_links":{"self":[{"href":"https:\/\/lifeboat.com\/blog\/wp-json\/wp\/v2\/posts\/136148","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lifeboat.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lifeboat.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lifeboat.com\/blog\/wp-json\/wp\/v2\/users\/662"}],"replies":[{"embeddable":true,"href":"https:\/\/lifeboat.com\/blog\/wp-json\/wp\/v2\/comments?post=136148"}],"version-history":[{"count":0,"href":"https:\/\/lifeboat.com\/blog\/wp-json\/wp\/v2\/posts\/136148\/revisions"}],"wp:attachment":[{"href":"https:\/\/lifeboat.com\/blog\/wp-json\/wp\/v2\/media?parent=136148"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lifeboat.com\/blog\/wp-json\/wp\/v2\/categories?post=136148"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lifeboat.com\/blog\/wp-json\/wp\/v2\/tags?post=136148"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}