SlideShare a Scribd company logo
Taking Back Embedded
The Erlang Embedded Project

Omer Kilic || @OmerK
omer@erlang-solutions.com
Outline
•
•
•
•
•
•

Current state of Embedded Systems
Overview of Erlang and the Actor Model
Modelling and developing systems using Erlang
The Erlang Embedded Project
Future Explorations
Q&A

22/03/2013

Erlang Factory SF Bay 2013

Slide 2 of 46
Embedded Systems

“

An embedded system is a computer system designed for
specific control functions within a larger system, often
with real-time computing constraints. It is embedded as
part of a complete device often including hardware and
mechanical parts. By contrast, a general-purpose
computer, such as a personal computer (PC), is designed
to be flexible and to meet a wide range of end-user needs.
- Infinite Wisdom of Wikipedia

22/03/2013

Erlang Factory SF Bay 2013

Slide 3 of 46
Embedded Systems

• Specific functions
• Designed for a particular
application

22/03/2013

Erlang Factory SF Bay 2013

• General purpose
• Can be used for pretty much
any computing needs

Slide 4 of 46
Current Challenges
• Complex SoC platforms
• “Internet of Things”
– Connected and distributed systems

• Multicore and/or heterogeneous devices
• Time to market constraints
– The Kickstarter Era
– Rapid prototyping
– Maker Culture

22/03/2013

Erlang Factory SF Bay 2013

Slide 5 of 46
Internet of Things

22/03/2013

Erlang Factory SF Bay 2013

Slide 6 of 46
Internet of Fridges?

22/03/2013

Erlang Factory SF Bay 2013

Slide 7 of 46
Distributed Bovine Networks?

22/03/2013

Erlang Factory SF Bay 2013

Slide 8 of 46
Exciting times

22/03/2013

Erlang Factory SF Bay 2013

Slide 9 of 46
TI OMAP Reference System

22/03/2013

Erlang Factory SF Bay 2013

Slide 10 of 46
Samsung Exynos Reference System

22/03/2013

Erlang Factory SF Bay 2013

Slide 11 of 46
#include <stats.h>

Source: http://embedded.com/electronics-blogs/programming-pointers/4372180/Unexpected-trends

22/03/2013

Erlang Factory SF Bay 2013

Slide 12 of 46
Embedded Systems
• Bare Metal
– No underlying OS or high level abstractions

• RTOS
– Minimal interrupt and switching latency,
scheduling guarantees, minimal jitter

• Embedded Linux
– Slimmed down Linux with hardware interfaces

22/03/2013

Erlang Factory SF Bay 2013

Slide 13 of 46
RTOS Concepts
• Notion of “tasks”
• OS-supervised interprocess messaging
– Shared memory

• Mutexes/Semaphores/Locks
• Scheduling
– Pre-emptive: event driven
– Round-robin: time multiplexed

22/03/2013

Erlang Factory SF Bay 2013

Slide 14 of 46
Embedded Linux
• Not a new concept, increased popularity due
to abundant supply of cheap boards
– Raspberry Pi, Beagleboard/Beaglebone, Gumstix et al.

• Familiar set of tools for software developers,
new territory for embedded engineers
– No direct mapping for RTOS concepts, especially
tasks

• Complex device driver framework
– Here be dragons
22/03/2013

Erlang Factory SF Bay 2013

Slide 15 of 46
Erlang Embedded
• Knowledge Transfer Partnership between
Erlang Solutions and University of Kent
– Aim of the project: Bring the benefits of
concurrent systems development using Erlang to
the field of embedded systems; through
investigation, analysis, software development and
evaluation.

http://erlang-embedded.com

22/03/2013

Erlang Factory SF Bay 2013

Slide 16 of 46
Erlang? (I)
{declarative, functional,
concurrent, parallel, garbagecollected, soft real-time,
fault-tolerant, robust,
portable, distributed
message-passing, hot code
loading}
22/03/2013

Erlang Factory SF Bay 2013

Slide 17 of 46
Erlang? (II)
• First version developed in 1986
– Open-sourced in 1998.

• Battle-tested at Ericsson and many other
companies
– Originally designed for Embedded Systems!

• Implements the Actor model
– Support for concurrency and distributed systems
out of the box

• Easy to create robust systems
22/03/2013

Erlang Factory SF Bay 2013

Slide 18 of 46
High Availability/Reliability
• Simple and consistent error recovery and
supervision hierarchies
• Built in fault-tolerance
– Isolation of Actors

• Support for dynamic reconfiguration
– Hot code loading

22/03/2013

Erlang Factory SF Bay 2013

Slide 19 of 46
External Interfaces
• Facilities to interface the Erlang runtime to the
outside world
• Used for device drivers and kernel
abstractions in the embedded domain

22/03/2013

Erlang Factory SF Bay 2013

Slide 20 of 46
External Interfaces

22/03/2013

Erlang Factory SF Bay 2013

Slide 21 of 46
Actor Model
• Proposed in 1973 by Hewitt, Bishop and Steiger
– “Universal primitives for concurrent computation”

• No shared-state, self-contained and atomic
• Building blocks for modular, distributed and
concurrent systems
• Implemented in a variety of programming
languages

22/03/2013

Erlang Factory SF Bay 2013

Slide 22 of 46
Actor Model
• Asynchronous message passing
– Messages kept in a mailbox and processed in the
order they are received in

• Upon receiving messages, actors can:
– Make local decisions and change internal state
– Spawn new actors
– Send messages to other actors

22/03/2013

Erlang Factory SF Bay 2013

Slide 23 of 46
Process Error Handling
• Let it Fail!
– Abstract error handling away from the modules
– Results in leaner modules

