SlideShare a Scribd company logo
1 of 22
Download to read offline
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

What's hot (20)

Getting started with BeagleBone Black - Embedded Linux
Getting started with BeagleBone Black - Embedded LinuxGetting started with BeagleBone Black - Embedded Linux
Getting started with BeagleBone Black - Embedded Linux
 
Introduction to Compiler design
Introduction to Compiler design Introduction to Compiler design
Introduction to Compiler design
 
Windows V/S Linux OS - Comparison
Windows V/S Linux OS - ComparisonWindows V/S Linux OS - Comparison
Windows V/S Linux OS - Comparison
 
Process management os concept
Process management os conceptProcess management os concept
Process management os concept
 
System software and Application software
System software and Application softwareSystem software and Application software
System software and Application software
 
Compilers
CompilersCompilers
Compilers
 
File system structure
File system structureFile system structure
File system structure
 
Embedded Linux on ARM
Embedded Linux on ARMEmbedded Linux on ARM
Embedded Linux on ARM
 
Linux operating system - Overview
Linux operating system - OverviewLinux operating system - Overview
Linux operating system - Overview
 
Ch1-Operating System Concept
Ch1-Operating System ConceptCh1-Operating System Concept
Ch1-Operating System Concept
 
Operating systems
Operating systems Operating systems
Operating systems
 
Device Drivers
Device DriversDevice Drivers
Device Drivers
 
Ram rom
Ram romRam rom
Ram rom
 
Operating systems (For CBSE School Students)
Operating systems (For CBSE School Students)Operating systems (For CBSE School Students)
Operating systems (For CBSE School Students)
 
Bios
BiosBios
Bios
 
Operating system memory management
Operating system memory managementOperating system memory management
Operating system memory management
 
Processors
ProcessorsProcessors
Processors
 
Computer Software & It's types.
Computer Software &  It's types.Computer Software &  It's types.
Computer Software & It's types.
 
Functions Of Operating System
Functions Of Operating SystemFunctions Of Operating System
Functions Of Operating System
 
introduction to embedded system presentation
introduction to embedded system presentationintroduction to embedded system presentation
introduction to embedded system presentation
 

Viewers also liked

Introduction to embedded linux device driver and firmware
Introduction to embedded linux device driver and firmwareIntroduction to embedded linux device driver and firmware
Introduction to embedded linux device driver and firmwaredefinecareer
 
ppt on embedded system
ppt on embedded systemppt on embedded system
ppt on embedded systemmanish katara
 
Hardware I Firmware
Hardware I FirmwareHardware I Firmware
Hardware I FirmwareEric Oliver
 
Overview&Framework 1-Manage Software and Firmware Files
Overview&Framework 1-Manage Software and Firmware FilesOverview&Framework 1-Manage Software and Firmware Files
Overview&Framework 1-Manage Software and Firmware FilesAd Ghauri
 
01. BIOS introduction
01. BIOS introduction01. BIOS introduction
01. BIOS introductioncertain310
 
UEFI Spec Version 2.4 Facilitates Secure Update
UEFI Spec Version 2.4 Facilitates Secure UpdateUEFI Spec Version 2.4 Facilitates Secure Update
UEFI Spec Version 2.4 Facilitates Secure Updateinsydesoftware
 
LAS16-200: Firmware Summit - UEFI secure boot
LAS16-200: Firmware Summit - UEFI secure bootLAS16-200: Firmware Summit - UEFI secure boot
LAS16-200: Firmware Summit - UEFI secure bootLinaro
 
Software Freeware e Shareware
Software Freeware e SharewareSoftware Freeware e Shareware
Software Freeware e SharewareLukas Vinicius
 
BIOS, Linux and Firmware Test Suite in-between
BIOS, Linux and  Firmware Test Suite in-betweenBIOS, Linux and  Firmware Test Suite in-between
BIOS, Linux and Firmware Test Suite in-betweenAlex Hung
 
Chapter 11: Printers and Scanners
Chapter 11: Printers and ScannersChapter 11: Printers and Scanners
Chapter 11: Printers and Scannersaskme
 
Classificação de software. Livre, demo e proprietário. Básico, Aplicativo e u...
Classificação de software. Livre, demo e proprietário. Básico, Aplicativo e u...Classificação de software. Livre, demo e proprietário. Básico, Aplicativo e u...
Classificação de software. Livre, demo e proprietário. Básico, Aplicativo e u...Labin2bpm
 
Computer System Basics
Computer System BasicsComputer System Basics
Computer System Basicspathumbee
 

Viewers also liked (20)

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

Similar to Introduction to Firmware

Embedded platform choices
Embedded platform choicesEmbedded platform choices
Embedded platform choicesTavish Naruka
 
