Top Banner
1/41 Advancement on Embedded System Design (Linux) Professor Dr R. Badlishah Ahmad Universiti Malaysia Perlis (UniMAP) 2014 http://www.researchgate.net/profile/RBadlishah_Ahmad
41
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Advancement on embedded linux-v2

1/41

Advancement on Embedded System

Design (Linux)Professor Dr R. Badlishah AhmadUniversiti Malaysia Perlis (UniMAP)

2014

http://www.researchgate.net/profile/RBadlishah_Ahmad

Page 2: Advancement on embedded linux-v2

2/41

Contents

Embedded Operating System FOSS Embedded System Embedded Operating System (OS) Advantages For Developers

Hardware: Single Board Computer (SBC)

Advantages of using SBC

GNU/Linux – Advantages & Samples

Example – Smart Camera

Challenges for New Developers

Conlusion

Page 3: Advancement on embedded linux-v2

3/41

Embedded Systems

Embedded System Definition: Wikipedia definition: “a special-purpose computer system, which is completely encapsulated by the device it controls”– Never meant to be traditional, general purpose

computers– Examples: mobile phones, home multimedia, network

appliances, transportation or industrial control...– Use a general purpose processor (most popular ones: arm, x86, ppc) or even a much simpler microcontroller.

See http://en.wikipedia.org/wiki/Embedded_system

Page 4: Advancement on embedded linux-v2

4/41

Embedded Market

In embedded systems, Free/Open Source Software (FOSS) systems ate a significant portion of the market of traditional proprietary systems.

Page 5: Advancement on embedded linux-v2

5/41

Embedded Operating System

Embedded Operating System (EOS) is a software program that manages all other programs in embedded devices

EOS is a small OS designed to operate with embedded devices to perform certain tasks which control effectively all the hardware components

~50MB http://www.damnsmalllinuxdamnsmalllinux.org/

Page 6: Advancement on embedded linux-v2

6/41

Embedded Operating System

Real-Time & Non Real-Time (commercial!!) QNX, DOS, Windows CE, LynxOS VxWorks PSOS RTLinux

Other Choices?? FOSS based OS create your own? Yes, modify GNU/Linux

kernel!!!! FREE

Page 7: Advancement on embedded linux-v2

7/41

Linux

The most popular.Very big and active developer community

Supports many architectures, devices and protocols

Minimum requirements: 32 bit processor, 2 MB of RAM, 1 MB of storage space (can even fit in 500 KB!)

License: GNU GPLKernel code: use with care to avoid license violations.Great for Linux users though (more free code!)

Page 8: Advancement on embedded linux-v2

8/41

NetBSD

http://netbsd.org Highly portable BSD system. Supports many architectures and embedded boards! Smaller community but very active too! Minimum RAM and storage requirements should be similar to

those of Linux License: BSD. No worries with license violations, but doesn't

require driver code to be free (some drivers kept proprietary?) See http://foss.in/2005/slides/netbsd-linux.pdf

for a very nice comparison between Linux and NetBSD

Page 9: Advancement on embedded linux-v2

9/41

eCos

http://ecos.sourceware.org/ Very lightweight real-time embedded system

contributed by Red Hat / Cygnus solutions. Compatible with most Unix and Linux applications. For extremely small systems: supports 16 bit processors, and a few

hundreds of KB of RAM and storage (like 300 KB) are more than enough.

Kernel + applications can even fit within 50 KB (minimalistic system)!

License: GPL (with minor adjustments)

Page 10: Advancement on embedded linux-v2

10/41

uClinux

http://uclinux.org/ (pronounce “You See Linux”) Linux for micro controllers, processors with no MMU Mainly used for very small and low cost

embedded systems Kernel: originally a Linux kernel derivative.

Now more and more closely integrated in mainstream Linux

Applications: standard embedded Linux applications with patches to address special memory constraints

Page 11: Advancement on embedded linux-v2

Computer vs. Embedded Linux

Linux kernel

GNU C library

libjpeg, libstdc++, libxml, libvorbis...

ls, vi, wget, ssh, httpd, gcc...

Web browser, office, multimedia...

Command line utilities

Kernel

C library

Shared libraries

User interface

Traditional GNU/Linux system Embedded Linux system

uClibc Much lighterthan GNU libc!

libjpeg, libstdc++, libxml, libvorbis...

busybox(ls, vi, wget, httpd...)dropbear (ssh)...

Much lighterimplementations!No development tools

Linux kernel

Custom interface

Lightweight kernelwith only neededfeatures and drivers

Full kernel with most featuresand with drivers for all kindsof PC hardware on the planet!