• Supervision hierarchies

22/03/2013

Erlang Factory SF Bay 2013

Slide 24 of 46
Propagating Exit Signals
{'EXIT', PidA, Reason}
PidA

PidB

{'EXIT', PidB, Reason}
PidC

22/03/2013

Erlang Factory SF Bay 2013

Slide 25 of 46
Trapping Exits
process_flag(trap_exit, true)

{'EXIT', PidA, Reason}
PidA

PidB

PidC

22/03/2013

Erlang Factory SF Bay 2013

Slide 26 of 46
TI OMAP Reference System

22/03/2013

Erlang Factory SF Bay 2013

Slide 27 of 46
Fine Grain Abstraction
• Advantages
– Application code becomes simpler
– Concise and shorter modules
– Testing becomes easier
– Code re-use (potentially) increases

• Disadvantage
– Architecting fine grain systems is difficult

22/03/2013

Erlang Factory SF Bay 2013

Slide 28 of 46
Limitations of the Actor Model
• No notion of inheritance or general hierarchy
– Specific to language and library implementation

• Asynchronous message passing can be
problematic for certain applications
– Ordering of messages received from multiple
processes
– Abstract definition may lead to inconsistency in
larger systems
• Fine/Coarse Grain argument

22/03/2013

Erlang Factory SF Bay 2013

Slide 29 of 46
Erlang, the Maestro

(flickr/dereckesanches)

22/03/2013

Erlang Factory SF Bay 2013

Slide 30 of 46
Accessing hardware
• Peripherals are memory mapped
• Access via /dev/mem
– Faster, needs root, potentially dangerous!

• Use kernel modules/sysfs
– Slower, doesn’t need root, easier, relatively safer

22/03/2013

Erlang Factory SF Bay 2013

Slide 31 of 46
GPIO Interface (I)
init(Pin, Direction) ->
{ok, FdExport} = file:open("/sys/class/gpio/export", [write]),
file:write(FdExport, integer_to_list(Pin)),
file:close(FdExport),
{ok, FdPinDir} = file:open("/sys/class/gpio/gpio" ++ integer_to_list(Pin)
++ "/direction", [write]),
case Direction of
in -> file:write(FdPinDir, "in");
out -> file:write(FdPinDir, "out")
end,
file:close(FdPinDir),
{ok, FdPinVal} = file:open("/sys/class/gpio/gpio" ++ integer_to_list(Pin)
++ "/value", [read, write]),
FdPinVal.

22/03/2013

Erlang Factory SF Bay 2013

Slide 32 of 46
GPIO Interface (II)
write(Fd, Val) ->
file:position(Fd, 0),
file:write(Fd, integer_to_list(Val)).
read(Fd) ->
file:position(Fd, 0),
{ok, Val} = file:read(Fd, 1),
Val.
release(Pin) ->
{ok, FdUnexport} = file:open("/sys/class/gpio/unexport",
[write]),
file:write(FdUnexport, integer_to_list(Pin)),
file:close(FdUnexport).

22/03/2013

Erlang Factory SF Bay 2013

Slide 33 of 46
Example: GPIO
PidA
PidB

PidC

Pin17

???
22/03/2013

Erlang Factory SF Bay 2013

Slide 34 of 46
Example: GPIO
PidA
PidB

PidC
GPIO
Proxy

Pin17

22/03/2013

Erlang Factory SF Bay 2013

Slide 35 of 46
GPIO Proxy
• Replaces ‘locks’ in traditional sense of
embedded design
– Access control/mutual exclusion

• Can be used to implement safety constraints
– Toggling rate, sequence detection, direction
control, etc.

22/03/2013

Erlang Factory SF Bay 2013

Slide 36 of 46
Concurrency Demo

http://vimeo.com/40769788
22/03/2013

Erlang Factory SF Bay 2013

Slide 37 of 46
Universal Peripheral/Component Modules

22/03/2013

Erlang Factory SF Bay 2013

Slide 38 of 46
Universal Peripheral/Component Modules

22/03/2013

Erlang Factory SF Bay 2013

Slide 39 of 46
Hardware Projects – Ponte

22/03/2013

Erlang Factory SF Bay 2013

Slide 40 of 46
Hardware Projects – Demo Board

22/03/2013

Erlang Factory SF Bay 2013

Slide 41 of 46
Hardware Simulator

22/03/2013

Erlang Factory SF Bay 2013

Slide 42 of 46
Future Explorations
Parallella:

22/03/2013

Erlang Factory SF Bay 2013

Slide 43 of 46
Packages for Embedded Architectures

https://www.erlang-solutions.com/downloads/download-erlang-otp

22/03/2013

Erlang Factory SF Bay 2013

Slide 44 of 46
Erlang Embedded Training Stack
• A complete package for people interested in
developing the next generation of concurrent
and distributed Embedded Systems
• Training Modules:
– Embedded Linux Primer
– Erlang/OTP 101
– Erlang Embedded Framework

Get in touch if you’re interested.
22/03/2013

Erlang Factory SF Bay 2013

Slide 45 of 46
Thank you
• http://erlang-embedded.com
• embedded@erlang-solutions.com
• @ErlangEmbedded

“

The world is concurrent.
Things in the world don't share data.
Things communicate with messages.
Things fail.
- Joe Armstrong
Father of Erlang

22/03/2013

Erlang Factory SF Bay 2013

Slide 46 of 46

More Related Content

What's hot

Synthesizing HDL using LeonardoSpectrum
Synthesizing HDL using LeonardoSpectrumSynthesizing HDL using LeonardoSpectrum
Synthesizing HDL using LeonardoSpectrum
Hossam Hassan
 
