GRiSP 2 is a combination of embedded hardware and software aiming at being the best prototyping solution for Erlang and Elixir developers.
The first version of the GRiSP board was and is still used extensively for a wide range of applications like custom made home automation systems, teaching, European research projects, and even industrial prototyping.
Solving the Pain Points with Embedded Development
Traditional embedded development is done with low level languages or specialized virtual machines and language subsets. Many problems become hard to solve in such environments. Properties like fault tolerance, debugging and tracing, test and iterate are hard to implement. The GRiSP platform solves these problems by bringing native Erlang and Elixir into the embedded world. You can now get the full fault tolerance properties from Erlang and its supervision structure. Debugging and tracing is easy and fast, and can be performed against live hardware and existing systems. Testing and iterative development is more fun and flexible with features such as hot code loading.
Getting into embedded development can be a daunting task for high-level language developers. There are many hardware platforms and configurations out there. Learning new or specialized languages that have special limitations reduces productivity and comes at a cost. Picking an option and setting up environments is a painful process. What if you could program embedded systems using normal Erlang and Elixir and their standard tools? With GRiSP that becomes a real possibility. We have taken a layered approach to the hardware API so you can interact with the hardware and peripheral drivers through pure Erlang. You can keep using any existing libraries that you are used to, since the VM is the same as you would run on any other platform. GRiSP lets you venture out into the world of embedded development using your existing skillset!
The Evolution of GRiSP
The GRiSP 2 board will be the natural evolutionary next step for our GRiSP 1 board. We have overcome design pitfalls and optimized our hardware, and all we learned will be put into GRiSP 2 by design.
The experience and feedback we gathered lead us to work on the second version of the board with the following enhancements:
- Real bare-metal Erlang using the RTEMS RTOS
- Support for Elixir via Nerves and Linux
- More CPU power for better peak performance and enhenced power efficiency
- Better booting capabilities, aiming at ultra-fast boot time
- Ethernet port for more network configuration choices
- Overall improved IO throughput
- More modular design to ease the move from development to production
- Improved tooling
- Complete Erlang project backward compatibility
GRiSP 2 Specifications
GRiSP 2 is a prototyping board made from a System on Module (SoM) and an IO break-out base board.
System on Module
- NXP iMX6UL, ARM Cortex-A7 @ 696 MHz, 128 KB L2 cache
- Integrated power management
- TRNG, Crypto Engine (AES/TDES/SHA), Secure Boot
- 128 MB of DDR3 DRAM
- 4 GB eMMC
- 4 KBit EEPROM
- Wi-Fi 802.11b/g/n WLAN
- 100 Mbit/s Ethernet port with support for IEEE 1588
- MicroSD Socket for standard MicroSD cards
- Dallas 1-Wire via 3-pin connector
- Digilent Pmod™ compatible I²C interface
- Two Digilent Pmod™ Type 1 interfaces (GPIO)
- One Digilent Pmod™ Type 2 interface (SPI)
- One Digilent Pmod™ Type 2A interface (expanded SPI with interrupts)
- One Digilent Pmod™ Type 4 interface (UART)
- Two RGB LEDs
- 5 DIP switches
- Reset Key
Debug & Power Supply
- Serial port via Micro USB for console (Erlang Shell or RTEMS Console)
- On-board JTAG debugger via Micro USB
- JTAG / Trace connector for external debuggers
- Power supply via Micro USB connector
- Only one USB cable needed for power, console and on-board JTAG
Like for the first version, the project provides all the tools to build and run Erlang code on bare-metal hardware. What you get is a complete, full-blown Erlang Virtual Machine (VM) that is identical to what you would run on a normal OS, but running directly on the CPU.
The Erlang virtual machine is compiled together with the real-time abstraction layer The Real-Time Executive for Multiprocessor Systems (RTEMS) Real Time Operating System (RTOS). This allows Erlang to work directly with the hardware without any layer in-between. Drivers or NIFs implemented in C can process signals with stringent deadlines and together with Erlang’s excellent soft real-time properties can make for a very snappy hardware system.
Towards Hard Real-Time
We are also working on research to bring hard real-time to the embedded Erlang world. Working with C drivers in your Erlang system can already give you hard real-time benefits, but we want to make this accessible from Erlang directly without requiring any low-level knowledge. Once mature, this will be part of our future software stack and feature set.
Nerves and Linux
In addition to running Erlang bare-metal, GRiSP 2 supports the Nerves platform on Linux. This greatly widens the range of embedded applications that can be prototyped and deployed on GRiSP 2 hardware.
The GRiSP 2 hardware has been carefully designed to improve the IO contentions that we detected in the first version. We added an on-board Ethernet port, to increase the number of ways you can interact with the board via networking.
The GRiSP 2 hardware is designed with a SoM (System on Module) on top of an IO break-out board. When designing a production board after the prototyping phase, the same SoM can be reused and only the IO board need customization. This greatly reduces the cost of designing production hardware.
GRiSP 2 comes with a complete toolchain to create and deploy embedded projects using Erlang or Elixir. There is also automated tooling support for creating custom builds of the Erlang VM that include your own custom C drivers or any other included C code that you may need.
We want to make it as easy and painless as possible to deploy embedded projects with Erlang. It should feel as close as possible to a normal Erlang project and our tooling is there to help you with all steps in the process.
The GRiSP 2 hardware and software suite is fully backward compatible with the Erlang code developed for the first version.
First Stretch Goal: We make cases
When we reach 20,000€ we will make a case to hold a GRiSP 2 board and normal sized PMODs plugged into it. We will create a design and publish the 3-D files as open source. We will also sell ready made cases and add them as rewards in this Kickstarter.
The actual technology used for making these cases is a bit dependent on the demand as will be the final selling price.
Second Stretch Goal: We add battery management
When we reach 25,000€ we will provide support for Lithium Battery management. We will create an adapter for batteries that will charge a battery when connected to USB and run the board with the battery as a power source when disconnected. Adapters will be available for some standard battery form factors. In addition, we might sell batteries and add them as rewards (Lithium batteries are complicated to ship, so all we can promise at this time is that we will point to a source for the batteries that fit our adapter). An extension to the case will be made to allow batteries to fit.
Risks and challenges
During development of the first GRiSP board we have learned a lot. Initially we did have issues with Wi-Fi connectivity due to antenna problems and the USB controller stealing too much CPU cycles to make Wi-Fi work. The still outstanding issues will of course be fixed in this version, but unforeseen problems can still occur with hardware components. In addition, there could be problems in manufacture or shortage of component parts.
We have the experience from manufacturing the previous board and are not deviating too much from that. We have also selected common components that are in good supply to avoid any production chain hiccups. Therefore we foresee a very stable production with only minimal risk.
- (60 days)