More Related Content
Similar to Introduction to Embedded Systems
Similar to Introduction to Embedded Systems(20)
More from Anil Kumar Pugalia
More from Anil Kumar Pugalia(20)
Introduction to Embedded Systems
- 1. © 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Introduction to Embedded Systems
- 2. 2© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
What to Expect?
W's of Embedded Systems
ES Software Development
Roles of OSS in Embedded Systems
W's of Embedded Linux
- 3. 3© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
What is an Embedded System?
- 4. 4© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Embedded System
“Any Hardware System
which is intended to do a specific task
can be called
as an Embedded System”
- 5. 5© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Why we need an Embedded System?
What do you think of your Desktops?
What about
Mobiles
Microwave Ovens
Industrial Control Systems
Bottom line is, we need
Better
Miniaturization
Automation
- 6. 6© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
What is Real Time?
Correctness depends on
Functional Accuracy, and
Timings of the Result produced
Examples
MPEG Decoder in your DVD player
Call Response in your Mobile Phone
- 7. 7© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Real Time Types
Hard Real Time
Guaranteed to meet the response reqs
Examples: Defense Systems, Vehicle Control
Systems, Satellite Systems
Soft Real Time
Once in a while may not meet the response reqs
Examples: Multimedia Devices, VoIP, CE devices
- 8. 8© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Embedded &/or Real Time
Few questions to understand:
Where do we need Embedded?
Where do we need Real Time?
Are both required? If yes, when
If no, then which one?, Or
None
- 9. 9© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Embedded Systems (ES) Overview
Applications
Categories
Requirements
Trends in ES Development
Common Design Metrics
Hardware Components
Software Components
- 10. 10© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Applications of ES
Household Appliances
Home Automation Products
Networked Appliances
Medical Equipments
Computer Peripherals
And so on..!
- 11. 11© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Categories of ES
Stand-alone Embedded Systems
Real-time Embedded Systems
Network Appliances
Mobile Devices
- 12. 12© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Requirements of ES
Reliability
Cost-effectiveness
Low Power Consumption
Efficient Usage of Processing Power
Efficient Usage of Memory
Appropriate Execution Time
- 13. 13© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Trends in ES Development
Processors
Memory
Operating Systems
Programming Languages
Development Tools
- 14. 14© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Common Design Metrics
Time to Prototype
Power
Performance & Correctness
Size
Non-Recurring Engineering
Maintainability & Flexibility
Safety
Unit Cost
Time to Market
- 15. 15© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Typical Hardware Components of ES
Debug
Serial
Port
NAND
NOR
SDRAM
Domain-specific Electronics/Actuators/
Sensors/Bluetooth/Infrared/GSM/GPRS/
GPS/3G/Biometrics/SmartCard/Encryption
JTAG
Connectivity
CPLD/FPGA
Touch
Controller
LCD Panel
Keys,
Buttons,
LEDs
CF Slot
USB Device
Port
USB
Host Port
Amplifier EEPROM
RTC
Codec
Smart
Battery
UART/USB/I2C/SPI
CAN/A2D/D2A/...
Embedded SoC
SPI/USB/
Serial/ADC
CPU Core
Internal Local Bus
UARTNAND
Controller
ADDR/Data/CS
GPIO
PortsLCD
Controller
I2
C I2
S SPI PCMCIASDUSB OTG
SD Slot
Touch Panel
Boot
Logic
- 16. 16© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
The Hardware
Hardware (or Target Board / Platform)
As a software developer, you would get it
But you should have the relevant stuff handy
Schematics
Data Sheets
Basic Hardware Knowledge
These help to at least narrow down problems
You would need to know more in-depth, if you are
A BSP or Driver Developer
- 17. 17© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Software Components of ES
Bare Metal Firmware
Single Piece of Software
All Functionalities into One
Good for Simple Functionalities
Needs good knowledge of Hardware & Embedded C
Becomes Non-trivial for Complex Features
Multi-tasking
Debugability
Maintainability
Operating System Based
- 18. 18© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Software Components of OS-based ES
Five Buckets
Bootloaders (Multiple Stages)
Tool chain (Native &/or Cross)
Operating System & BSP
Customized Applications and Programs
Place to Store the various Stuff
- 19. 19© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Bootloaders
Software to bootstrap / boot up the final software
May have multiple stages
Nowadays, the 0th stage into the SoCs
But need to have the remaining stages
Boards from vendors, typically have them
But if you are the vendor, you will have to put it
Nowadays, OSS Bootloaders are pretty common
- 20. 20© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Toolchain
Tool chain is referred to a collection of tools
Tools which are used to generate target binaries
Types
Native – For host binary-compatible target
Cross – For host binary-incompatible target
Consists of
C Compiler
Set of C Libraries (& the Headers)
Binary Utilities
Nowadays, mostly available pre-built
- 21. 21© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Operating System
Piece of software providing the basic services
Supports various drivers for the Target
Choosing an OS is a significant decision
Typical Expectations for an OS to be Embedded
Available for the particular architecture (CPU Core)
Should be able to fit in the space & performance budget
Is extensible, without significant effort – preferably modular
Easy to add Applications
Has good information support, e.g. documentation, trainings
Nowadays, OSS OS Linux suffices all & more of these needs
- 22. 22© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Board Support Package
In general, a one time effort
But needs both hardware & software expertise
More of all, excellent debugging abilities
Board Support Package (BSP)
Collection of drivers, utilities, … specific to the Target Platform
Required in addition with the Operating System
Typically provided by the Board Vendors
If our own board, start with a reference BSP
With Linux, things are moving towards Device Tree (DT)
Most of the device / platform specific support already in the kernel
Just a matter of creating the right DT to select the specific features
- 23. 23© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Applications & Programs
All these are fine. But no point without the ultimate goal
Dedicated Programs
Customized Applications
To achieve what actually the ES has been designed for
Written by developers as per the requirements
However, many available as OSS
Saves effort, time & money
But they may still need to be ported
And can't be proprietory
- 24. 24© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Place to Store
We have all kind of target executables
They need to be on the target to execute
Hence, the place to store
Categories
System – Bootloaders, OS, BSP
Configurations
Applications – Programs, …
Types
Root File System
Other Storage Organizations
- 25. 25© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Challenges in ES Software
Embedding an OS
Right Combination of File Systems
Drivers & Embedded Applications
Code Optimization
Efficient Inputs/Outputs
Fault Tolerance
Testing and Debugging
So, a key to a good Embedded System is
“Good design of Drivers & Embedded Apps”
- 27. 27© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
OSS Fundamentals
Originally Free Software
Freedom to Run, Change and Redistribute
Licenses – GNU GPL (Code) and GNU FDL (Doc)
The Freedom provides openness
Hence, also referred as Open Source Software
Over time FS & OSS have differed
But still largely same
Latest Complete Definitions
FS: http://www.gnu.org/philosophy/free-sw.html
OSS: http://www.opensource.org/osd.html
- 28. 28© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Industry Advantage
Stable Software – Less Development Cycle
Whole Community Support
Time to Market
And most of all, today OSS provides almost a complete set of
software required for any kind of development, including
Embedded Systems
Toolchains – gcc & friends
Bootloaders – u-boot
OS – Linux
Drivers – With the OS
Languages – Whole set from the world :)
Applications, GUIs, Utilities, … - All GPL or LGPL stuff
- 29. 29© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Why to choose OSS & Linux
for Embedded Systems?
Quality and Reliability of Code
Availability of Code
Extensive Hardware Support
Communication Protocols and Software Standards
Available Tools
Community Support
Licensing
Vendor Independence
Cost
And, a wide range of Architecture Support
- 30. 30© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Linux on Architectures
x86
Started with this
Mainly intended for PCs
Power PC
Intended for PC
Have become popular in embedded
Strong ARM
Faster CPU – Higher Performance
PDAs, Setup box etc.
ARM
Suits well for Embedded
Include THUMB – reduce code bandwidth
High density code than PPC, x86
Many More
Alpha, H8, MIPS, Sparc, SuperH, ...
- 31. 31© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
W's of Embedded Linux
- 32. 32© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
What is Embedded Linux?
Linux tuned for Embedded Systems
- 33. 33© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Historical Perspective
1991: Linux by Linus Benedict Torvalds
1996: Linux into Hard Real Time Embedded Systems Research Project
1997: uCLinux started as Linux for non-MMU processors
1998: uCLinux released
1999: BlueCat Linux announced by Lynx real-time systems (now Lynux-Works)
2000: Mobile devices with Linux; MontaVista & Redhat jumped into the fray
2000: Busybox 0.43, Qt/Embedded released
2001: uClibc 0.9.8, Eclipse consortium were made
2002: Kernel Pre-emption, Low Latency, O(1) Scheduler Patches into the Kernel
2002: uClinux merged into mainstream Linux kernel 2.5.46
2003: Linux more into handsets, routers, …; Stress on Linux standardization & release of kernel 2.6.0
2004: BlueCat with kernel 2.6 & Linux in Automobile by Sony in Japan
...
Today: Embedded Linux is a preferred platform of lots of companies for their new design; Silicon
vendors like AMD, ARM, TI, Motorola, IBM, Intel, … use Embedded Linux as their board bringup and
demonstration platform
- 34. 34© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
To Summarize
With all the insights, in most* ES requirements
Embedded Linux is the obvious choice
And, we have the following choices to make
Which bootloader & version to use? (Architecture)
Which kernel version to use? (Driver & Debugging support)
Which toolchain version to use? (Kernel used)
Which libraries to use? (Feature vs Space trade off)
Which applications & versions to use? (Feature requirement)
Which (root) file system to use? (Data requirement)
Which development environment to use? (Productivity)
Support and Training Sources to decide (Productivity)
- 35. 35© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
What all have we visited?
W's of Embedded Systems
ES Software Development
The Five Components
Roles of OSS in Embedded Systems
Embedded Linux: The Obvious Choice
W's of Embedded Linux
- 37. 37© 2010-15 SysPlay Workshops <workshop@sysplay.in>
All Rights Reserved.
Typical Queries
Is Linux too large?
What is its memory footprint?
Is Linux real-time enough?
Which distribution to choose?