A Quick Introduction to Programmable Logic
A Quick Introduction to Programmable LogicA Quick Introduction to Programmable Logic
A Quick Introduction to Programmable Logic
Omer Kilic
 
Design of LDPC Decoder Based On FPGA in Digital Image Watermarking Technology
Design of LDPC Decoder Based On FPGA in Digital Image Watermarking TechnologyDesign of LDPC Decoder Based On FPGA in Digital Image Watermarking Technology
Design of LDPC Decoder Based On FPGA in Digital Image Watermarking Technology
TELKOMNIKA JOURNAL
 
Public Seminar_Final 18112014
Public Seminar_Final 18112014Public Seminar_Final 18112014
Public Seminar_Final 18112014
Hossam Hassan
 
Developing an embedded video application on dual Linux + FPGA architecture
Developing an embedded video application on dual Linux + FPGA architectureDeveloping an embedded video application on dual Linux + FPGA architecture
Developing an embedded video application on dual Linux + FPGA architecture
Christian Charreyre
 
Electronic Design Automation
Electronic Design AutomationElectronic Design Automation
Electronic Design Automation
CADD Centre
 
Introduction to fpga synthesis tools
Introduction to fpga synthesis toolsIntroduction to fpga synthesis tools
Introduction to fpga synthesis tools
Hossam Hassan
 
Intel galileo
Intel galileoIntel galileo
Intel galileo
Sofian Hadiwijaya
 
Introduction to FPGA, VHDL
Introduction to FPGA, VHDL  Introduction to FPGA, VHDL
Introduction to FPGA, VHDL
Amr Rashed
 
Introduction to EDA Tools
Introduction to EDA ToolsIntroduction to EDA Tools
Introduction to EDA Tools
venkatasuman1983
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
Codemotion
 
SoC FPGA Technology
SoC FPGA TechnologySoC FPGA Technology
SoC FPGA Technology
Siraj Muhammad
 
OliverStoneSWResume2015-05
OliverStoneSWResume2015-05OliverStoneSWResume2015-05
OliverStoneSWResume2015-05
Oliver Stone
 
Introduction to intel galileo board gen2
Introduction to intel galileo board gen2Introduction to intel galileo board gen2
Introduction to intel galileo board gen2
Harshit Srivastava
 
FPGA/Reconfigurable computing (HPRC)
FPGA/Reconfigurable computing (HPRC)FPGA/Reconfigurable computing (HPRC)
FPGA/Reconfigurable computing (HPRC)
rinnocente
 
Automatic generation of platform architectures using open cl and fpga roadmap
Automatic generation of platform architectures using open cl and fpga roadmapAutomatic generation of platform architectures using open cl and fpga roadmap
Automatic generation of platform architectures using open cl and fpga roadmap
Manolis Vavalis
 
Overview of the Intel® Internet of Things Developer Kit
Overview of the Intel® Internet of Things Developer KitOverview of the Intel® Internet of Things Developer Kit
Overview of the Intel® Internet of Things Developer Kit
Intel® Software
 
OliverStoneResume2015-2
OliverStoneResume2015-2OliverStoneResume2015-2
OliverStoneResume2015-2
Oliver Stone
 
Development of Signal Processing Algorithms using OpenCL for FPGA based Archi...
Development of Signal Processing Algorithms using OpenCL for FPGA based Archi...Development of Signal Processing Algorithms using OpenCL for FPGA based Archi...
Development of Signal Processing Algorithms using OpenCL for FPGA based Archi...
Pradeep Singh
 
Software hardware co-design using xilinx zynq soc
Software hardware co-design using xilinx zynq socSoftware hardware co-design using xilinx zynq soc
Software hardware co-design using xilinx zynq soc
Hossam Hassan
 

What's hot (20)

Synthesizing HDL using LeonardoSpectrum
Synthesizing HDL using LeonardoSpectrumSynthesizing HDL using LeonardoSpectrum
Synthesizing HDL using LeonardoSpectrum
 
A Quick Introduction to Programmable Logic
A Quick Introduction to Programmable LogicA Quick Introduction to Programmable Logic
A Quick Introduction to Programmable Logic
 
Design of LDPC Decoder Based On FPGA in Digital Image Watermarking Technology
Design of LDPC Decoder Based On FPGA in Digital Image Watermarking TechnologyDesign of LDPC Decoder Based On FPGA in Digital Image Watermarking Technology
Design of LDPC Decoder Based On FPGA in Digital Image Watermarking Technology
 
Public Seminar_Final 18112014
Public Seminar_Final 18112014Public Seminar_Final 18112014
Public Seminar_Final 18112014
 
Developing an embedded video application on dual Linux + FPGA architecture
Developing an embedded video application on dual Linux + FPGA architectureDeveloping an embedded video application on dual Linux + FPGA architecture
Developing an embedded video application on dual Linux + FPGA architecture
 
Electronic Design Automation
Electronic Design AutomationElectronic Design Automation
Electronic Design Automation
 
Introduction to fpga synthesis tools
Introduction to fpga synthesis toolsIntroduction to fpga synthesis tools
Introduction to fpga synthesis tools
 
Intel galileo
Intel galileoIntel galileo
Intel galileo
 
Introduction to FPGA, VHDL
Introduction to FPGA, VHDL  Introduction to FPGA, VHDL
Introduction to FPGA, VHDL
 
Introduction to EDA Tools
Introduction to EDA ToolsIntroduction to EDA Tools
Introduction to EDA Tools
 
Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!Lab Handson: Power your Creations with Intel Edison!
Lab Handson: Power your Creations with Intel Edison!
 
SoC FPGA Technology
SoC FPGA TechnologySoC FPGA Technology
SoC FPGA Technology
 