Graphics,web browser,web server...

Page 12: Advancement on embedded linux-v2

12/41

Advantages for System Developers

Page 13: Advancement on embedded linux-v2

13/41

Innovation and Added Value

Lots of ready-to-use components for most parts of the system Focus on the innovative part of your product, what

differentiates it No need to wait for months or years for some features to be

implemented by others

– can implement the critical ones that you need Constant innovation Features brought in at a quick pace, sometimes even before

you need them! Possible to port Linux to a new innovative architecture

(processors)

Page 14: Advancement on embedded linux-v2

14/41

Hardware

Page 15: Advancement on embedded linux-v2

15/41

Single Board Computer (SBC)

Characteristics✔ Computer like✔ Manufactures with important peripherals✔ Stand-alone computer✔ Ready-made device

Constraint✔ Small RAM (in comparison to Desktop)

Page 16: Advancement on embedded linux-v2

16/41

Advantech’s “Half-Biscuit” Ampro’s EnCore

Kontron’s Standalone SBCKontron’s EPIC SBC

TS-7200 ARM SBC

TS-5500 PC/104

Choices of SBC

Page 17: Advancement on embedded linux-v2

17/41

Choices of SBC

PandaBoard

Rasberry Pi

Page 18: Advancement on embedded linux-v2

18/41

When & Why to use SBC

Faster Time to Market Proven design by vendor -> reliable design and

