nerves-projectErlang-OTP on the BeagleBone ErlangDC Lightning Talk - 22 Feb 2012
What is the nerves-project?• Production-quality environment and libraries for building Erlang-based embedded devices• Demonstration that Erlang and OTP are a viable alternative to traditional C/C++ embedded development• Excuse to hack random hardware devices and in Erlang• THIS IS A WORK IN PROGRESS2 nerves-project.org
Quick aside: Embedded System• Computer system designed for a specific purpose• Common characteristics – Real-time components – Task-specific I/O and hardware acceleration – CPU, DRAM, or disk resource limited• Nerves-project focus – Systems fast enough to run embedded Linux – Generally 200 MHz, 64 MB DRAM, 64 MB storage – Sub $30 BOM for processor complex3 nerves-project.org
Why Erlang?• Message-based architecture good match for embedded development• Very mature ideas on robustness• Ready to take advantage of growing number of multi- core embedded processors• Still has support for bit manipulations• Process-scoped garbage collector4 nerves-project.org
What’s not Erlang• Goal is to use Erlang in the places that count• Components that probably won’t be Erlang – Device drivers – UI – Linux system initialization and utilities• But, Nerves will provide easy-to-use interfaces to many of these components5 nerves-project.org
The BeagleBone is Getting Nerves• Inexpensive ARM Cortex A8 platform• 720 MHz ARM• 256 MB DRAM• Lots of peripheral interfaces• Large hobbyist community• “Easy” to integrate into real products6 nerves-project.org
What Can It Connect To?• Everything* – Some assembly required• Interfaces: GPIO, PWM, ADC, I2C, SPI, USB, Ethernet, CAN, MMC, UART, McASP, etc.• Possibilities – LEDs, buttons, light sensors, humidity, temperature – Heart rate monitors, accelerometers, gyros, compasses, NFC – GPS, GPRS, Bluetooth, automobile – Motors, servos, 1D and 2D image sensors7 nerves-project.org
Software Components Linux Kernel Cross- compiler Init scripts, utilities Erlang R15B Buildroot 3rd party Erlang tools and apps Your Erlang Your Device’s Apps Configuration8 nerves-project.org
Getting Started• Go to http://nerves-project.org• Download the microSD card image• Copy the image to a microSD card• Insert the card into a BeagleBone and boot9 nerves-project.org
Going Forward• Solidify code for the simple interface support• Build apps that use nerves! – Any project that you could build with an Arduino – Low power Erlang nodes – Demo ideas to really show off Erlang’s advantages in concrete ways• A laundry list of other items based on our interests10 Troodon Software LLC Proprietary & Confidential
Final Thoughts• The world is filled with embedded devices• Erlang is a good match for many embedded development needs• Lots of opportunities to move Erlang forward• People will use code from the nerves-project – The Buildroot infrastructure already useful – Contacted by people around the world asking about it – Especially interested in HiPE support11 nerves-project.org
A particular slide catching your eye?
Clipping is a handy way to collect important slides you want to go back to later.