SlideShare a Scribd company logo
1 of 33
Download to read offline
“Bare Metal” from a
hardware perspective
Embedded Frameworks and Build Systems
Omer Kilic
Code Mesh LDN 2019
#CodeMeshLDN
omer.kilic.name
@OmerK
#CodeMeshLDN
Agenda
• Bare Metal?
• Outdated term? Overloaded term!
• How do we actually run things these days?
• CPU Arch 101
• A new definition?
• Embedded Systems (i.e: Small Devices)
• Different classes of devices
• Software stacks/build frameworks
• “Not just C”
• The One True Bare Metal™
#CodeMeshLDN
In computer science, bare machine (or bare metal) refers to a
computer executing instructions directly on logic hardware without an
intervening operating system.
#CodeMeshLDN
define: “bare metal”
Bare Metal
• New definition, based on:
• Environment?
• Infrastructure?
• Programming language?
• Size of the device?
#CodeMeshLDN
Environment?
Hardware
Application
“True Bare Metal”
Hardware
OS
Application
“Bare-ish Metal”
Hardware
OS
Runtime
Application
“Bare Metal, 2010s style”
Hardware
VM
Environment?
OS
Runtime
Application
Hardware
VM
OS
Runtime
Application
VM
OS
Container
Runtime App
Container
Runtime App
VM
OS
Container
Runtime App
Container
Runtime App
“Turtles”
aka: (╯°□°)╯︵ ┻━┻
“Cloud-y Bare Metal”
Hardware
OS
Container
Runtime App
Container
Runtime App
Container
Runtime App
Container
Runtime App
“Bare Metal: Containers Edition”
Infra?
“Old School”
Physical servers, datacentres, etc
“Cloud Era”
Virtualisation, IaaS, PaaS, SaaS
“Bare Metal Cloud” or
“Bare Metal as a Service”
¯_(ツ)_/¯
#CodeMeshLDN
Programming Language?
• Compiled
int main(){
printf(“Hello, World”);
} Compiler
Machine
code
print(“Hello, world”)
Interpreter
“Hello,
world”
Machine
code
“Hello,
world”
#CodeMeshLDN
• Interpreted
C to Assembly
$ cat test.c
int add(int a, int b)
{
return a + b;
}
$ gcc test.c –S –o test.s
#CodeMeshLDN
$ cat test.s
(...)
add:
.LFB0:
pushq %rbp
movq %rsp, %rbp
movl %edi, -4(%rbp)
movl %esi, -8(%rbp)
movl -4(%rbp), %edx
movl -8(%rbp), %eax
addl %edx, %eax
popq %rbp
ret
#CodeMeshLDN
https://twitter.com/themadstephan/status/1129087108025638913
Bare Metal?!
#CodeMeshLDN
Bare Metal = Dedicated servers?
• Containers vs Virtualization
• Remember the “Turtles” model?
• IaaS is actually PaaS, Bare Metal is the True™ IaaS?
• Feels like “dedicated servers with a provisioning/control API similar to
any other cloud offering”
• Faster/easier than talking to DC to provision a dedicated box?
• Less human interaction?
#CodeMeshLDN
Bare Metal = Small devices?
#CodeMeshLDN
Embedded Systems
“An embedded system is a controller with a dedicated function within a larger
mechanical or electrical system, often with real-time computing constraints. It is
embedded as part of a complete device often including hardware and mechanical
part”
#CodeMeshLDN
Home Gateway / “WiFi Router”
• Powerful enough to run Linux
• Several hundred MHz CPU, >16MB RAM, >4MB
FLASH
• Not wildly different compared to your Linux box
• 32/64-bit CPU, traditionally MIPS and more commonly
ARM cores
• Obvious resource constraints and different I/O
• Cross-compiler/Linux image is the SDK
• Once you have Linux, you can pretty much do
whatever you want, FLASH size permitting.
#CodeMeshLDN
#CodeMeshLDN
Embedded Frameworks/Build Systems
#CodeMeshLDN
• Provides a foundation for you to build your applications on
• Linux (+BSP), Specific drivers/device-trees, patches, “blobs”, …
• Notion of “packages”, not too different than the usual Linux packages
(deb/rpm/etc)
• Dependency management, most common programming languages/VMs
already supported
#CodeMeshLDN
#CodeMeshLDN
Special Mention: Nerves Project
• BEAM (Erlang/Elixir) on Linux (buildroot), very active community and
good platform support
• https://nerves-project.org/
#CodeMeshLDN
Smart Lightbulb
• RTOS or bare-metal
• <200 MHz CPU, <1MB RAM, <512KB FLASH
• 16-32 bit CPU
• Obscure cores around, newer chips use ARM
cores
• Some form of radio and standard
peripherals
• WiFi/Zigbee/Bluetooth
• GPIO, ADC, I2C, SPI, etc
#CodeMeshLDN
#CodeMeshLDN
Software Options
• Common path: RTOS provided by the vendor
• Alternatives
• Interpreted
• Micropython – Python (surprise!)
• Espruino – Javascript
• MicroEJ – Java
• NodeMCU – Lua
• AtomVM – Erlang/Elixir
• …
• Compiled
• Nim – https://github.com/clj/nim-esp8266-sdk
• Rust – https://dentrassi.de/2019/06/16/rust-on-the-esp-and-how-to-get-started/
• …
#CodeMeshLDN
Special mention: Nim (on esp8266)
• A statically typed compiled systems programming language.
• Generates native dependency-free executables, not dependent on a virtual
machine
• Sane memory management, compile-time checks
• various backends: it compiles to C, C++ or JavaScript
• Lots of good ideas for embedded systems!
• https://github.com/clj/nim-esp8266-sdk
• https://github.com/clj/nim-esp8266-vagrant
Special mention: GRiSP
• BEAM (Erlang/Elixir) on RTEMS (RTOS)
• Bare-ish metal ʘ‿ʘ
• Commercial/industrial focus
• https://grisp.org
#CodeMeshLDN
Really Small™ Devices
• Extremely resource constrained
• Few MHz CPU, few KB RAM, few KB FLASH
• May not have any FLASH at all (OTP, Mask ROM)
• May even be an ASIC!
• 4/8/16-bit CPUs
• Here be dragons, potentially. Cost is key!
• 32 bit becoming more popular
• C compiler and a few application examples
considered the “SDK”
• Not just C/ASM!
• TinyGo: Go on really small devices
• Concurrency.cc / Transterpreter: Occam on Arduino!
#CodeMeshLDN
#CodeMeshLDN
Summary
• “Bare metal” as a term doesn’t really mean all that much for general
purpose computing these days
• Small devices/embedded systems are the only area where the term is still valid
• New definitions
• Cloud Context: Dedicated servers with a shiny API
• Device Context: Embedded devices not running Linux
• Different classes of embedded systems offer wildly varying software
environments
• Larger embedded systems allow pretty much any language/VM to be used
• It’s good to be working on embedded systems in 2019 ☺
• Aside from the architectures discussed, can you think of any other
technology that might actually be the One True Bare Metal™ system? (answer
on the next slide…)
#CodeMeshLDN
FPGAs!
#CodeMeshLDN
The only
true bare
metal
system?
Thanks, any questions?
Ping me @OmerK
#CodeMeshLDN#CodeMeshLDN

