SlideShare a Scribd company logo
4
Most read
14
Most read
16
Most read
FIRMWARE
2016
01
Background
3 // Background
An Embedded System is:
● A computer processor with a dedicated purpose
● Part of a larger electronic device (“embedded”)
● Not intended to be a general-purpose computer
Any device that contains a processor, but isn’t a PC or smartphone!
4 // Background
Firmware is Embedded Software
● Runs on embedded systems
● Directly controls electronic (or mechanical) hardware
● Historically, this software was set in stone at manufacturing time,
essentially becoming part of the hardware → “firmware”
○ Today, many devices have updatable firmware
02
What’s different?
6 // What’s different?
● Runs on a general-purpose
device
● User-centric, graphical
● Operating system mediates
hardware access
● State of the art hardware
● A variety of higher-level
programming languages
● An integral part of the device
● Primitive or no user interface
● Direct hardware access
● Primitive hardware capabilities
● Programmed in low-level
languages such as C or assembly
What’s different?
System constraints define firmware
programming
● RAM
● Program Storage
● Speed
● Math
● Libraries
● Operating System
● Debugging Capabilities
8 // What’s different?
Constraints
03
What Lies Beneath
● Digital
○ General Purpose Input/Output (GPIO)
○ Serial communications (SPI, I2
C, etc)
○ USB
● Analog
○ Analog-to-digital converters (ADC)
● Specialized Peripherals
○ Radio on-chip (Bluetooth, ZigBee, Thread, RF4CE, etc)
10 // Hardware
Interfacing to the outside world
11 // Hardware
Memory Mapped I/O
Address
Decoder
Memory
Cell
Enable
Read/Write
Address
Bus
Data Bus
Normal Memory
Latch &
Amplifier
Address
Decoder
Enable
Read/Write
Address
Bus
Data Bus
LED
GPIO
Address
Decoder
Peripheral
Enable
Read/Write
Address
Bus
Data Bus
Generic Peripheral
12 // Hardware
Harvard Architecture Von Neumann Architecture
● The most primitive form of multitasking
● The interrupt vector stores callback functions
● Hardware triggers the CPU to invoke these functions in response to
certain events
○ Timer elapsing
○ Data arriving on serial interface
○ Many more!
13 // Hardware
Interrupts
04
Tools and Techniques
● Usually C, sometimes assembly
○ Must allow addressing specific memory locations
● Low-level programming style -- abstraction is expensive
○ global variables
○ fixed-size arrays
○ avoid passing large objects on the stack
● Very often you’re counting every byte
○ fixed-width types are preferred
○ bitwise operations are common
15 // Tools and Techniques
Programming Language
● ISRs must be fast!
● Only has access to global state
● Great care must be taken when main thread accesses shared global
state
○ Turn off interrupts (“go atomic”)
○ Use CPU instructions that are guaranteed to be atomic
● You can poll the interrupt flags when interrupts are turned off
16 // Hardware
Interrupt Service Routines
17 // Hardware
Concurrency Fun
35 FF FF FF
clock
FF
currentTime
35 FF FF FF FF FF
36 00 00 00
Interrupt fires!
00 FF FF
36 00 00 00 36 00 FF FF
currentTime = clock;
18 // Tools and Techniques
Compiler/IDE
● Expensive, awkward, buggy
● Cross-compiled from your computer
● Emulators are not usually useful because of the tight coupling to
external hardware
● No obvious sign! It’s just a brick
● Logging is not always available
● Stack traces are not always available
● External hardware is required to debug
● Limited number of breakpoints!
● LEDs are pretty great
19 // Tools and Techniques
When things go wrong...
20 // Tools and Techniques
Programming/Debug Hardware
● Expensive, awkward, buggy
● Some device interfaces are proprietary, but there are also standards
such as JTAG or SerialWire
21 // Tools and Techniques
Test Equipment
● Multimeters
● Oscilloscopes
● Logic Analyzers
Key Takeaway
Embedded systems are “small”