Chapter 1-1 Computers and Software in Networks.pptx
Chapter 1-1  Computers and Software in Networks.pptxChapter 1-1  Computers and Software in Networks.pptx
Chapter 1-1 Computers and Software in Networks.pptxAfendeyAthurJinir
 
Chapter 1-1 _ Computers and Software in Networks.pdf
Chapter 1-1 _ Computers and Software in Networks.pdfChapter 1-1 _ Computers and Software in Networks.pdf
Chapter 1-1 _ Computers and Software in Networks.pdfAfendeyAthurJinir
 
Building Trojan Hardware at Home
Building Trojan Hardware at HomeBuilding Trojan Hardware at Home
Building Trojan Hardware at HomeE Hacking
 
Embedded programming Embedded programming (1).pptx
Embedded programming Embedded programming (1).pptxEmbedded programming Embedded programming (1).pptx
Embedded programming Embedded programming (1).pptxlematadese670
 
Basic Computer Architeccture
Basic Computer ArchitecctureBasic Computer Architeccture
Basic Computer ArchitecctureShreerajKhatiwada
 
Computer System Overview Class XI CS
Computer System Overview Class XI CSComputer System Overview Class XI CS
Computer System Overview Class XI CSclass12sci
 
Software and hardware
Software and hardwareSoftware and hardware
Software and hardwaremeryy21
 
Post Mortem Debugging in Embedded Linux Systems
Post Mortem Debugging in Embedded Linux Systems Post Mortem Debugging in Embedded Linux Systems
Post Mortem Debugging in Embedded Linux Systems GlobalLogic Ukraine
 
Processor Organization
Processor OrganizationProcessor Organization
Processor OrganizationDominik Salvet
 

Similar to Introduction to Firmware (20)

Embedded platform choices
Embedded platform choicesEmbedded platform choices
Embedded platform choices
 
Lect 1 Into.pptx
Lect 1 Into.pptxLect 1 Into.pptx
Lect 1 Into.pptx
 
Lec1.ppt
Lec1.pptLec1.ppt
Lec1.ppt
 
Chapter 1-1 Computers and Software in Networks.pptx
Chapter 1-1  Computers and Software in Networks.pptxChapter 1-1  Computers and Software in Networks.pptx
Chapter 1-1 Computers and Software in Networks.pptx
 
Chapter 1-1 _ Computers and Software in Networks.pdf
Chapter 1-1 _ Computers and Software in Networks.pdfChapter 1-1 _ Computers and Software in Networks.pdf
Chapter 1-1 _ Computers and Software in Networks.pdf
 
Java 101 @ chattahoochee
Java 101 @ chattahoocheeJava 101 @ chattahoochee
Java 101 @ chattahoochee
 
Hardware hacking
Hardware hackingHardware hacking
Hardware hacking
 
Building Trojan Hardware at Home
Building Trojan Hardware at HomeBuilding Trojan Hardware at Home
Building Trojan Hardware at Home
 
Embedded programming Embedded programming (1).pptx
Embedded programming Embedded programming (1).pptxEmbedded programming Embedded programming (1).pptx
Embedded programming Embedded programming (1).pptx
 
5120224.ppt
5120224.ppt5120224.ppt
5120224.ppt
 
TMS320C5x
TMS320C5xTMS320C5x
TMS320C5x
 
Basic Computer Architeccture
Basic Computer ArchitecctureBasic Computer Architeccture
Basic Computer Architeccture
 
Computer System Overview Class XI CS
Computer System Overview Class XI CSComputer System Overview Class XI CS
Computer System Overview Class XI CS
 
Software and hardware
Software and hardwareSoftware and hardware
Software and hardware
 
Vpm
VpmVpm
Vpm
 
Post Mortem Debugging in Embedded Linux Systems
Post Mortem Debugging in Embedded Linux Systems Post Mortem Debugging in Embedded Linux Systems
Post Mortem Debugging in Embedded Linux Systems
 
[HK Roni] C Programming Lectures
[HK Roni] C Programming Lectures[HK Roni] C Programming Lectures
[HK Roni] C Programming Lectures
 
Processor Organization
Processor OrganizationProcessor Organization
Processor Organization
 
Computer basics
Computer basicsComputer basics
Computer basics
 
Intro to linux
Intro to linux Intro to linux
Intro to linux
 

Recently uploaded

Russian Call Girls Kolkata Chhaya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls Kolkata Chhaya 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls Kolkata Chhaya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls Kolkata Chhaya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Serviceranjana rawat
 
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...Pooja Nehwal
 