More Related Content

Similar to Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems

Arm based controller - basic bootcamp
Arm based controller - basic bootcampArm based controller - basic bootcamp
Arm based controller - basic bootcampRoy Messinger
 
One Shellcode to Rule Them All: Cross-Platform Exploitation
One Shellcode to Rule Them All: Cross-Platform ExploitationOne Shellcode to Rule Them All: Cross-Platform Exploitation
One Shellcode to Rule Them All: Cross-Platform ExploitationQuinn Wilton
 
Embedded linux
Embedded linuxEmbedded linux
Embedded linuxWingston
 
BruCON 2010 Lightning Talks - DIY Grid Computing
BruCON 2010 Lightning Talks - DIY Grid ComputingBruCON 2010 Lightning Talks - DIY Grid Computing
BruCON 2010 Lightning Talks - DIY Grid Computingtomaszmiklas
 
"DevOps Practisting Platform on EKS with Karpenter autoscaling", Dmytro Kozhevin
"DevOps Practisting Platform on EKS with Karpenter autoscaling", Dmytro Kozhevin"DevOps Practisting Platform on EKS with Karpenter autoscaling", Dmytro Kozhevin
"DevOps Practisting Platform on EKS with Karpenter autoscaling", Dmytro KozhevinFwdays
 
Industrial trends in heterogeneous and esoteric compute
Industrial trends in heterogeneous and esoteric computeIndustrial trends in heterogeneous and esoteric compute
Industrial trends in heterogeneous and esoteric computePerry Lea
 