More Related Content

PPTX
PPTX
computer hardware
PPTX
SpaceX Case Study
PPTX
Open Source Software
PPTX
Transport layer
PPTX
Stack data structure
PPTX
Cloud security
PPTX
System software
computer hardware
SpaceX Case Study
Open Source Software
Transport layer
Stack data structure
Cloud security
System software

What's hot (20)

PPT
Microprocessor ppt
PPT
Cpu ppt cse
PPT
Embedded System Basics
DOCX
Embedded System
PPTX
Operating system
PPTX
Embedded System Tools ppt
PPTX
Raspberry Pi
PPT
Embedded system
PDF
Introduction to embedded systems
PPTX
Computer storage
PPTX
Introduction to Microcontroller
PPT
Design of embedded systems
PDF
Basic CPU (Central Processing Unit)
PPTX
Embedded systems
PPTX
Data enrichment
PPT
Bus interconnection
PPTX
Embedded system
PPTX
Computer hardware
PPTX
Input output interface
PDF
Introduction to Software Defined Networking (SDN)
Microprocessor ppt
Cpu ppt cse
Embedded System Basics
Embedded System
Operating system
Embedded System Tools ppt
Raspberry Pi
Embedded system
Introduction to embedded systems
Computer storage
Introduction to Microcontroller
Design of embedded systems
Basic CPU (Central Processing Unit)
Embedded systems
Data enrichment
Bus interconnection
Embedded system
Computer hardware
Input output interface
Introduction to Software Defined Networking (SDN)
Ad

Viewers also liked (20)

PPSX
Introduction to embedded linux device driver and firmware
PPTX
Firmware
PPTX
ppt on embedded system
PPTX
Computer Software & its Types
PPT
Embedded and vlsi design 1
ODP
Hardware I Firmware
PPTX
Presentación1
PPTX
Overview&Framework 1-Manage Software and Firmware Files
PDF
01. BIOS introduction
PPT
Cit 1101 lec 004
PPTX
UEFI Spec Version 2.4 Facilitates Secure Update
PDF
LAS16-200: Firmware Summit - UEFI secure boot
PPTX
How to choose an RTOS?
PPTX
Hardware it presentation
PPTX
Software Freeware e Shareware
ODP
BIOS, Linux and Firmware Test Suite in-between
PPT
Chapter 11: Printers and Scanners
PPTX
Classificação de software. Livre, demo e proprietário. Básico, Aplicativo e u...
PDF
Boot process: BIOS vs UEFI
PDF
Computer System Basics
Introduction to embedded linux device driver and firmware
Firmware
ppt on embedded system
Computer Software & its Types
Embedded and vlsi design 1
Hardware I Firmware
Presentación1
Overview&Framework 1-Manage Software and Firmware Files
01. BIOS introduction
Cit 1101 lec 004
UEFI Spec Version 2.4 Facilitates Secure Update
LAS16-200: Firmware Summit - UEFI secure boot
How to choose an RTOS?
Hardware it presentation
Software Freeware e Shareware
BIOS, Linux and Firmware Test Suite in-between
Chapter 11: Printers and Scanners
Classificação de software. Livre, demo e proprietário. Básico, Aplicativo e u...
Boot process: BIOS vs UEFI
Computer System Basics
Ad

Similar to Introduction to Firmware (20)

