embedded systems 25 february 2015 lecture [email protected]
TRANSCRIPT
Definition of an embedded system:
Dedicated hardware and software,designed to perform a specific task.
Dedicated hardware and software
•Playing media, audio and video•TV signal decoding•Recording media (PVR = personal video recorder)•Low power consumption (energy saving)•Internet browsing •Communication with other devices: remote control, game pad, smartphone...
Dedicated hardware and software
•CPU•RAM and ROM•Ethernet, WiFi•HDD•Tuner•Decoder•Display (TV) •Audio and video output (HDMI)
Dedicated hardware and software
Low level: •Memory mapping•Interrupts•Bootloader•Kernel and Kernel modules•File system•I/O•Drivers•Usually C languge
Dedicated hardware and software
Middleware - System logic to implement the „Dedicated” features,
.e.g:•Web servers/clients•PVR
•Usually C++ language
Dedicated hardware and software
When hardware changes - drivers change.To avoid middleware changes there is a HAL = Hardware Abstraction Layer between Middleware and Drivers.
HAL
Drivers
Hardware
Middleware
Dedicated hardware and software
WebKit – open source engineJavaScript and HTML5 support
HAL
Drivers
Hardware
Middleware
Browser
Dedicated hardware and software
SDK for application developement
Public API for JavaScript
Allows to launch user applications on embedded systems
ApplicationsJavaScript and HTML5
HAL
Drivers
Hardware
Middleware
Browser
How does Browser (WebKit) plays video tag?
You can also implement you custom interface in similar way
How does Browser (WebKit) plays video tag?
Custom interface implementations allow the use of custom hardware through Middleware/HAL
HAL
Drivers
Hardware
Middleware
Browser (custom Webkit)
Public API example : tuneUp function
Middleware implements API functionsIn this example receives tuneUp request (channel change)
ApplicationsJavaScript and HTML5
HAL
Drivers
Hardware
Middleware
Browser
Public API example : tuneUp function
Middleware implements and manages the flow of channel change:
Tuner Frequency to digital
DemultiplexerParses video from mpegts Decoder
Video processing(de-noise, scaler)
Renderer(display)
Other Middleware examples
File I-frames indexer Decoder Buffer
...
Trickplay – fast forward video playing
Streaming video file to mobile device
File Buffer HTTP Server
So, what does it mean: programming for an embedded system?
•In most cases it is programming for Middleware layer – sophisticated logics•Usually C++ programming in Linux•Threads, buffers, memory management, design patterns, network, shared libraries, open source components (e.g ffmpeg, Gstreamer)...•Low Level programming
So, what does it mean: programming for an embedded system?
Non-recurring engineering:• Middleware/Low level devolepement is expensive but once it is done it can be duplicated with NO cost•Choise of more expensive hardware component can cause HUGE cost increase!•Whenever possible it is always better to place logic in middleware level
Quiz
Do you know an example of binding between JavaScript and C++? Remote Procedure Call (RPC)
How is it done in Facebook?
ApplicationsJavaScript and HTML5
HAL
Drivers
Hardware
Middleware
Browser