ROM Hacking for Fun, Profit & Infinite Lives
ROM Hacking for Fun, Profit & Infinite LivesROM Hacking for Fun, Profit & Infinite Lives
ROM Hacking for Fun, Profit & Infinite LivesUlisses Albuquerque
 
Advanced SOHO Router Exploitation XCON
Advanced SOHO Router Exploitation XCONAdvanced SOHO Router Exploitation XCON
Advanced SOHO Router Exploitation XCONLyon Yang
 
OSCON: Unikernels and Docker: From revolution to evolution
OSCON: Unikernels and Docker: From revolution to evolutionOSCON: Unikernels and Docker: From revolution to evolution
OSCON: Unikernels and Docker: From revolution to evolutionDocker, Inc.
 
High-Performance Computing with C++
High-Performance Computing with C++High-Performance Computing with C++
High-Performance Computing with C++JetBrains
 
Building Embedded Linux Systems Introduction
Building Embedded Linux Systems IntroductionBuilding Embedded Linux Systems Introduction
Building Embedded Linux Systems IntroductionSherif Mousa
 
Kubernetes and the Rise of Application-centric Computing
Kubernetes and the Rise of Application-centric ComputingKubernetes and the Rise of Application-centric Computing
Kubernetes and the Rise of Application-centric ComputingBitnami
 
Easily emulating full systems on amazon fpg as
Easily emulating full systems on amazon fpg asEasily emulating full systems on amazon fpg as
Easily emulating full systems on amazon fpg asRISC-V International
 
DevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesDevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesAndreas Katzig
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Adam Dunkels
 
Introduction to Embedded System
Introduction to Embedded System Introduction to Embedded System
Introduction to Embedded System Varad Manglekar
 
VoltDB and Erlang - Tech planet 2012
VoltDB and Erlang - Tech planet 2012VoltDB and Erlang - Tech planet 2012
VoltDB and Erlang - Tech planet 2012Eonblast
 
Mces MOD 1.pptx
Mces MOD 1.pptxMces MOD 1.pptx
Mces MOD 1.pptxRadhaC10
 

Similar to Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems (20)

Arm based controller - basic bootcamp
Arm based controller - basic bootcampArm based controller - basic bootcamp
Arm based controller - basic bootcamp
 
One Shellcode to Rule Them All: Cross-Platform Exploitation
One Shellcode to Rule Them All: Cross-Platform ExploitationOne Shellcode to Rule Them All: Cross-Platform Exploitation
One Shellcode to Rule Them All: Cross-Platform Exploitation
 
Embedded linux
Embedded linuxEmbedded linux
Embedded linux
 
BruCON 2010 Lightning Talks - DIY Grid Computing
BruCON 2010 Lightning Talks - DIY Grid ComputingBruCON 2010 Lightning Talks - DIY Grid Computing
BruCON 2010 Lightning Talks - DIY Grid Computing
 
"DevOps Practisting Platform on EKS with Karpenter autoscaling", Dmytro Kozhevin
"DevOps Practisting Platform on EKS with Karpenter autoscaling", Dmytro Kozhevin"DevOps Practisting Platform on EKS with Karpenter autoscaling", Dmytro Kozhevin
"DevOps Practisting Platform on EKS with Karpenter autoscaling", Dmytro Kozhevin
 
Industrial trends in heterogeneous and esoteric compute
Industrial trends in heterogeneous and esoteric computeIndustrial trends in heterogeneous and esoteric compute
Industrial trends in heterogeneous and esoteric compute
 