PDF
Embedded platform choices
PPTX
Lect 1 Into.pptx
PPT
PPTX
Chapter 1-1 Computers and Software in Networks.pptx
PDF
Chapter 1-1 _ Computers and Software in Networks.pdf
ODP
Java 101 @ chattahoochee
PDF
Hardware hacking
PDF
Building Trojan Hardware at Home
PPTX
class 11 fill chapetr with alla answers
PPTX
Embedded programming Embedded programming (1).pptx
PDF
Chapter three embedded system corse ppt AASTU.pdf
PPT
5120224.ppt
PPTX
PDF
Basic Computer Architeccture
PPTX
1. Introduction to Computer System (1).pptx
PPTX
Computer System Overview Class XI CS
PDF
Software and hardware
PPTX
Post Mortem Debugging in Embedded Linux Systems
PDF
[HK Roni] C Programming Lectures
Embedded platform choices
Lect 1 Into.pptx
Chapter 1-1 Computers and Software in Networks.pptx
Chapter 1-1 _ Computers and Software in Networks.pdf
Java 101 @ chattahoochee
Hardware hacking
Building Trojan Hardware at Home
class 11 fill chapetr with alla answers
Embedded programming Embedded programming (1).pptx
Chapter three embedded system corse ppt AASTU.pdf
5120224.ppt
Basic Computer Architeccture
1. Introduction to Computer System (1).pptx
Computer System Overview Class XI CS
Software and hardware
Post Mortem Debugging in Embedded Linux Systems
[HK Roni] C Programming Lectures

Recently uploaded (20)

PPTX
INFERTILITY (FEMALE FACTORS).pptxgvcghhfcg
PPTX
Fundamentals of Computer.pptx Computer BSC
PPTX
"Fundamentals of Digital Image Processing: A Visual Approach"
PPT
Lines and angles cbse class 9 math chemistry
PPTX
ERP good ERP good ERP good ERP good good ERP good ERP good
PDF
Layer23-Switch.com The Cisco Catalyst 9300 Series is Cisco’s flagship stackab...
PPTX
PROGRAMMING-QUARTER-2-PYTHON.pptxnsnsndn
PPTX
STEEL- intro-1.pptxhejwjenwnwnenemwmwmwm
PDF
PPT Determiners.pdf.......................
PPTX
Presentacion compuuuuuuuuuuuuuuuuuuuuuuu
PPTX
code of ethics.pptxdvhwbssssSAssscasascc
PDF
Dynamic Checkweighers and Automatic Weighing Machine Solutions
PPTX
KVL KCL ppt electrical electronics eee tiet
PPT
FABRICATION OF MOS FET BJT DEVICES IN NANOMETER
PPTX
Nanokeyer nano keyekr kano ketkker nano keyer
PPT
Hypersensitivity Namisha1111111111-WPS.ppt
PPTX
sdn_based_controller_for_mobile_network_traffic_management1.pptx
PPT
chapter_1_a.ppthduushshwhwbshshshsbbsbsbsbsh
PPTX
Embedded for Artificial Intelligence 1.pptx
PPTX
5. MEASURE OF INTERIOR AND EXTERIOR- MATATAG CURRICULUM.pptx
INFERTILITY (FEMALE FACTORS).pptxgvcghhfcg
Fundamentals of Computer.pptx Computer BSC
"Fundamentals of Digital Image Processing: A Visual Approach"
Lines and angles cbse class 9 math chemistry
ERP good ERP good ERP good ERP good good ERP good ERP good
Layer23-Switch.com The Cisco Catalyst 9300 Series is Cisco’s flagship stackab...
PROGRAMMING-QUARTER-2-PYTHON.pptxnsnsndn
STEEL- intro-1.pptxhejwjenwnwnenemwmwmwm
PPT Determiners.pdf.......................
Presentacion compuuuuuuuuuuuuuuuuuuuuuuu
code of ethics.pptxdvhwbssssSAssscasascc
Dynamic Checkweighers and Automatic Weighing Machine Solutions
KVL KCL ppt electrical electronics eee tiet
FABRICATION OF MOS FET BJT DEVICES IN NANOMETER
Nanokeyer nano keyekr kano ketkker nano keyer
Hypersensitivity Namisha1111111111-WPS.ppt
sdn_based_controller_for_mobile_network_traffic_management1.pptx
chapter_1_a.ppthduushshwhwbshshshsbbsbsbsbsh
Embedded for Artificial Intelligence 1.pptx
5. MEASURE OF INTERIOR AND EXTERIOR- MATATAG CURRICULUM.pptx

