Brings Erlang, Elixir and other functional languages to really small systems.
AtomVM implements from scratch a minimal Erlang VM that supports a subset of ErlangVM features and that is able to run unmodified BEAM binaries on really small systems like MCUs.
- Linux, macOS, FreeBSD, DragonFly (generic_unix)
- ESP32 SoC (with IDF/FreeRTOS, see esp32)
- STM32 MCUs (with LibOpenCM3, see stm32)
- Raspberry Pi Pico (see rp2040)
- Browsers and NodeJS with WebAssembly (see emscripten)
AtomVM aims to be easily portable to new platforms with a minimum effort, so additional platforms might be supported in a near future.
There is much more information, including a more complete "Getting Started Guide", examples, detailed build instructions, and contact information available on the AtomVM project website.
Don't forget to check out the examples repository to help get you started on your next IoT project.
Please, use v0.6.x releases, main branch is for development purposes and it might be unstable.
Required for building:
- CMake (CMake build system)
- gperf (GNU Perfect Hash Function Generator)
- erlc (erlang compiler)
- elixirc (elixir compiler)
- Mbed TLS (portable TLS library, optionally required to support SSL)
- zlib (zlib compression and decompression library)
Documentation and Coverage:
- gcov and lcov are optionally required to generate coverage report (
make coverage
). - For documentation build requirements consult the Documentation README.
$ mkdir build
$ cd build
$ cmake ..
$ make
$ ./src/AtomVM ./examples/erlang/hello_world.avm
Run tests within build directory with:
$ ./tests/test-erlang
$ ./tests/test-enif
$ ./tests/test-mailbox
$ ./tests/test-structs
$ ./src/AtomVM ./tests/libs/estdlib/test_estdlib.avm
$ ./src/AtomVM ./tests/libs/eavmlib/test_eavmlib.avm
$ ./src/AtomVM ./tests/libs/alisp/test_alisp.avm
Complete Build Instructions are available in the documentation for Generic UNIX (Linux, MacOS, FreeBSD, DragonFly), ESP32, STM32, Raspberry Pi Pico (rp2040), and WASM (NodeJS/Web).
AtomVM is still in its early stages, but it can run simple applications similar to those available in examples and tests.
AtomVM might crash with a similar message:
Undecoded opcode: 15
Aborted (core dumped)
This basically means that an instruction has not been implemented yet, or that an outdated version has been used. Please, make sure to always run AtomVM using latest version.
This project is a work in progress, so there are several known limitations, that will prevent to run unmodified software, some of them are:
- There is a minimal standard library, so several standard functions are missing.
- Several instructions are not yet implemented.
All of these limitations are going to be fixed in a reasonable amount of time.
This project has been created by Davide Bettio, and now is developed from a growing number of contributors.
Any kind of contribution is welcome, you can either contribute to this repository by improving the virtual machine, the core libraries or the documentation or by contributing to any of the organization repositories.
This project is under the terms of the Apache 2.0 license.