ROM Hacking for Fun, Profit & Infinite Lives
ROM Hacking for Fun, Profit & Infinite LivesROM Hacking for Fun, Profit & Infinite Lives
ROM Hacking for Fun, Profit & Infinite Lives
 
Advanced SOHO Router Exploitation XCON
Advanced SOHO Router Exploitation XCONAdvanced SOHO Router Exploitation XCON
Advanced SOHO Router Exploitation XCON
 
REDA services
REDA servicesREDA services
REDA services
 
OSCON: Unikernels and Docker: From revolution to evolution
OSCON: Unikernels and Docker: From revolution to evolutionOSCON: Unikernels and Docker: From revolution to evolution
OSCON: Unikernels and Docker: From revolution to evolution
 
High-Performance Computing with C++
High-Performance Computing with C++High-Performance Computing with C++
High-Performance Computing with C++
 
Building Embedded Linux Systems Introduction
Building Embedded Linux Systems IntroductionBuilding Embedded Linux Systems Introduction
Building Embedded Linux Systems Introduction
 
Kubernetes and the Rise of Application-centric Computing
Kubernetes and the Rise of Application-centric ComputingKubernetes and the Rise of Application-centric Computing
Kubernetes and the Rise of Application-centric Computing
 
Easily emulating full systems on amazon fpg as
Easily emulating full systems on amazon fpg asEasily emulating full systems on amazon fpg as
Easily emulating full systems on amazon fpg as
 
DevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile GamesDevOpsCon 2015 - DevOps in Mobile Games
DevOpsCon 2015 - DevOps in Mobile Games
 
SoC FPGA Technology
SoC FPGA TechnologySoC FPGA Technology
SoC FPGA Technology
 
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
Advanced Internet of Things firmware engineering with Thingsquare and Contiki...
 
Introduction to Embedded System
Introduction to Embedded System Introduction to Embedded System
Introduction to Embedded System
 
VoltDB and Erlang - Tech planet 2012
VoltDB and Erlang - Tech planet 2012VoltDB and Erlang - Tech planet 2012
VoltDB and Erlang - Tech planet 2012
 
Mces MOD 1.pptx
Mces MOD 1.pptxMces MOD 1.pptx
Mces MOD 1.pptx
 

More from Omer Kilic

Gearing up for Volume Manufacturing
Gearing up for Volume ManufacturingGearing up for Volume Manufacturing
Gearing up for Volume ManufacturingOmer Kilic
 
The Process of Shipping Hardware Products
The Process of Shipping Hardware ProductsThe Process of Shipping Hardware Products
The Process of Shipping Hardware ProductsOmer 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 KerfuffleOmer 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 profitOmer Kilic
 
Cloud, Distributed, Embedded: Erlang in the Heterogeneous Computing World
Cloud, Distributed, Embedded: Erlang in the Heterogeneous Computing WorldCloud, Distributed, Embedded: Erlang in the Heterogeneous Computing World
Cloud, Distributed, Embedded: Erlang in the Heterogeneous Computing WorldOmer Kilic
 
Taking Back Embedded: The Erlang Embedded Framework
Taking Back Embedded: The Erlang Embedded FrameworkTaking Back Embedded: The Erlang Embedded Framework
Taking Back Embedded: The Erlang Embedded FrameworkOmer Kilic
 
Erlang Embedded — Concurrent Blinkenlights and More!
Erlang Embedded — Concurrent Blinkenlights and More!Erlang Embedded — Concurrent Blinkenlights and More!
Erlang Embedded — Concurrent Blinkenlights and More!Omer Kilic
 
The Actor Model applied to the Raspberry Pi and the Embedded Domain
The Actor Model applied to the Raspberry Pi and the Embedded DomainThe Actor Model applied to the Raspberry Pi and the Embedded Domain
The Actor Model applied to the Raspberry Pi and the Embedded DomainOmer Kilic
 
Interfacing the Raspberry Pi to the World
Interfacing the Raspberry Pi to the WorldInterfacing the Raspberry Pi to the World
Interfacing the Raspberry Pi to the WorldOmer Kilic
 
