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

Computer software
Computer softwareComputer software
Computer softwareSakib3017
 
Computer Hardware Basics
Computer Hardware BasicsComputer Hardware Basics
Computer Hardware BasicsMark Rotondella
 
Operating system.ppt (1)
Operating system.ppt (1)Operating system.ppt (1)
Operating system.ppt (1)Vaibhav Bajaj
 
Presentation on Operating System & its Components
Presentation on Operating System & its ComponentsPresentation on Operating System & its Components
Presentation on Operating System & its ComponentsMahmuda Rahman
 
Types of Programming Languages
Types of Programming LanguagesTypes of Programming Languages
Types of Programming LanguagesJuhi Bhoyar
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating SystemTech_MX
 
Introduction to computer Powerpoint Presentation
Introduction to computer Powerpoint PresentationIntroduction to computer Powerpoint Presentation
Introduction to computer Powerpoint PresentationJibin Sr. Plamoottukada
 
Integrated Development Environments (IDE)
Integrated Development Environments (IDE) Integrated Development Environments (IDE)
Integrated Development Environments (IDE) SeanPereira2
 
Basic structure of computers
Basic structure of computersBasic structure of computers
Basic structure of computersKumar
 
Computer system architecture
Computer system architectureComputer system architecture
Computer system architectureKumar
 
Computer Organization Lecture Notes
Computer Organization Lecture NotesComputer Organization Lecture Notes
Computer Organization Lecture NotesFellowBuddy.com
 
Central Processing Unit
Central Processing UnitCentral Processing Unit
Central Processing UnitJan Ralph
 

What's hot (20)

Operating systems
Operating systems Operating systems
Operating systems
 
Computer software
Computer softwareComputer software
Computer software
 
Computer Hardware Basics
Computer Hardware BasicsComputer Hardware Basics
Computer Hardware Basics
 
Motherboard ppt
Motherboard pptMotherboard ppt
Motherboard ppt
 
Operating system.ppt (1)
Operating system.ppt (1)Operating system.ppt (1)
Operating system.ppt (1)
 
Presentation on Operating System & its Components
Presentation on Operating System & its ComponentsPresentation on Operating System & its Components
Presentation on Operating System & its Components
 
Memory system
Memory systemMemory system
Memory system
 
Types of Programming Languages
Types of Programming LanguagesTypes of Programming Languages
Types of Programming Languages
 
Computer ports
Computer portsComputer ports
Computer ports
 
Cpu ppt cse
Cpu ppt cseCpu ppt cse
Cpu ppt cse
 
Real time Operating System
Real time Operating SystemReal time Operating System
Real time Operating System
 
Storage devices
Storage devicesStorage devices
Storage devices
 
Introduction to computer Powerpoint Presentation
Introduction to computer Powerpoint PresentationIntroduction to computer Powerpoint Presentation
Introduction to computer Powerpoint Presentation
 
Operating System PPT
Operating System PPTOperating System PPT
Operating System PPT
 
Integrated Development Environments (IDE)
Integrated Development Environments (IDE) Integrated Development Environments (IDE)
Integrated Development Environments (IDE)
 
Basic structure of computers
Basic structure of computersBasic structure of computers
Basic structure of computers
 
Computer system architecture
Computer system architectureComputer system architecture
Computer system architecture
 
Computer Organization Lecture Notes
Computer Organization Lecture NotesComputer Organization Lecture Notes
Computer Organization Lecture Notes
 
Embedded systems basics
Embedded systems basicsEmbedded systems basics
Embedded systems basics
 
Central Processing Unit
Central Processing UnitCentral Processing Unit
Central Processing Unit
 

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

Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in DammamAbortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammamahmedjiabur940
 
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证ehyxf
 
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证wpkuukw
 
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...drmarathore
 
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一ougvy
 
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证tufbav
 
怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证
怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证
怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证ehyxf
 
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime GuwahatiGuwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahatimeghakumariji156
 
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证wpkuukw
 
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理uodye
 
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...nirzagarg
 
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制uodye
 
Mankhurd Call Girls, 09167354423 Mankhurd Escorts Services,Mankhurd Female Es...
Mankhurd Call Girls, 09167354423 Mankhurd Escorts Services,Mankhurd Female Es...Mankhurd Call Girls, 09167354423 Mankhurd Escorts Services,Mankhurd Female Es...
Mankhurd Call Girls, 09167354423 Mankhurd Escorts Services,Mankhurd Female Es...Priya Reddy
 
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...samsungultra782445
 
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证wpkuukw
 
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证ehyxf
 
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理uodye
 
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一uodye
 

Recently uploaded (20)

Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in DammamAbortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
Abortion Pill for sale in Riyadh ((+918761049707) Get Cytotec in Dammam
 
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
怎样办理圣芭芭拉分校毕业证(UCSB毕业证书)成绩单留信认证
 
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
一比一定(购)新西兰林肯大学毕业证(Lincoln毕业证)成绩单学位证
 
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
Abort pregnancy in research centre+966_505195917 abortion pills in Kuwait cyt...
 
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
在线制作(ANU毕业证书)澳大利亚国立大学毕业证成绩单原版一比一
 
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
 
怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证
怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证
怎样办理阿德莱德大学毕业证(Adelaide毕业证书)成绩单留信认证
 
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime GuwahatiGuwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
Guwahati Escorts Service Girl ^ 9332606886, WhatsApp Anytime Guwahati
 
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
一比一定(购)坎特伯雷大学毕业证(UC毕业证)成绩单学位证
 
Abortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Jeddah |+966572737505 | Get CytotecAbortion pills in Jeddah |+966572737505 | Get Cytotec
Abortion pills in Jeddah |+966572737505 | Get Cytotec
 
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
一比一原版(USYD毕业证书)澳洲悉尼大学毕业证如何办理
 
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
Top profile Call Girls In Ratlam [ 7014168258 ] Call Me For Genuine Models We...
 
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pillsIn Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
In Riyadh Saudi Arabia |+966572737505 | Buy Cytotec| Get Abortion pills
 
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
一比一原版(Otago毕业证书)奥塔哥理工学院毕业证成绩单学位证靠谱定制
 
Mankhurd Call Girls, 09167354423 Mankhurd Escorts Services,Mankhurd Female Es...
Mankhurd Call Girls, 09167354423 Mankhurd Escorts Services,Mankhurd Female Es...Mankhurd Call Girls, 09167354423 Mankhurd Escorts Services,Mankhurd Female Es...
Mankhurd Call Girls, 09167354423 Mankhurd Escorts Services,Mankhurd Female Es...
 
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
Abortion pills in Jeddah +966572737505 <> buy cytotec <> unwanted kit Saudi A...
 
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
一比一定(购)UNITEC理工学院毕业证(UNITEC毕业证)成绩单学位证
 
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
怎样办理昆士兰大学毕业证(UQ毕业证书)成绩单留信认证
 
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
一比一维多利亚大学毕业证(victoria毕业证)成绩单学位证如何办理
 
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
在线制作(UQ毕业证书)昆士兰大学毕业证成绩单原版一比一
 

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”