OliverStoneSWResume2015-05
OliverStoneSWResume2015-05OliverStoneSWResume2015-05
OliverStoneSWResume2015-05
 
Introduction to intel galileo board gen2
Introduction to intel galileo board gen2Introduction to intel galileo board gen2
Introduction to intel galileo board gen2
 
FPGA/Reconfigurable computing (HPRC)
FPGA/Reconfigurable computing (HPRC)FPGA/Reconfigurable computing (HPRC)
FPGA/Reconfigurable computing (HPRC)
 
Automatic generation of platform architectures using open cl and fpga roadmap
Automatic generation of platform architectures using open cl and fpga roadmapAutomatic generation of platform architectures using open cl and fpga roadmap
Automatic generation of platform architectures using open cl and fpga roadmap
 
Overview of the Intel® Internet of Things Developer Kit
Overview of the Intel® Internet of Things Developer KitOverview of the Intel® Internet of Things Developer Kit
Overview of the Intel® Internet of Things Developer Kit
 
OliverStoneResume2015-2
OliverStoneResume2015-2OliverStoneResume2015-2
OliverStoneResume2015-2
 
Development of Signal Processing Algorithms using OpenCL for FPGA based Archi...
Development of Signal Processing Algorithms using OpenCL for FPGA based Archi...Development of Signal Processing Algorithms using OpenCL for FPGA based Archi...
Development of Signal Processing Algorithms using OpenCL for FPGA based Archi...
 
Software hardware co-design using xilinx zynq soc
Software hardware co-design using xilinx zynq socSoftware hardware co-design using xilinx zynq soc
Software hardware co-design using xilinx zynq soc
 

Similar to Taking Back Embedded: The Erlang Embedded Framework

TRACK F: OpenCL for ALTERA FPGAs, Accelerating performance and design product...
TRACK F: OpenCL for ALTERA FPGAs, Accelerating performance and design product...TRACK F: OpenCL for ALTERA FPGAs, Accelerating performance and design product...
TRACK F: OpenCL for ALTERA FPGAs, Accelerating performance and design product...
chiportal
 
Postgres Vision 2018: Will Postgres Live Forever?
Postgres Vision 2018: Will Postgres Live Forever?Postgres Vision 2018: Will Postgres Live Forever?
Postgres Vision 2018: Will Postgres Live Forever?
EDB
 
PGDay.Amsterdam 2018 - Bruce Momjian - Will postgres live forever
PGDay.Amsterdam 2018 - Bruce Momjian - Will postgres live foreverPGDay.Amsterdam 2018 - Bruce Momjian - Will postgres live forever
PGDay.Amsterdam 2018 - Bruce Momjian - Will postgres live forever
PGDay.Amsterdam
 
Community works for muli core embedded image processing
Community works for muli core embedded image processingCommunity works for muli core embedded image processing
Community works for muli core embedded image processing
Jeongpyo Kong
 
FPGAs memory synchronization and performance evaluation using the open compu...
FPGAs memory synchronization and performance evaluation  using the open compu...FPGAs memory synchronization and performance evaluation  using the open compu...
FPGAs memory synchronization and performance evaluation using the open compu...
International Journal of Reconfigurable and Embedded Systems
 
Mind your App Footprint 🐾⚡️🌱 (@FlutterConn 2023)
Mind your App Footprint 🐾⚡️🌱 (@FlutterConn 2023)Mind your App Footprint 🐾⚡️🌱 (@FlutterConn 2023)
Mind your App Footprint 🐾⚡️🌱 (@FlutterConn 2023)
François
 
Tech Days 2015: ARM Programming with GNAT and Ada 2012
Tech Days 2015: ARM Programming with GNAT and Ada 2012Tech Days 2015: ARM Programming with GNAT and Ada 2012
Tech Days 2015: ARM Programming with GNAT and Ada 2012
AdaCore
 
Modernisation of legacy PHP applications using Symfony2 - PHP Northeast Confe...
Modernisation of legacy PHP applications using Symfony2 - PHP Northeast Confe...Modernisation of legacy PHP applications using Symfony2 - PHP Northeast Confe...
Modernisation of legacy PHP applications using Symfony2 - PHP Northeast Confe...
Fabrice Bernhard
 
L12_PROGRAMMABLE+LOGIC+DEVICES+(PLD).ppt
L12_PROGRAMMABLE+LOGIC+DEVICES+(PLD).pptL12_PROGRAMMABLE+LOGIC+DEVICES+(PLD).ppt
L12_PROGRAMMABLE+LOGIC+DEVICES+(PLD).ppt
MikeTango5
 
SFO15-210: Kernel Mainline Status of Mobile Chipsets
SFO15-210: Kernel Mainline Status of Mobile ChipsetsSFO15-210: Kernel Mainline Status of Mobile Chipsets
SFO15-210: Kernel Mainline Status of Mobile Chipsets
Linaro
 
L12 programmable+logic+devices+(pld)
L12 programmable+logic+devices+(pld)L12 programmable+logic+devices+(pld)
L12 programmable+logic+devices+(pld)
NAGASAI547
 
ProjectVault[VivekKumar_CS-C_6Sem_MIT].pptx
ProjectVault[VivekKumar_CS-C_6Sem_MIT].pptxProjectVault[VivekKumar_CS-C_6Sem_MIT].pptx
ProjectVault[VivekKumar_CS-C_6Sem_MIT].pptx
Vivek Kumar
 
Introduction to Murasaki
Introduction to MurasakiIntroduction to Murasaki
Introduction to Murasaki
Seiichi Horie
 