A Quick Introduction to Programmable Logic
A Quick Introduction to Programmable LogicA Quick Introduction to Programmable Logic
A Quick Introduction to Programmable LogicOmer Kilic
 
concurrency.cc OSHUG #3
concurrency.cc OSHUG #3concurrency.cc OSHUG #3
concurrency.cc OSHUG #3Omer Kilic
 
BURO Arduino Workshop
BURO Arduino WorkshopBURO Arduino Workshop
BURO Arduino WorkshopOmer Kilic
 
Introduction to Arduino
Introduction to ArduinoIntroduction to Arduino
Introduction to ArduinoOmer Kilic
 
Interfacing with Arduino
Interfacing with ArduinoInterfacing with Arduino
Interfacing with ArduinoOmer 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 TechnologyOmer Kilic
 
TinkerSoc Electronics 101
TinkerSoc Electronics 101TinkerSoc Electronics 101
TinkerSoc Electronics 101Omer Kilic
 
Beer Bottle Night Lamp
Beer Bottle Night LampBeer Bottle Night Lamp
Beer Bottle Night LampOmer Kilic
 

More from Omer Kilic (17)

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
 
Cloud, Distributed, Embedded: Erlang in the Heterogeneous Computing World
Cloud, Distributed, Embedded: Erlang in the Heterogeneous Computing WorldCloud, Distributed, Embedded: Erlang in the Heterogeneous Computing World
Cloud, Distributed, Embedded: Erlang in the Heterogeneous Computing World
 
Taking Back Embedded: The Erlang Embedded Framework
Taking Back Embedded: The Erlang Embedded FrameworkTaking Back Embedded: The Erlang Embedded Framework
Taking Back Embedded: The Erlang Embedded Framework
 
Erlang Embedded — Concurrent Blinkenlights and More!
Erlang Embedded — Concurrent Blinkenlights and More!Erlang Embedded — Concurrent Blinkenlights and More!
Erlang Embedded — Concurrent Blinkenlights and More!
 
The Actor Model applied to the Raspberry Pi and the Embedded Domain
The Actor Model applied to the Raspberry Pi and the Embedded DomainThe Actor Model applied to the Raspberry Pi and the Embedded Domain
The Actor Model applied to the Raspberry Pi and the Embedded Domain
 
Interfacing the Raspberry Pi to the World
Interfacing the Raspberry Pi to the WorldInterfacing the Raspberry Pi to the World
Interfacing the Raspberry Pi to the World
 
A Quick Introduction to Programmable Logic
A Quick Introduction to Programmable LogicA Quick Introduction to Programmable Logic
A Quick Introduction to Programmable Logic
 
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

Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapRishantSharmaFr
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfJiananWang21
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptMsecMca
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdfKamal Acharya
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performancesivaprakash250
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfRagavanV2
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdfKamal Acharya
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlysanyuktamishra911
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringmulugeta48
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfRagavanV2
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdfankushspencer015
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxJuliansyahHarahap1
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueBhangaleSonal
 

Recently uploaded (20)

Unleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leapUnleashing the Power of the SORA AI lastest leap
Unleashing the Power of the SORA AI lastest leap
 
data_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdfdata_management_and _data_science_cheat_sheet.pdf
data_management_and _data_science_cheat_sheet.pdf
 
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
(INDIRA) Call Girl Aurangabad Call Now 8617697112 Aurangabad Escorts 24x7
 
notes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.pptnotes on Evolution Of Analytic Scalability.ppt
notes on Evolution Of Analytic Scalability.ppt
 
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
(INDIRA) Call Girl Meerut Call Now 8617697112 Meerut Escorts 24x7
 
University management System project report..pdf
University management System project report..pdfUniversity management System project report..pdf
University management System project report..pdf
 
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Wakad Call Me 7737669865 Budget Friendly No Advance Booking
 
UNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its PerformanceUNIT - IV - Air Compressors and its Performance
UNIT - IV - Air Compressors and its Performance
 
Unit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdfUnit 1 - Soil Classification and Compaction.pdf
Unit 1 - Soil Classification and Compaction.pdf
 
