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 memory & Memory Storage Devices.
Computer memory & Memory Storage Devices.Computer memory & Memory Storage Devices.
Computer memory & Memory Storage Devices.RajThakuri
 
Introduction to embedded system design
Introduction to embedded system designIntroduction to embedded system design
Introduction to embedded system designMukesh Bansal
 
Introduction to arm architecture
Introduction to arm architectureIntroduction to arm architecture
Introduction to arm architectureZakaria Gomaa
 
Working of Volatile and Non-Volatile memory
Working of Volatile and Non-Volatile memoryWorking of Volatile and Non-Volatile memory
Working of Volatile and Non-Volatile memoryDon Caeiro
 
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITYSYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITYGOKUL SREE
 
Communication Interface of The Embedded Systems
Communication Interface of The Embedded Systems Communication Interface of The Embedded Systems
Communication Interface of The Embedded Systems VijayKumar5738
 
Linux Directory Structure
Linux Directory StructureLinux Directory Structure
Linux Directory StructureKevin OBrien
 
Embedded system design process
Embedded system design processEmbedded system design process
Embedded system design processRAMESHBABU311293
 
Computer storage & type of storage.
Computer storage & type of storage.Computer storage & type of storage.
Computer storage & type of storage.Niloy Biswas
 
Virtual Machines - Virtual Box
Virtual Machines  - Virtual BoxVirtual Machines  - Virtual Box
Virtual Machines - Virtual BoxLahiru Danushka
 
1: Interfacing using ARM Cortex M4 || IEEE SSCS AlexSC
1: Interfacing using ARM Cortex M4 || IEEE SSCS AlexSC 1: Interfacing using ARM Cortex M4 || IEEE SSCS AlexSC
1: Interfacing using ARM Cortex M4 || IEEE SSCS AlexSC IEEE SSCS AlexSC
 
Motherboard and its components
Motherboard and its componentsMotherboard and its components
Motherboard and its componentsJishnu Pradeep
 

What's hot (20)

Computer memory & Memory Storage Devices.
Computer memory & Memory Storage Devices.Computer memory & Memory Storage Devices.
Computer memory & Memory Storage Devices.
 
What is-32-bit-and-64-bit
What is-32-bit-and-64-bitWhat is-32-bit-and-64-bit
What is-32-bit-and-64-bit
 
Introduction to embedded system design
Introduction to embedded system designIntroduction to embedded system design
Introduction to embedded system design
 
Introduction to arm architecture
Introduction to arm architectureIntroduction to arm architecture
Introduction to arm architecture
 
Working of Volatile and Non-Volatile memory
Working of Volatile and Non-Volatile memoryWorking of Volatile and Non-Volatile memory
Working of Volatile and Non-Volatile memory
 
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITYSYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
SYSTEM ADMINISTRATION AND MAINTENANCE NOTES PERIYAR UNIVERSITY
 
Communication Interface of The Embedded Systems
Communication Interface of The Embedded Systems Communication Interface of The Embedded Systems
Communication Interface of The Embedded Systems
 
Linux Directory Structure
Linux Directory StructureLinux Directory Structure
Linux Directory Structure
 
File System FAT And NTFS
File System FAT And NTFSFile System FAT And NTFS
File System FAT And NTFS
 
HARD DISK DRIVE ppt
HARD DISK DRIVE pptHARD DISK DRIVE ppt
HARD DISK DRIVE ppt
 
Embedded system design process
Embedded system design processEmbedded system design process
Embedded system design process
 
Computer storage & type of storage.
Computer storage & type of storage.Computer storage & type of storage.
Computer storage & type of storage.
 
Virtual Machines - Virtual Box
Virtual Machines  - Virtual BoxVirtual Machines  - Virtual Box
Virtual Machines - Virtual Box
 
1: Interfacing using ARM Cortex M4 || IEEE SSCS AlexSC
1: Interfacing using ARM Cortex M4 || IEEE SSCS AlexSC 1: Interfacing using ARM Cortex M4 || IEEE SSCS AlexSC
1: Interfacing using ARM Cortex M4 || IEEE SSCS AlexSC
 
operating system structure
operating system structureoperating system structure
operating system structure
 
Embedded c
Embedded cEmbedded c
Embedded c
 
RTOS - Real Time Operating Systems
RTOS - Real Time Operating SystemsRTOS - Real Time Operating Systems
RTOS - Real Time Operating Systems
 
Processor types
Processor typesProcessor types
Processor types
 