Introduction to Firmware

  • 3. 3 // Background An Embedded System is: ● A computer processor with a dedicated purpose ● Part of a larger electronic device (“embedded”) ● Not intended to be a general-purpose computer Any device that contains a processor, but isn’t a PC or smartphone!
  • 4. 4 // Background Firmware is Embedded Software ● Runs on embedded systems ● Directly controls electronic (or mechanical) hardware ● Historically, this software was set in stone at manufacturing time, essentially becoming part of the hardware → “firmware” ○ Today, many devices have updatable firmware
  • 6. 6 // What’s different? ● Runs on a general-purpose device ● User-centric, graphical ● Operating system mediates hardware access ● State of the art hardware ● A variety of higher-level programming languages ● An integral part of the device ● Primitive or no user interface ● Direct hardware access ● Primitive hardware capabilities ● Programmed in low-level languages such as C or assembly
  • 7. What’s different? System constraints define firmware programming
  • 8. ● RAM ● Program Storage ● Speed ● Math ● Libraries ● Operating System ● Debugging Capabilities 8 // What’s different? Constraints
  • 10. ● Digital ○ General Purpose Input/Output (GPIO) ○ Serial communications (SPI, I2 C, etc) ○ USB ● Analog ○ Analog-to-digital converters (ADC) ● Specialized Peripherals ○ Radio on-chip (Bluetooth, ZigBee, Thread, RF4CE, etc) 10 // Hardware Interfacing to the outside world
  • 11. 11 // Hardware Memory Mapped I/O Address Decoder Memory Cell Enable Read/Write Address Bus Data Bus Normal Memory Latch & Amplifier Address Decoder Enable Read/Write Address Bus Data Bus LED GPIO Address Decoder Peripheral Enable Read/Write Address Bus Data Bus Generic Peripheral
  • 12. 12 // Hardware Harvard Architecture Von Neumann Architecture
  • 13. ● The most primitive form of multitasking ● The interrupt vector stores callback functions ● Hardware triggers the CPU to invoke these functions in response to certain events ○ Timer elapsing ○ Data arriving on serial interface ○ Many more! 13 // Hardware Interrupts
  • 15. ● Usually C, sometimes assembly ○ Must allow addressing specific memory locations ● Low-level programming style -- abstraction is expensive ○ global variables ○ fixed-size arrays ○ avoid passing large objects on the stack ● Very often you’re counting every byte ○ fixed-width types are preferred ○ bitwise operations are common 15 // Tools and Techniques Programming Language
  • 16. ● ISRs must be fast! ● Only has access to global state ● Great care must be taken when main thread accesses shared global state ○ Turn off interrupts (“go atomic”) ○ Use CPU instructions that are guaranteed to be atomic ● You can poll the interrupt flags when interrupts are turned off 16 // Hardware Interrupt Service Routines
  • 17. 17 // Hardware Concurrency Fun 35 FF FF FF clock FF currentTime 35 FF FF FF FF FF 36 00 00 00 Interrupt fires! 00 FF FF 36 00 00 00 36 00 FF FF currentTime = clock;
  • 18. 18 // Tools and Techniques Compiler/IDE ● Expensive, awkward, buggy ● Cross-compiled from your computer ● Emulators are not usually useful because of the tight coupling to external hardware
  • 19. ● No obvious sign! It’s just a brick ● Logging is not always available ● Stack traces are not always available ● External hardware is required to debug ● Limited number of breakpoints! ● LEDs are pretty great 19 // Tools and Techniques When things go wrong...
  • 20. 20 // Tools and Techniques Programming/Debug Hardware ● Expensive, awkward, buggy ● Some device interfaces are proprietary, but there are also standards such as JTAG or SerialWire
  • 21. 21 // Tools and Techniques Test Equipment ● Multimeters ● Oscilloscopes ● Logic Analyzers
  • 22. Key Takeaway Embedded systems are “small”