Online banking management system project.pdf
Online banking management system project.pdfOnline banking management system project.pdf
Online banking management system project.pdf
 
KubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghlyKubeKraft presentation @CloudNativeHooghly
KubeKraft presentation @CloudNativeHooghly
 
chapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineeringchapter 5.pptx: drainage and irrigation engineering
chapter 5.pptx: drainage and irrigation engineering
 
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort ServiceCall Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
Call Girls in Ramesh Nagar Delhi 💯 Call Us 🔝9953056974 🔝 Escort Service
 
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar  ≼🔝 Delhi door step de...
Call Now ≽ 9953056974 ≼🔝 Call Girls In New Ashok Nagar ≼🔝 Delhi door step de...
 
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced LoadsFEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
FEA Based Level 3 Assessment of Deformed Tanks with Fluid Induced Loads
 
Unit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdfUnit 2- Effective stress & Permeability.pdf
Unit 2- Effective stress & Permeability.pdf
 
NFPA 5000 2024 standard .
NFPA 5000 2024 standard                                  .NFPA 5000 2024 standard                                  .
NFPA 5000 2024 standard .
 
AKTU Computer Networks notes --- Unit 3.pdf
AKTU Computer Networks notes ---  Unit 3.pdfAKTU Computer Networks notes ---  Unit 3.pdf
AKTU Computer Networks notes --- Unit 3.pdf
 
Work-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptxWork-Permit-Receiver-in-Saudi-Aramco.pptx
Work-Permit-Receiver-in-Saudi-Aramco.pptx
 
