Nerves Framework

What is the Nerves Project ?

Recently one of my customers brought to my attention Nerves Project

Nerves defines a new way to build embedded systems using Elixir. It is specifically designed for embedded systems, not desktop or server systems. You can think of Nerves as containing three parts:

  • Platform — a customised, minimal Buildroot-derived Linux that boots directly to the BEAM VM.
  • Framework — ready-to-go library of Elixir modules to get you up and running quickly.
  • Tooling — powerful command-line tools to manage builds, update firmware, configure devices, and more.

Taken together, the Nerves platform, framework, and tooling provide a highly specialized environment for using Elixir to build advanced embedded devices.

Above is from Getting Started — nerves v1.9.1

Other useful links

What is Mix?

Mix is a build tool that provides tasks for creating, compiling, and testing Elixir projects, managing its dependencies, and more.

More here: https://hexdocs.pm/mix/Mix.html

Build nerves for BeagleBone on Ubuntu

Nerves support various targets and cross compiling for this on Mac/Windows/Linux. Below are steps to compile using Ubuntu for beagle bone.

Host Setup

				
					sudo apt install build-essential automake autoconf git squashfs-tools ssh-askpass pkg-config curl

git clone https://github.com/asdf-vm/asdf.git ~/.asdf — branch v0.10.0

echo -e ‘\n. $HOME/.asdf/asdf.sh’ >> ~/.bashrc
echo -e ‘\n. $HOME/.asdf/completions/asdf.bash’ >> ~/.bashrc # optional
source ~/.bashrc

asdf install erlang 25.0.3

asdf install elixir 1.13.4-otp-25

asdf global erlang 25.0.3
asdf global elixir 1.13.4-otp-25

mix local.hex
mix local.rebar
mix archive.install hex nerves_bootstrap
				
			

Clone & Build

				
					git clone git@github.com:nerves-project/nerves_system_bbb.git
cd nerves_system_bbb

mix deps.get
mix compile

mix nerves.new test_bb
unset MIX_ENV
unset MIX_TARGET
export MIX_TARGET=bbb
cd test_bb

mix local.hex
mix local.rebar
mix local.nerves
mix archive.install hex nerves_bootstrap
mix deps.get
mix firmware
				
			

The last step mix.firmware writes the firmware to SD card. I have been able to successfully boot this on both SeedStudio-BeagleBoard & Beagle Bone Black

Facebook
Twitter
LinkedIn
Email

Recent Posts

Leave a Reply

Your email address will not be published. Required fields are marked *