Keeping IoT stack in quality check - meetup IoT Under Test
Keeping IoT stack in quality check  - meetup IoT Under TestKeeping IoT stack in quality check  - meetup IoT Under Test
Keeping IoT stack in quality check - meetup IoT Under Test
Silvair
 
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
ArangoDB Database
 
FutureGrid Computing Testbed as a Service
 FutureGrid Computing Testbed as a Service FutureGrid Computing Testbed as a Service
FutureGrid Computing Testbed as a Service
Geoffrey Fox
 
CPLD & FPGA
CPLD & FPGACPLD & FPGA
Rock Overview
Rock OverviewRock Overview
Rock Overview
Sylvain Joyeux
 
[scala.by] Launching new application fast
[scala.by] Launching new application fast[scala.by] Launching new application fast
[scala.by] Launching new application fast
Denis Karpenko
 
Christopher_Reder_2016
Christopher_Reder_2016Christopher_Reder_2016
Christopher_Reder_2016
Christopher Reder
 

Similar to Taking Back Embedded: The Erlang Embedded Framework (20)

TRACK F: OpenCL for ALTERA FPGAs, Accelerating performance and design product...
TRACK F: OpenCL for ALTERA FPGAs, Accelerating performance and design product...TRACK F: OpenCL for ALTERA FPGAs, Accelerating performance and design product...
TRACK F: OpenCL for ALTERA FPGAs, Accelerating performance and design product...
 
Postgres Vision 2018: Will Postgres Live Forever?
Postgres Vision 2018: Will Postgres Live Forever?Postgres Vision 2018: Will Postgres Live Forever?
Postgres Vision 2018: Will Postgres Live Forever?
 
PGDay.Amsterdam 2018 - Bruce Momjian - Will postgres live forever
PGDay.Amsterdam 2018 - Bruce Momjian - Will postgres live foreverPGDay.Amsterdam 2018 - Bruce Momjian - Will postgres live forever
PGDay.Amsterdam 2018 - Bruce Momjian - Will postgres live forever
 
Community works for muli core embedded image processing
Community works for muli core embedded image processingCommunity works for muli core embedded image processing
Community works for muli core embedded image processing
 
FPGAs memory synchronization and performance evaluation using the open compu...
FPGAs memory synchronization and performance evaluation  using the open compu...FPGAs memory synchronization and performance evaluation  using the open compu...
FPGAs memory synchronization and performance evaluation using the open compu...
 
Mind your App Footprint 🐾⚡️🌱 (@FlutterConn 2023)
Mind your App Footprint 🐾⚡️🌱 (@FlutterConn 2023)Mind your App Footprint 🐾⚡️🌱 (@FlutterConn 2023)
Mind your App Footprint 🐾⚡️🌱 (@FlutterConn 2023)
 
Tech Days 2015: ARM Programming with GNAT and Ada 2012
Tech Days 2015: ARM Programming with GNAT and Ada 2012Tech Days 2015: ARM Programming with GNAT and Ada 2012
Tech Days 2015: ARM Programming with GNAT and Ada 2012
 
Modernisation of legacy PHP applications using Symfony2 - PHP Northeast Confe...
Modernisation of legacy PHP applications using Symfony2 - PHP Northeast Confe...Modernisation of legacy PHP applications using Symfony2 - PHP Northeast Confe...
Modernisation of legacy PHP applications using Symfony2 - PHP Northeast Confe...
 
L12_PROGRAMMABLE+LOGIC+DEVICES+(PLD).ppt
L12_PROGRAMMABLE+LOGIC+DEVICES+(PLD).pptL12_PROGRAMMABLE+LOGIC+DEVICES+(PLD).ppt
L12_PROGRAMMABLE+LOGIC+DEVICES+(PLD).ppt
 
SFO15-210: Kernel Mainline Status of Mobile Chipsets
SFO15-210: Kernel Mainline Status of Mobile ChipsetsSFO15-210: Kernel Mainline Status of Mobile Chipsets
SFO15-210: Kernel Mainline Status of Mobile Chipsets
 
L12 programmable+logic+devices+(pld)
L12 programmable+logic+devices+(pld)L12 programmable+logic+devices+(pld)
L12 programmable+logic+devices+(pld)
 
ProjectVault[VivekKumar_CS-C_6Sem_MIT].pptx
ProjectVault[VivekKumar_CS-C_6Sem_MIT].pptxProjectVault[VivekKumar_CS-C_6Sem_MIT].pptx
ProjectVault[VivekKumar_CS-C_6Sem_MIT].pptx
 
Introduction to Murasaki
Introduction to MurasakiIntroduction to Murasaki
Introduction to Murasaki
 
Keeping IoT stack in quality check - meetup IoT Under Test
Keeping IoT stack in quality check  - meetup IoT Under TestKeeping IoT stack in quality check  - meetup IoT Under Test
Keeping IoT stack in quality check - meetup IoT Under Test
 
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
gVisor, Kata Containers, Firecracker, Docker: Who is Who in the Container Space?
 
FutureGrid Computing Testbed as a Service
 FutureGrid Computing Testbed as a Service FutureGrid Computing Testbed as a Service
FutureGrid Computing Testbed as a Service
 
CPLD & FPGA
CPLD & FPGACPLD & FPGA
CPLD & FPGA
 
Rock Overview
Rock OverviewRock Overview
Rock Overview
 
[scala.by] Launching new application fast
[scala.by] Launching new application fast[scala.by] Launching new application fast
[scala.by] Launching new application fast
 
Christopher_Reder_2016
Christopher_Reder_2016Christopher_Reder_2016
Christopher_Reder_2016
 

More from Omer Kilic

Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems
Bare Metal from a Hardware Perspective: Embedded Frameworks & Build SystemsBare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems
Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems
Omer Kilic
 