Double Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torqueDouble Revolving field theory-how the rotor develops torque
Double Revolving field theory-how the rotor develops torque
 

Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems

  • 1. “Bare Metal” from a hardware perspective Embedded Frameworks and Build Systems Omer Kilic Code Mesh LDN 2019 #CodeMeshLDN
  • 3. Agenda • Bare Metal? • Outdated term? Overloaded term! • How do we actually run things these days? • CPU Arch 101 • A new definition? • Embedded Systems (i.e: Small Devices) • Different classes of devices • Software stacks/build frameworks • “Not just C” • The One True Bare Metal™ #CodeMeshLDN
  • 4. In computer science, bare machine (or bare metal) refers to a computer executing instructions directly on logic hardware without an intervening operating system. #CodeMeshLDN define: “bare metal”
  • 5. Bare Metal • New definition, based on: • Environment? • Infrastructure? • Programming language? • Size of the device? #CodeMeshLDN
  • 6. Environment? Hardware Application “True Bare Metal” Hardware OS Application “Bare-ish Metal” Hardware OS Runtime Application “Bare Metal, 2010s style”
  • 7. Hardware VM Environment? OS Runtime Application Hardware VM OS Runtime Application VM OS Container Runtime App Container Runtime App VM OS Container Runtime App Container Runtime App “Turtles” aka: (╯°□°)╯︵ ┻━┻ “Cloud-y Bare Metal” Hardware OS Container Runtime App Container Runtime App Container Runtime App Container Runtime App “Bare Metal: Containers Edition”
  • 8. Infra? “Old School” Physical servers, datacentres, etc “Cloud Era” Virtualisation, IaaS, PaaS, SaaS “Bare Metal Cloud” or “Bare Metal as a Service” ¯_(ツ)_/¯ #CodeMeshLDN
  • 9. Programming Language? • Compiled int main(){ printf(“Hello, World”); } Compiler Machine code print(“Hello, world”) Interpreter “Hello, world” Machine code “Hello, world” #CodeMeshLDN • Interpreted
  • 10. C to Assembly $ cat test.c int add(int a, int b) { return a + b; } $ gcc test.c –S –o test.s #CodeMeshLDN $ cat test.s (...) add: .LFB0: pushq %rbp movq %rsp, %rbp movl %edi, -4(%rbp) movl %esi, -8(%rbp) movl -4(%rbp), %edx movl -8(%rbp), %eax addl %edx, %eax popq %rbp ret
  • 14. Bare Metal = Dedicated servers? • Containers vs Virtualization • Remember the “Turtles” model? • IaaS is actually PaaS, Bare Metal is the True™ IaaS? • Feels like “dedicated servers with a provisioning/control API similar to any other cloud offering” • Faster/easier than talking to DC to provision a dedicated box? • Less human interaction? #CodeMeshLDN
  • 15. Bare Metal = Small devices? #CodeMeshLDN
  • 16. Embedded Systems “An embedded system is a controller with a dedicated function within a larger mechanical or electrical system, often with real-time computing constraints. It is embedded as part of a complete device often including hardware and mechanical part” #CodeMeshLDN
  • 17. Home Gateway / “WiFi Router” • Powerful enough to run Linux • Several hundred MHz CPU, >16MB RAM, >4MB FLASH • Not wildly different compared to your Linux box • 32/64-bit CPU, traditionally MIPS and more commonly ARM cores • Obvious resource constraints and different I/O • Cross-compiler/Linux image is the SDK • Once you have Linux, you can pretty much do whatever you want, FLASH size permitting. #CodeMeshLDN
  • 19. Embedded Frameworks/Build Systems #CodeMeshLDN • Provides a foundation for you to build your applications on • Linux (+BSP), Specific drivers/device-trees, patches, “blobs”, … • Notion of “packages”, not too different than the usual Linux packages (deb/rpm/etc) • Dependency management, most common programming languages/VMs already supported
  • 22. Special Mention: Nerves Project • BEAM (Erlang/Elixir) on Linux (buildroot), very active community and good platform support • https://nerves-project.org/ #CodeMeshLDN
  • 23. Smart Lightbulb • RTOS or bare-metal • <200 MHz CPU, <1MB RAM, <512KB FLASH • 16-32 bit CPU • Obscure cores around, newer chips use ARM cores • Some form of radio and standard peripherals • WiFi/Zigbee/Bluetooth • GPIO, ADC, I2C, SPI, etc #CodeMeshLDN
  • 25. Software Options • Common path: RTOS provided by the vendor • Alternatives • Interpreted • Micropython – Python (surprise!) • Espruino – Javascript • MicroEJ – Java • NodeMCU – Lua • AtomVM – Erlang/Elixir • … • Compiled • Nim – https://github.com/clj/nim-esp8266-sdk • Rust – https://dentrassi.de/2019/06/16/rust-on-the-esp-and-how-to-get-started/ • … #CodeMeshLDN
  • 26. Special mention: Nim (on esp8266) • A statically typed compiled systems programming language. • Generates native dependency-free executables, not dependent on a virtual machine • Sane memory management, compile-time checks • various backends: it compiles to C, C++ or JavaScript • Lots of good ideas for embedded systems! • https://github.com/clj/nim-esp8266-sdk • https://github.com/clj/nim-esp8266-vagrant
  • 27. Special mention: GRiSP • BEAM (Erlang/Elixir) on RTEMS (RTOS) • Bare-ish metal ʘ‿ʘ • Commercial/industrial focus • https://grisp.org #CodeMeshLDN
  • 28. Really Small™ Devices • Extremely resource constrained • Few MHz CPU, few KB RAM, few KB FLASH • May not have any FLASH at all (OTP, Mask ROM) • May even be an ASIC! • 4/8/16-bit CPUs • Here be dragons, potentially. Cost is key! • 32 bit becoming more popular • C compiler and a few application examples considered the “SDK” • Not just C/ASM! • TinyGo: Go on really small devices • Concurrency.cc / Transterpreter: Occam on Arduino! #CodeMeshLDN
  • 29.
  • 31. Summary • “Bare metal” as a term doesn’t really mean all that much for general purpose computing these days • Small devices/embedded systems are the only area where the term is still valid • New definitions • Cloud Context: Dedicated servers with a shiny API • Device Context: Embedded devices not running Linux • Different classes of embedded systems offer wildly varying software environments • Larger embedded systems allow pretty much any language/VM to be used • It’s good to be working on embedded systems in 2019 ☺ • Aside from the architectures discussed, can you think of any other technology that might actually be the One True Bare Metal™ system? (answer on the next slide…) #CodeMeshLDN
  • 33. Thanks, any questions? Ping me @OmerK #CodeMeshLDN#CodeMeshLDN