Se ha denunciado esta presentación.
Utilizamos tu perfil de LinkedIn y tus datos de actividad para personalizar los anuncios y mostrarte publicidad más relevante. Puedes cambiar tus preferencias de publicidad en cualquier momento.
“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 ...
In computer science, bare machine (or bare metal) refers to a
computer executing instructions directly on logic hardware w...
Bare Metal
• New definition, based on:
• Environment?
• Infrastructure?
• Programming language?
• Size of the device?
#Cod...
Environment?
Hardware
Application
“True Bare Metal”
Hardware
OS
Application
“Bare-ish Metal”
Hardware
OS
Runtime
Applicati...
Hardware
VM
Environment?
OS
Runtime
Application
Hardware
VM
OS
Runtime
Application
VM
OS
Container
Runtime App
Container
R...
Infra?
“Old School”
Physical servers, datacentres, etc
“Cloud Era”
Virtualisation, IaaS, PaaS, SaaS
“Bare Metal Cloud” or
...
Programming Language?
• Compiled
int main(){
printf(“Hello, World”);
} Compiler
Machine
code
print(“Hello, world”)
Interpr...
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
(.....
#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, Ba...
Bare Metal = Small devices?
#CodeMeshLDN
Embedded Systems
“An embedded system is a controller with a dedicated function within a larger
mechanical or electrical sy...
Home Gateway / “WiFi Router”
• Powerful enough to run Linux
• Several hundred MHz CPU, >16MB RAM, >4MB
FLASH
• Not wildly ...
#CodeMeshLDN
Embedded Frameworks/Build Systems
#CodeMeshLDN
• Provides a foundation for you to build your applications on
• Linux (+BSP...
#CodeMeshLDN
#CodeMeshLDN
Special Mention: Nerves Project
• BEAM (Erlang/Elixir) on Linux (buildroot), very active community and
good platform suppo...
Smart Lightbulb
• RTOS or bare-metal
• <200 MHz CPU, <1MB RAM, <512KB FLASH
• 16-32 bit CPU
• Obscure cores around, newer ...
#CodeMeshLDN
Software Options
• Common path: RTOS provided by the vendor
• Alternatives
• Interpreted
• Micropython – Python (surprise!...
Special mention: Nim (on esp8266)
• A statically typed compiled systems programming language.
• Generates native dependenc...
Special mention: GRiSP
• BEAM (Erlang/Elixir) on RTEMS (RTOS)
• Bare-ish metal ʘ‿ʘ
• Commercial/industrial focus
• https:/...
Really Small™ Devices
• Extremely resource constrained
• Few MHz CPU, few KB RAM, few KB FLASH
• May not have any FLASH at...
#CodeMeshLDN
Summary
• “Bare metal” as a term doesn’t really mean all that much for general
purpose computing these days
• Small device...
FPGAs!
#CodeMeshLDN
The only
true bare
metal
system?
Thanks, any questions?
Ping me @OmerK
#CodeMeshLDN#CodeMeshLDN
Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems
Próximo SlideShare
Cargando en…5
×

de

Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 1 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 2 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 3 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 4 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 5 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 6 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 7 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 8 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 9 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 10 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 11 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 12 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 13 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 14 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 15 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 16 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 17 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 18 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 19 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 20 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 21 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 22 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 23 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 24 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 25 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 26 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 27 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 28 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 29 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 30 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 31 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 32 Bare Metal from a Hardware Perspective: Embedded Frameworks & Build Systems Slide 33
Próximo SlideShare
What to Upload to SlideShare
Siguiente
Descargar para leer sin conexión y ver en pantalla completa.

0 recomendaciones

Compartir

Descargar para leer sin conexión

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

Descargar para leer sin conexión

Presented at Code Mesh 2019, London

Audiolibros relacionados

Gratis con una prueba de 30 días de Scribd

Ver todo
  • Sé el primero en recomendar esto

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

  1. 1. “Bare Metal” from a hardware perspective Embedded Frameworks and Build Systems Omer Kilic Code Mesh LDN 2019 #CodeMeshLDN
  2. 2. omer.kilic.name @OmerK #CodeMeshLDN
  3. 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. 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. 5. Bare Metal • New definition, based on: • Environment? • Infrastructure? • Programming language? • Size of the device? #CodeMeshLDN
  6. 6. Environment? Hardware Application “True Bare Metal” Hardware OS Application “Bare-ish Metal” Hardware OS Runtime Application “Bare Metal, 2010s style”
  7. 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. 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. 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. 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
  11. 11. #CodeMeshLDN
  12. 12. https://twitter.com/themadstephan/status/1129087108025638913
  13. 13. Bare Metal?! #CodeMeshLDN
  14. 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. 15. Bare Metal = Small devices? #CodeMeshLDN
  16. 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. 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
  18. 18. #CodeMeshLDN
  19. 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
  20. 20. #CodeMeshLDN
  21. 21. #CodeMeshLDN
  22. 22. Special Mention: Nerves Project • BEAM (Erlang/Elixir) on Linux (buildroot), very active community and good platform support • https://nerves-project.org/ #CodeMeshLDN
  23. 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
  24. 24. #CodeMeshLDN
  25. 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. 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. 27. Special mention: GRiSP • BEAM (Erlang/Elixir) on RTEMS (RTOS) • Bare-ish metal ʘ‿ʘ • Commercial/industrial focus • https://grisp.org #CodeMeshLDN
  28. 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. 29. #CodeMeshLDN
  30. 30. 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
  31. 31. FPGAs! #CodeMeshLDN The only true bare metal system?
  32. 32. Thanks, any questions? Ping me @OmerK #CodeMeshLDN#CodeMeshLDN

Presented at Code Mesh 2019, London

Vistas

Total de vistas

206

En Slideshare

0

De embebidos

0

Número de embebidos

3

Acciones

Descargas

2

Compartidos

0

Comentarios

0

Me gusta

0

×