Gearing up for Volume Manufacturing
Gearing up for Volume ManufacturingGearing up for Volume Manufacturing
Gearing up for Volume Manufacturing
Omer Kilic
 
The Process of Shipping Hardware Products
The Process of Shipping Hardware ProductsThe Process of Shipping Hardware Products
The Process of Shipping Hardware Products
Omer Kilic
 
Confusion of Things — The IoT Hardware Kerfuffle
Confusion of Things — The IoT Hardware KerfuffleConfusion of Things — The IoT Hardware Kerfuffle
Confusion of Things — The IoT Hardware Kerfuffle
Omer Kilic
 
Fast and Furious: Overclocking chips for fun and profit
Fast and Furious: Overclocking chips for fun and profitFast and Furious: Overclocking chips for fun and profit
Fast and Furious: Overclocking chips for fun and profit
Omer Kilic
 
concurrency.cc OSHUG #3
concurrency.cc OSHUG #3concurrency.cc OSHUG #3
concurrency.cc OSHUG #3
Omer Kilic
 
BURO Arduino Workshop
BURO Arduino WorkshopBURO Arduino Workshop
BURO Arduino Workshop
Omer Kilic
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
Omer Kilic
 
Interfacing with Arduino
Interfacing with ArduinoInterfacing with Arduino
Interfacing with Arduino
Omer Kilic
 
Introduction to XMOS Software Defined Silicon Technology
Introduction to XMOS Software Defined Silicon TechnologyIntroduction to XMOS Software Defined Silicon Technology
Introduction to XMOS Software Defined Silicon Technology
Omer Kilic
 
TinkerSoc Electronics 101
TinkerSoc Electronics 101TinkerSoc Electronics 101
TinkerSoc Electronics 101
Omer Kilic
 
Beer Bottle Night Lamp
Beer Bottle Night LampBeer Bottle Night Lamp
Beer Bottle Night Lamp
Omer Kilic
 

More from Omer Kilic (12)

Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems
Bare Metal from a Hardware Perspective: Embedded Frameworks & Build SystemsBare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems
Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems
 
Gearing up for Volume Manufacturing
Gearing up for Volume ManufacturingGearing up for Volume Manufacturing
Gearing up for Volume Manufacturing
 
The Process of Shipping Hardware Products
The Process of Shipping Hardware ProductsThe Process of Shipping Hardware Products
The Process of Shipping Hardware Products
 
Confusion of Things — The IoT Hardware Kerfuffle
Confusion of Things — The IoT Hardware KerfuffleConfusion of Things — The IoT Hardware Kerfuffle
Confusion of Things — The IoT Hardware Kerfuffle
 
Fast and Furious: Overclocking chips for fun and profit
Fast and Furious: Overclocking chips for fun and profitFast and Furious: Overclocking chips for fun and profit
Fast and Furious: Overclocking chips for fun and profit
 
concurrency.cc OSHUG #3
concurrency.cc OSHUG #3concurrency.cc OSHUG #3
concurrency.cc OSHUG #3
 
BURO Arduino Workshop
BURO Arduino WorkshopBURO Arduino Workshop
BURO Arduino Workshop
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to Arduino
 
Interfacing with Arduino
Interfacing with ArduinoInterfacing with Arduino
Interfacing with Arduino
 
Introduction to XMOS Software Defined Silicon Technology
Introduction to XMOS Software Defined Silicon TechnologyIntroduction to XMOS Software Defined Silicon Technology
Introduction to XMOS Software Defined Silicon Technology
 
TinkerSoc Electronics 101
TinkerSoc Electronics 101TinkerSoc Electronics 101
TinkerSoc Electronics 101
 
Beer Bottle Night Lamp
Beer Bottle Night LampBeer Bottle Night Lamp
Beer Bottle Night Lamp
 

Recently uploaded

UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
DianaGray10
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
Quotidiano Piemontese
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
Neo4j
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Speck&Tech
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
SOFTTECHHUB
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems S.M.S.A.
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
Tomaz Bratanic
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
Edge AI and Vision Alliance
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
Neo4j
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Malak Abu Hammad
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
shyamraj55
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
SOFTTECHHUB
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
Neo4j
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
Kari Kakkonen
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Safe Software
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
DianaGray10
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
Kumud Singh
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
Mariano Tinti
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
Alpen-Adria-Universität
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
Matthew Sinclair
 

Recently uploaded (20)

UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6UiPath Test Automation using UiPath Test Suite series, part 6
UiPath Test Automation using UiPath Test Suite series, part 6
 
National Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practicesNational Security Agency - NSA mobile device best practices
National Security Agency - NSA mobile device best practices
 
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
GraphSummit Singapore | The Future of Agility: Supercharging Digital Transfor...
 
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
Cosa hanno in comune un mattoncino Lego e la backdoor XZ?
 
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
Goodbye Windows 11: Make Way for Nitrux Linux 3.5.0!
 
Uni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdfUni Systems Copilot event_05062024_C.Vlachos.pdf
Uni Systems Copilot event_05062024_C.Vlachos.pdf
 
GraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracyGraphRAG for Life Science to increase LLM accuracy
GraphRAG for Life Science to increase LLM accuracy
 
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
“Building and Scaling AI Applications with the Nx AI Manager,” a Presentation...
 
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024GraphSummit Singapore | The Art of the  Possible with Graph - Q2 2024
GraphSummit Singapore | The Art of the Possible with Graph - Q2 2024
 
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdfUnlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
Unlock the Future of Search with MongoDB Atlas_ Vector Search Unleashed.pdf
 
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with SlackLet's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
Let's Integrate MuleSoft RPA, COMPOSER, APM with AWS IDP along with Slack
 
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
Why You Should Replace Windows 11 with Nitrux Linux 3.5.0 for enhanced perfor...
 
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
GraphSummit Singapore | Graphing Success: Revolutionising Organisational Stru...
 
