A tiny AtomVM NIF written in C, called from an Elixir app on ESP32-S3.
-
nifs/
ESP-IDF component that registers a NIF:Elixir.SampleApp.Hello:hello/0(returns1234). -
examples/hello_nif_elixir/
Elixir app that callsSampleApp.Hello.hello/0and prints the result.
-
Add (or symlink) this repo under AtomVM’s ESP32 components directory:
AtomVM/src/platforms/esp32/components/ -
Build + flash AtomVM firmware with the component included.
-
Build the Elixir app (
mix atomvm.packbeam) and flash the generatedsample_app.avm.
Starting application...
NIF said: 1234
Return value: ok
This repo is meant to be a minimal reference for “custom NIF in AtomVM firmware + call it from Elixir”.
