EMBEDDED SYSTEM
INTRODUCTION
HCMUTE – Faculty of Mechanical Engineering
Lecturer: PhD. Bui Ha Duc
Email: ducbh@[Link]
2
INSTRUCTOR INTRODUCTION
• Full Name: Bui Ha Duc
• From: Vung Tau City
• Bachelor: HCMC University of Technology
• Ph.D: National University of Singapore
(NUS)
• Research fellow / TA in NUS
• Join HCMUTE in 2015
• Lecturer in Department of Mechatronics –
FME
• Teaching: Microcontroller, Embedded
system, Digital signal processing.
3
COURSE OBJECTIVES
• To understand the principles and concepts
behind embedded systems
MCU: Raspberry
• To obtain hands-on experience in design and
programming embedded systems
• To practice Problem solving skill and team-
work skill
4
ORDER OF INTRUCTION
• Introduction to embedded system
➢ Architecture of embedded system.
➢ Embedded system Hardware
➢ Operating System for embedded system.
• Embedded system with Linux
➢ Linux Kernel
➢ Device driver
➢ Compiler
➢ Connecting peripheral devices
ORDER OF INTRUCTION
• Embedded system and internet of things
➢ Wireless communication
➢ Internet of things
➢ Webserver
➢ Control Hardware via webserver
• Image processing on Embedded board
➢ Object detection
➢ Object tracking
Raspberry Pi Platform
Raspberry Pi Platform
Raspberry emulator
• Setup tutorial
[Link]
• Package Required:
• Emulator Qemu: [Link]
• RPi kernel : [Link]
• Raspbain image: [Link]
12
References
• Derek Molloy, Exploring Raspberry Pi,
John Wiley & Sons, 2016.
o web: [Link]
o Source code:
[Link]
• Christopher Hallinan, Embedded Linux
Primer, 2nd edition, Prentice Hall 2011.
• Elecia White, Making Embedded
Systems, O’Reilly, 2011.
Exploring Raspberry Pi
14
What is an embedded system?
• An embedded system is a computerized system that is
purpose built for its application.
• Small device/component of a larger machine
• Have small processor installed
• Have software that control the device
• Must have real-time response
• Embedded systems are where the software meets the
physical world.
Embedded system architecture
Embedded system vs Computer
Computer system Embedded system
• General purpose • Specialized purpose
• Powerful hardware • Hardware has constrains
• Convenient to • Difficult to write software
develop software • Response in real-time
• Event-based action • Interfacing with hardware
Examples of Embedded system
• TV • watch
• stereo • alarm clock
• remote control • electronic musical instruments
• phone / mobile phone • electronic toys (stuffed
animals,handheld toys,
• refrigerator pinballs, etc.)
• microwave • medical home equipment (e.g.
bloodpressure, thermometer)
• electric tooth brush
• oven / rice or bread
cooker
What is a real-time system (RTS)?
• A RTS is an event driven system
• Events can be generated externally or internally
• Deadline must be satisfied in a timely manner
events actions
Real-time system
Real-time Fast
• A real-time system is not a fast system
• Speed is relative to specific environment
• Correct behavior is better than running
faster
Reliability in Embedded system
• It’s difficult to debug an embedded system
• Even final product can be suffered from bugs
• Transistor size becoming smaller – 14nm!
• Harder to fabricate
• Yield in semiconductor is decreasing
• As a result … more susceptible to fault
• e.g PS3 CPU has 8 processors only 6 to 7 processors
working
• Design a reliable, fault tolerant embedded system
is crucial → using modularity
Embedded Operating system
• Not all embedded systems have operating
systems
• E.g. Microwave oven, washing machine
• An operating system creates the ability to:
• serve a variety of purposes
• interact with users in more complicated ways
• keep up with needs that change over time
Operating system
Basically, an operating system does two
things:
• It manages the hardware and software resources
of the system.
• It provides a stable, consistent way for
applications to deal with the hardware without
having to know all the details of the hardware.
• API – Application program interface
Types of Operating Systems
• Real-time operating system (RTOS)
• Single-user, single task
• Palm, android
• Single-user, multi-tasking
• Windows, MacOS
• Multi-user
Embedded OS
• Embedded operating system is typically quite
limited in terms of function
• E.g. traffic lights, digital televisions, ATMs, digital
cameras, GPS navigation systems, elevators
• An embedded OS must be reliable and able to
run with constraints on memory, size and
processing power.
Embedded Linux
Why Linux?
• Linux supports a vast variety of hardware devices,
probably more than any other OS.
• Linux supports a huge variety of applications and
networking protocols.
• Linux has attracted a huge number of active developers,
enabling rapid support of new hardware architectures,
platforms, and devices.
• An increasing number of hardware and software vendors
support Linux.
Generic Architecture of an Embedded
Linux System
Read Request
Boot Loader
IDE H/W Interrupt