Processors selection
Processors selectionProcessors selection
Processors selection
 
Motherboard and its components
Motherboard and its componentsMotherboard and its components
Motherboard and its components
 

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

怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证tufbav
 
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...amitlee9823
 
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...gajnagarg
 
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
 
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...amitlee9823
 
Point of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratoryPoint of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratoryoyebolasonuga14
 
Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...gajnagarg
 
➥🔝 7737669865 🔝▻ Muzaffarpur Call-girls in Women Seeking Men 🔝Muzaffarpur🔝 ...
➥🔝 7737669865 🔝▻ Muzaffarpur Call-girls in Women Seeking Men  🔝Muzaffarpur🔝  ...➥🔝 7737669865 🔝▻ Muzaffarpur Call-girls in Women Seeking Men  🔝Muzaffarpur🔝  ...
➥🔝 7737669865 🔝▻ Muzaffarpur Call-girls in Women Seeking Men 🔝Muzaffarpur🔝 ...amitlee9823
 
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
 
Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...
Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...
Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...gajnagarg
 
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...amitlee9823
 
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)amitlee9823
 
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...amitlee9823
 
Call Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance Bookingroncy bisnoi
 
Just Call Vip call girls Berhampur Escorts ☎️9352988975 Two shot with one gir...
Just Call Vip call girls Berhampur Escorts ☎️9352988975 Two shot with one gir...Just Call Vip call girls Berhampur Escorts ☎️9352988975 Two shot with one gir...
Just Call Vip call girls Berhampur Escorts ☎️9352988975 Two shot with one gir...gajnagarg
 
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...amitlee9823
 

Recently uploaded (20)

CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Mayapuri  (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Mayapuri (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
怎样办理维多利亚大学毕业证(UVic毕业证书)成绩单留信认证
 
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men  🔝kakinada🔝   Escor...
➥🔝 7737669865 🔝▻ kakinada Call-girls in Women Seeking Men 🔝kakinada🔝 Escor...
 
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Bhiwandi Escorts ☎️9352988975 Two shot with one girl...
 
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
 
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
Vip Mumbai Call Girls Andheri East Call On 9920725232 With Body to body massa...
 
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
(INDIRA) Call Girl Napur Call Now 8617697112 Napur Escorts 24x7
 
Point of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratoryPoint of Care Testing in clinical laboratory
Point of Care Testing in clinical laboratory
 
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICECHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
CHEAP Call Girls in Vinay Nagar (-DELHI )🔝 9953056974🔝(=)/CALL GIRLS SERVICE
 
Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...
Just Call Vip call girls Shillong Escorts ☎️9352988975 Two shot with one girl...
 
➥🔝 7737669865 🔝▻ Muzaffarpur Call-girls in Women Seeking Men 🔝Muzaffarpur🔝 ...
➥🔝 7737669865 🔝▻ Muzaffarpur Call-girls in Women Seeking Men  🔝Muzaffarpur🔝  ...➥🔝 7737669865 🔝▻ Muzaffarpur Call-girls in Women Seeking Men  🔝Muzaffarpur🔝  ...
➥🔝 7737669865 🔝▻ Muzaffarpur Call-girls in Women Seeking Men 🔝Muzaffarpur🔝 ...
 
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...
 
Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...
Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...
Just Call Vip call girls chhindwara Escorts ☎️9352988975 Two shot with one gi...
 
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Chikhali Call Me 7737669865 Budget Friendly No Advance Booking
 
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
Kothanur Call Girls Service: 🍓 7737669865 🍓 High Profile Model Escorts | Bang...
 
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
Escorts Service Sanjay Nagar ☎ 7737669865☎ Book Your One night Stand (Bangalore)
 
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
Vip Mumbai Call Girls Kalyan Call On 9920725232 With Body to body massage wit...
 
Call Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance BookingCall Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance Booking
Call Girls Pimple Saudagar Call Me 7737669865 Budget Friendly No Advance Booking
 
Just Call Vip call girls Berhampur Escorts ☎️9352988975 Two shot with one gir...
Just Call Vip call girls Berhampur Escorts ☎️9352988975 Two shot with one gir...Just Call Vip call girls Berhampur Escorts ☎️9352988975 Two shot with one gir...
Just Call Vip call girls Berhampur Escorts ☎️9352988975 Two shot with one gir...
 
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
Bommasandra Call Girls: 🍓 7737669865 🍓 High Profile Model Escorts | Bangalore...
 

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”