Climate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing DaysClimate Impact of Software Testing at Nordic Testing Days
Climate Impact of Software Testing at Nordic Testing Days
 
Driving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success StoryDriving Business Innovation: Latest Generative AI Advancements & Success Story
Driving Business Innovation: Latest Generative AI Advancements & Success Story
 
Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1Communications Mining Series - Zero to Hero - Session 1
Communications Mining Series - Zero to Hero - Session 1
 
Mind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AIMind map of terminologies used in context of Generative AI
Mind map of terminologies used in context of Generative AI
 
Mariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceXMariano G Tinti - Decoding SpaceX
Mariano G Tinti - Decoding SpaceX
 
Video Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the FutureVideo Streaming: Then, Now, and in the Future
Video Streaming: Then, Now, and in the Future
 
20240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 202420240609 QFM020 Irresponsible AI Reading List May 2024
20240609 QFM020 Irresponsible AI Reading List May 2024
 

Taking Back Embedded: The Erlang Embedded Framework

  • 1. Taking Back Embedded The Erlang Embedded Project Omer Kilic || @OmerK omer@erlang-solutions.com
  • 2. Outline • • • • • • Current state of Embedded Systems Overview of Erlang and the Actor Model Modelling and developing systems using Erlang The Erlang Embedded Project Future Explorations Q&A 22/03/2013 Erlang Factory SF Bay 2013 Slide 2 of 46
  • 3. Embedded Systems “ An embedded system is a computer system designed for specific control functions within a larger system, often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical parts. By contrast, a general-purpose computer, such as a personal computer (PC), is designed to be flexible and to meet a wide range of end-user needs. - Infinite Wisdom of Wikipedia 22/03/2013 Erlang Factory SF Bay 2013 Slide 3 of 46
  • 4. Embedded Systems • Specific functions • Designed for a particular application 22/03/2013 Erlang Factory SF Bay 2013 • General purpose • Can be used for pretty much any computing needs Slide 4 of 46
  • 5. Current Challenges • Complex SoC platforms • “Internet of Things” – Connected and distributed systems • Multicore and/or heterogeneous devices • Time to market constraints – The Kickstarter Era – Rapid prototyping – Maker Culture 22/03/2013 Erlang Factory SF Bay 2013 Slide 5 of 46
  • 6. Internet of Things 22/03/2013 Erlang Factory SF Bay 2013 Slide 6 of 46
  • 7. Internet of Fridges? 22/03/2013 Erlang Factory SF Bay 2013 Slide 7 of 46
  • 8. Distributed Bovine Networks? 22/03/2013 Erlang Factory SF Bay 2013 Slide 8 of 46
  • 9. Exciting times 22/03/2013 Erlang Factory SF Bay 2013 Slide 9 of 46
  • 10. TI OMAP Reference System 22/03/2013 Erlang Factory SF Bay 2013 Slide 10 of 46
  • 11. Samsung Exynos Reference System 22/03/2013 Erlang Factory SF Bay 2013 Slide 11 of 46
  • 13. Embedded Systems • Bare Metal – No underlying OS or high level abstractions • RTOS – Minimal interrupt and switching latency, scheduling guarantees, minimal jitter • Embedded Linux – Slimmed down Linux with hardware interfaces 22/03/2013 Erlang Factory SF Bay 2013 Slide 13 of 46
  • 14. RTOS Concepts • Notion of “tasks” • OS-supervised interprocess messaging – Shared memory • Mutexes/Semaphores/Locks • Scheduling – Pre-emptive: event driven – Round-robin: time multiplexed 22/03/2013 Erlang Factory SF Bay 2013 Slide 14 of 46
  • 15. Embedded Linux • Not a new concept, increased popularity due to abundant supply of cheap boards – Raspberry Pi, Beagleboard/Beaglebone, Gumstix et al. • Familiar set of tools for software developers, new territory for embedded engineers – No direct mapping for RTOS concepts, especially tasks • Complex device driver framework – Here be dragons 22/03/2013 Erlang Factory SF Bay 2013 Slide 15 of 46
  • 16. Erlang Embedded • Knowledge Transfer Partnership between Erlang Solutions and University of Kent – Aim of the project: Bring the benefits of concurrent systems development using Erlang to the field of embedded systems; through investigation, analysis, software development and evaluation. http://erlang-embedded.com 22/03/2013 Erlang Factory SF Bay 2013 Slide 16 of 46
  • 17. Erlang? (I) {declarative, functional, concurrent, parallel, garbagecollected, soft real-time, fault-tolerant, robust, portable, distributed message-passing, hot code loading} 22/03/2013 Erlang Factory SF Bay 2013 Slide 17 of 46
  • 18. Erlang? (II) • First version developed in 1986 – Open-sourced in 1998. • Battle-tested at Ericsson and many other companies – Originally designed for Embedded Systems! • Implements the Actor model – Support for concurrency and distributed systems out of the box • Easy to create robust systems 22/03/2013 Erlang Factory SF Bay 2013 Slide 18 of 46
  • 19. High Availability/Reliability • Simple and consistent error recovery and supervision hierarchies • Built in fault-tolerance – Isolation of Actors • Support for dynamic reconfiguration – Hot code loading 22/03/2013 Erlang Factory SF Bay 2013 Slide 19 of 46
  • 20. External Interfaces • Facilities to interface the Erlang runtime to the outside world • Used for device drivers and kernel abstractions in the embedded domain 22/03/2013 Erlang Factory SF Bay 2013 Slide 20 of 46
  • 21. External Interfaces 22/03/2013 Erlang Factory SF Bay 2013 Slide 21 of 46
  • 22. Actor Model • Proposed in 1973 by Hewitt, Bishop and Steiger – “Universal primitives for concurrent computation” • No shared-state, self-contained and atomic • Building blocks for modular, distributed and concurrent systems • Implemented in a variety of programming languages 22/03/2013 Erlang Factory SF Bay 2013 Slide 22 of 46
  • 23. Actor Model • Asynchronous message passing – Messages kept in a mailbox and processed in the order they are received in • Upon receiving messages, actors can: – Make local decisions and change internal state – Spawn new actors – Send messages to other actors 22/03/2013 Erlang Factory SF Bay 2013 Slide 23 of 46
  • 24. Process Error Handling • Let it Fail! – Abstract error handling away from the modules – Results in leaner modules • Supervision hierarchies 22/03/2013 Erlang Factory SF Bay 2013 Slide 24 of 46
  • 25. Propagating Exit Signals {'EXIT', PidA, Reason} PidA PidB {'EXIT', PidB, Reason} PidC 22/03/2013 Erlang Factory SF Bay 2013 Slide 25 of 46
  • 26. Trapping Exits process_flag(trap_exit, true) {'EXIT', PidA, Reason} PidA PidB PidC 22/03/2013 Erlang Factory SF Bay 2013 Slide 26 of 46
  • 27. TI OMAP Reference System 22/03/2013 Erlang Factory SF Bay 2013 Slide 27 of 46
  • 28. Fine Grain Abstraction • Advantages – Application code becomes simpler – Concise and shorter modules – Testing becomes easier – Code re-use (potentially) increases • Disadvantage – Architecting fine grain systems is difficult 22/03/2013 Erlang Factory SF Bay 2013 Slide 28 of 46
  • 29. Limitations of the Actor Model • No notion of inheritance or general hierarchy – Specific to language and library implementation • Asynchronous message passing can be problematic for certain applications – Ordering of messages received from multiple processes – Abstract definition may lead to inconsistency in larger systems • Fine/Coarse Grain argument 22/03/2013 Erlang Factory SF Bay 2013 Slide 29 of 46
  • 31. Accessing hardware • Peripherals are memory mapped • Access via /dev/mem – Faster, needs root, potentially dangerous! • Use kernel modules/sysfs – Slower, doesn’t need root, easier, relatively safer 22/03/2013 Erlang Factory SF Bay 2013 Slide 31 of 46
  • 32. GPIO Interface (I) init(Pin, Direction) -> {ok, FdExport} = file:open("/sys/class/gpio/export", [write]), file:write(FdExport, integer_to_list(Pin)), file:close(FdExport), {ok, FdPinDir} = file:open("/sys/class/gpio/gpio" ++ integer_to_list(Pin) ++ "/direction", [write]), case Direction of in -> file:write(FdPinDir, "in"); out -> file:write(FdPinDir, "out") end, file:close(FdPinDir), {ok, FdPinVal} = file:open("/sys/class/gpio/gpio" ++ integer_to_list(Pin) ++ "/value", [read, write]), FdPinVal. 22/03/2013 Erlang Factory SF Bay 2013 Slide 32 of 46
  • 33. GPIO Interface (II) write(Fd, Val) -> file:position(Fd, 0), file:write(Fd, integer_to_list(Val)). read(Fd) -> file:position(Fd, 0), {ok, Val} = file:read(Fd, 1), Val. release(Pin) -> {ok, FdUnexport} = file:open("/sys/class/gpio/unexport", [write]), file:write(FdUnexport, integer_to_list(Pin)), file:close(FdUnexport). 22/03/2013 Erlang Factory SF Bay 2013 Slide 33 of 46
  • 36. GPIO Proxy • Replaces ‘locks’ in traditional sense of embedded design – Access control/mutual exclusion • Can be used to implement safety constraints – Toggling rate, sequence detection, direction control, etc. 22/03/2013 Erlang Factory SF Bay 2013 Slide 36 of 46
  • 38. Universal Peripheral/Component Modules 22/03/2013 Erlang Factory SF Bay 2013 Slide 38 of 46
  • 39. Universal Peripheral/Component Modules 22/03/2013 Erlang Factory SF Bay 2013 Slide 39 of 46
  • 40. Hardware Projects – Ponte 22/03/2013 Erlang Factory SF Bay 2013 Slide 40 of 46
  • 41. Hardware Projects – Demo Board 22/03/2013 Erlang Factory SF Bay 2013 Slide 41 of 46
  • 42. Hardware Simulator 22/03/2013 Erlang Factory SF Bay 2013 Slide 42 of 46
  • 44. Packages for Embedded Architectures https://www.erlang-solutions.com/downloads/download-erlang-otp 22/03/2013 Erlang Factory SF Bay 2013 Slide 44 of 46
  • 45. Erlang Embedded Training Stack • A complete package for people interested in developing the next generation of concurrent and distributed Embedded Systems • Training Modules: – Embedded Linux Primer – Erlang/OTP 101 – Erlang Embedded Framework Get in touch if you’re interested. 22/03/2013 Erlang Factory SF Bay 2013 Slide 45 of 46
  • 46. Thank you • http://erlang-embedded.com • embedded@erlang-solutions.com • @ErlangEmbedded “ The world is concurrent. Things in the world don't share data. Things communicate with messages. Things fail. - Joe Armstrong Father of Erlang 22/03/2013 Erlang Factory SF Bay 2013 Slide 46 of 46