We're sorry but this page doesn't work properly without JavaScript enabled. Please enable it to continue.
Feedback

Running Erlang and Elixir on microcontrollers with AtomVM

00:00

Formal Metadata

Title
Running Erlang and Elixir on microcontrollers with AtomVM
Subtitle
How to run BEAM code on a 3 $ microcontroller
Title of Series
Number of Parts
542
Author
License
CC Attribution 2.0 Belgium:
You are free to use, adapt and copy, distribute and transmit the work or content in adapted or unchanged form for any legal purpose as long as the work is attributed to the author in the manner specified by the author or licensor.
Identifiers
Publisher
Release Date
Language

Content Metadata

Subject Area
Genre
Abstract
AtomVM is a tiny portable virtual machine that allows BEAM code to run on microcontrollers with less than 500KB of RAM such as ESP32, STM32 or RPI 2040 devices. In few words you can flash AtomVM on a microcontroller such as the ESP32 and get any virtually unmodified code compiled for the BEAM running on it.
Erlang distributionDisk read-and-write headSoftware maintenanceComputing platformMicrocontrollerSoftwareStandard deviationConstraint (mathematics)Function (mathematics)SpacetimeModul <Datentyp>Read-only memoryOpcodeLibrary (computing)RepetitionImplementationCodeSemiconductor memoryCodeImplementationRight angleErlang distributionMicrocontrollerProjective planeComputer fileSoftware developerSoftwareFile formatTelecommunicationOpen sourceOverhead (computing)Data managementVirtual machineSoftware testingMulti-core processorNumber32-bitBitOnline helpComputer animation
Multiplication signComputer animation
Program flowchart
Transcript: English(auto-generated)
There is more management overhead than to talk, so yeah Great Okay This is Davide Betillo with Running Airline and Elixir on microcontrollers with AtomVM. Give it up
Who I am basically I work during my daytime on a start and a jog that are really nice Elixir projects for IoT and whatever and during my nighttime I try to work a lot on AtomVM that allows you to run
Elixir, Airline, GLEAM, whatever can run on the beam on a microcontroller. When I say microcontroller I mean something really memory constrained, but not too much I mean still it has to be a 32-bit processor. It requires about 80 kilobytes of RAM, but we can do it. Pretty crazy
but we can do it and so The software is mostly unmodified. I mean we don't have to We don't have to I mean translate it to other formats or whatever it just it can run beam files
So it's pretty standard So how? so basically the We did Well, I created it from scratch and So the whole implementation has no code from the original beam implementation because we are focused on
memory so rather than Focusing on performances where beam is very good at we are focusing on making everything stay in just few kilobytes of RAM and The Virtual machine is compatible with I mean all the recent OTP releases
We already have some I mean experimental support for OTP 26 So we are on par right now and we have support for quite a big number of NIFs and BIFs from Erlang. So we we implemented them in all the Daily basics so you can run your project if you are not doing anything weird and
well there is and Also, we did some something more for example We weren't able to run a replica for Erlang or Elixir on a microcontroller. It's not really easy So we did the simple LISP implementation for for testing stuff
So if you want to test registers or EWC communication or SPI communication where you can poke with registers using LISP it's not good as maybe Erlang or Elixir or whatever, but I mean you can experiment a lot and and everything can be packed into a single file that can be easily flashed and
We are mainly supporting right now ESP32 because we started the project with that powerful Microcontroller, but we well we support of course Linux Mac OS and whatever because yeah, we need to test it and
We are working on improving and extending the support to other devices I mean as soon as I get a new development board, I try to run it and at sometimes I need help of course and It's pretty pretty easy to port it by the way and
When it is already here, and it can be used for your simple Or maybe a bit more complex projects again. You are running on a really constrained device, but you can do interesting stuff and We are working towards at the next release that it will feature a lot of cool stuff We got finally SMP support so we can take benefit of
Multi-core microcontrollers and We got recently also really good code debugging features. So it's pretty nice and Yeah, this project has been possible. Thanks to the work of other contributors And so thank you very much to everyone has been working and because you know
It's open source projects are always kind of teamwork and it's hard to do something like this just alone So a lot of thanks to all the contributors and thank you to all of you, of course
Thank You Davide four minutes and 40 seconds, I think perfect timing