reduce risk of defect More vendor choices (different size, functions and

price options Lack of resources (hardware designer) Lack of manufacturing capabilities

Page 19: Advancement on embedded linux-v2

19/41

Advantages of using SBC & FOSS

Faster speed development Reduce development speed Increasing clock speed Capabilities of using Open Source Software

(OSS)/Free Software (FS) Support high level programming

Page 20: Advancement on embedded linux-v2

20/41

When & Why to use SBC

Faster Time to Market Proven design by vendor -> reliable design and

reduce risk of defect More vendor choices (different size, functions and

price options Lack of resources (hardware designer) Lack of manufacturing capabilities

Page 21: Advancement on embedded linux-v2

21/41

FOSS

Free Software/Open Source Software A type of software defined by its collaborative

development model, accessibility of code and distribution models.– Examples of FOSS: GNU/Linux kernel,

GNU Compiler Collection (GCC), Open Office, GIMP (Image Editor), Wireshark etc.

In contrast with proprietary software which is only available in a binary “closed” format & typically carries a licence fee– Examples : M$

Page 22: Advancement on embedded linux-v2

22/41

FOSS

Free Software grants the below 4 freedoms to the user:

The freedom to run the program, for any purposeThe freedom to study how the program works,and adapt it to one's needsThe freedom to redistribute copies to help othersThe freedom to improve the program, and release one's improvements to the public

See http://www.gnu.org/philosophy/free-sw.html

Page 23: Advancement on embedded linux-v2

FOSS - Unix family treeTime1970 19901980 2000

Bell Labs (AT&T)

Ken ThompsonDennis Ritchie (C languagecreated to implement a portable OS)

BSD (Berkeley Software Distribution)

Sun Solaris

SunOS (Stanford University Network)

NetBSD

NextStep

 AIX (IBM)

HP­UX

IRIX (SGI)

SRV5

OpenBSD

FreeBSD

MacOS X

Bill Joy

Richard Stallman Linus Torvalds

BSD family

System V familyRitchie, Thompson

GNU

Bill Joy

GNU / Linux

Page 24: Advancement on embedded linux-v2

24/41

GNU/Linux

Unix-based OS originally developed for Intel-compatible PC's

Modern OS -> include features such as virtual memory, memory protection and preemptive multitasking

Support TCP/IP for de-facto Networking Good Thing!!!! Source code available!!! (Open

Source/Free Software)

Page 25: Advancement on embedded linux-v2

25/41

GNU/Linux

Embedded Linux is increasing due to ability to modify subsystem code to suit their designs

Support Portable Operation Interface (POSIX) -> easy to port existing code to different processor architecture

NOW!! GNU/Linux are available for x86, SPARC, ARM, PowerPC, MIPS etc....

Page 26: Advancement on embedded linux-v2

26/41

GNU/Linux Advantages

Robust Features – multi-threaded, multi-functions Scalability – can run on flash cards and boards to

PCs and larger system Widespread acceptance – community of

programmers available Low Cost – NO ROYALTIES!!!!

Page 27: Advancement on embedded linux-v2

27/41

Embedded GNU/Linux

Page 28: Advancement on embedded linux-v2

28/41

Embedded GNU/Linux

Page 29: Advancement on embedded linux-v2

29/41

Embedded GNU/Linux

Page 30: Advancement on embedded linux-v2

30/41

Example : Smart Camera

A sample of Embedded GNU/Linux developed in UniMAP potential for projects such as:✔ Video Wireless Sensor Network (VWSN) for

Traffic Surveillance SystemUsing GNU/Linux & Free Software tools (GCC)Using TS5500 SBC BoardDevelopment tasks:✔ Integrating Web Camera✔ Developing software for image capture, image

conversion, image manipulations and socket programming

Page 31: Advancement on embedded linux-v2

31/41

Smart Camera

Situation awareness is the key to security and safetyTraffic operators are assigned the task of visual monitoring and threat detection process which is tedious and error prone for a human investigator

Page 32: Advancement on embedded linux-v2

Introduction

Problems: Inefficient network monitoring

● traffic operators are burden with visual monitoring task, therefore a threat detection process would be ineffective, unreliable and prone to error

● the presence of stationary vehicle on the road, especially at a critical places could cause a secondary crashes, traffic congestion and other traffic incident.

Therefore, there is a NEED of a vision system to give earlier detection and notification of stationary vehicle to the security personnel or traffic operator on the events

Page 33: Advancement on embedded linux-v2

Objective

To develop, integrate, configure and analyze the performance of Embedded Vision System for stationary vehicle detection utilizing

GNU/Linux and Single Board Computer

Page 34: Advancement on embedded linux-v2

System Overview

Network

SBC

Monitor

Alarm

USB Webcam

Supervision Center

Smart Camerautilizing SBC as a processor and Logitech Quickcam Pro 4000 web camera as an image sensor. Task : to monitor road conditions and detect stationary vehicle inside the monitoring area.If the object of interest is detected on the scene, the system will notify the operators by transmitting the image to the supervision center.

Page 35: Advancement on embedded linux-v2

Hardware

SENSING UNIT

LOGITECH QUICKCAM PRO4000

● VGA-sized (640x480 pixel) CCD sensor● capture video at maximum 30 frames

per second. ● driver used : pwc-8.8 & usb-pwcx-8.2.2

PROCESSING & COMMUNICATION UNIT

TS-5500 SINGLE BOARD COMPUTER

AMD Elan 520 processor (133 Mhz) 32 MB RAM 10/100 Base-T Ethernet port

Page 36: Advancement on embedded linux-v2

Software Module

Divided into 3 modules:✔ Module 1: Image Acquisition✔ Module 2: Image Processing and Object Detection✔ Module 3: Data Transmission

Page 37: Advancement on embedded linux-v2

ProcessesIMAGE CAPTUREIMAGE CAPTURE

COLOR SPACE COLOR SPACE CONVERSIONCONVERSION

FRAME FRAME DIFFERENCINGDIFFERENCING

NOISE NOISE REMOVALREMOVAL

OBJECT OBJECT EXTRACTIONEXTRACTION

FILTERING FILTERING (CONVOLUTION)(CONVOLUTION)

DETECTION & DETECTION & IMAGE SAVING IMAGE SAVING

& & NOTIFICATIONNOTIFICATION

Page 38: Advancement on embedded linux-v2

Performance Analysis

Specification Desktop PC SBC

Processor Type Intel(R) Pentium(R) 4 CPU AMD Elan 520

Processor Speed 2.66 GHz 133 MHz

RAM Size 512 MB 32 MB

Operating System Mandriva 2006 TS-Linux

Smart Camera Operation Platform

Overall Processing (s)

Desktop PC 6.09

TS-5500 SBC 38.82

Page 39: Advancement on embedded linux-v2

39/41

Challenges for Developers

Understanding system & file structure Revising programming skill in C/C++ for socket

programming, shell programming & database Ability to do various system configuration using CLI Understanding cross compiling process & techniques Difficulties to integrate external devices such as Webcam,

touchscreen etc.. :Kernel version mismatch!! Difficulties to compile on the SBC!! programming are done

on a host PC Execution problem on SBC board due to library mismatch

between host PC and SBC Limited/No Technical support

Page 40: Advancement on embedded linux-v2

40/41

Conclusion

Embedded GNU/Linux and the use of SBC can be extended into many more fields such as automation, robotic, firewall, intrusion detection system, carried grade telecommunication and network devices

The availability of FOSS, Linux kernel and GNU application development tools, ANY applications or system can be build!!!!

Wide opportunities for other embedded system development Exercise your FREEDOM by using FOSS Technology is HERE, Human Resource?

Page 41: Advancement on embedded linux-v2

41/41

Q&A

SMART CAMERA PROTOTYPE