定制宾州州立大学毕业证(PSU毕业证) 成绩单留信学历认证原版一比一
定制宾州州立大学毕业证(PSU毕业证) 成绩单留信学历认证原版一比一定制宾州州立大学毕业证(PSU毕业证) 成绩单留信学历认证原版一比一
定制宾州州立大学毕业证(PSU毕业证) 成绩单留信学历认证原版一比一ga6c6bdl
 
VIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service Saharanpur
VIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service SaharanpurVIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service Saharanpur
VIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service SaharanpurSuhani Kapoor
 
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一zul5vf0pq
 
Call Girls Delhi {Rohini} 9711199012 high profile service
Call Girls Delhi {Rohini} 9711199012 high profile serviceCall Girls Delhi {Rohini} 9711199012 high profile service
Call Girls Delhi {Rohini} 9711199012 high profile servicerehmti665
 
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...srsj9000
 
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,Pooja Nehwal
 
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...Pooja Nehwal
 
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查awo24iot
 
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls KolkataCall Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkataanamikaraghav4
 
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service -  Bandra F...WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service -  Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...Pooja Nehwal
 
Thane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsThane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsPooja Nehwal
 
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...Suhani Kapoor
 
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311  Call Girls in Thane , Independent Escort Service ThanePallawi 9167673311  Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service ThanePooja Nehwal
 
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一ga6c6bdl
 
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gapedkojalkojal131
 
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样qaffana
 

Recently uploaded (20)

Russian Call Girls Kolkata Chhaya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls Kolkata Chhaya 🤌  8250192130 🚀 Vip Call Girls KolkataRussian Call Girls Kolkata Chhaya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Russian Call Girls Kolkata Chhaya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
(ZARA) Call Girls Jejuri ( 7001035870 ) HI-Fi Pune Escorts Service
 
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
9892124323, Call Girl in Juhu Call Girls Services (Rate ₹8.5K) 24×7 with Hote...
 
定制宾州州立大学毕业证(PSU毕业证) 成绩单留信学历认证原版一比一
定制宾州州立大学毕业证(PSU毕业证) 成绩单留信学历认证原版一比一定制宾州州立大学毕业证(PSU毕业证) 成绩单留信学历认证原版一比一
定制宾州州立大学毕业证(PSU毕业证) 成绩单留信学历认证原版一比一
 
VIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service Saharanpur
VIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service SaharanpurVIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service Saharanpur
VIP Call Girl Saharanpur Aashi 8250192130 Independent Escort Service Saharanpur
 
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
定制加拿大滑铁卢大学毕业证(Waterloo毕业证书)成绩单(文凭)原版一比一
 
Call Girls Delhi {Rohini} 9711199012 high profile service
Call Girls Delhi {Rohini} 9711199012 high profile serviceCall Girls Delhi {Rohini} 9711199012 high profile service
Call Girls Delhi {Rohini} 9711199012 high profile service
 
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
Hifi Defence Colony Call Girls Service WhatsApp -> 9999965857 Available 24x7 ...
 
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
Call Girls In Andheri East Call 9892124323 Book Hot And Sexy Girls,
 
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...High Profile Call Girls In Andheri 7738631006 Call girls in mumbai  Mumbai ...
High Profile Call Girls In Andheri 7738631006 Call girls in mumbai Mumbai ...
 
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
如何办理(Adelaide毕业证)阿德莱德大学毕业证成绩单Adelaide学历认证真实可查
 
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls KolkataCall Girls Service Kolkata Aishwarya 🤌  8250192130 🚀 Vip Call Girls Kolkata
Call Girls Service Kolkata Aishwarya 🤌 8250192130 🚀 Vip Call Girls Kolkata
 
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service -  Bandra F...WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service -  Bandra F...
WhatsApp 9892124323 ✓Call Girls In Khar ( Mumbai ) secure service - Bandra F...
 
🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
🔝 9953056974🔝 Delhi Call Girls in Ajmeri Gate
 
Thane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call GirlsThane Escorts, (Pooja 09892124323), Thane Call Girls
Thane Escorts, (Pooja 09892124323), Thane Call Girls
 
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
VIP Call Girls Kavuri Hills ( Hyderabad ) Phone 8250192130 | ₹5k To 25k With ...
 
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311  Call Girls in Thane , Independent Escort Service ThanePallawi 9167673311  Call Girls in Thane , Independent Escort Service Thane
Pallawi 9167673311 Call Girls in Thane , Independent Escort Service Thane
 
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一
如何办理(UCLA毕业证书)加州大学洛杉矶分校毕业证成绩单留信学历认证原版一比一
 
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai GapedCall Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
Call Girls Dubai Slut Wife O525547819 Call Girls Dubai Gaped
 
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
哪里办理美国宾夕法尼亚州立大学毕业证(本硕)psu成绩单原版一模一样
 

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”