Sunteți pe pagina 1din 25

2008

Chapter-1L05: "Embedded Systems - " , Raj Kamal,


Publs.: McGraw-Hill Education
1
Lesson 5: Software for embedding
Lesson 5: Software for embedding
in System
in System
-
-
Part 2
Part 2
D
D
evice drivers, Device manager, OS, RTOS
evice drivers, Device manager, OS, RTOS
and Software tools
and Software tools
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
2
Outline
Outline
Device drivers
Device manager
Multitasking using an operating
system (OS) and Real time operating
system (RTOS)
Software tools
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
3
Devices
Devices
In an embedded system, there are
number of physical devices.
Physical devices keypad, LCD
display or touch screen, memory stick
(flash memory), wireless networking
device, parallel port and network-
card
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
4
Devices
Devices
In an embedded system, there are
number of virtual devices.
Virtual devices pipe, file, RAM disk,
socket,
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
5
Device Driver
Device Driver
A device driver is software for
controlling (configuring), receiving
and sending a byte or a stream of bytes
from or to a device.
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
6
Device Drivers
Device Drivers
A set of generic functions, such as create ( ),
open ( ), connect ( ), listen ( ), accept ( ),
read ( ), write ( ), close ( ), delete ( ) for use
by high level programmers
Each generic function calls a specific
software (interrupt service routine), which
controls a device function or device input
or output
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
7
Device controls and functions by :
1. Calling an ISR (also called Interrupt
Handler Routine) on hardware or
software interrupt
2. Placing appropriate bits at the control
register or word.
3. Setting status flag(s) in the status
register for interrupting, therefore
running (driving) the ISR, Resetting
the status flag after interrupt service.
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
8
Outline
Outline
Device drivers
Device manager
Multitasking using an operating
system (OS) and Real time operating
system (RTOS)
Software tools
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
9
Device Manager for the devices and
Device Manager for the devices and
drivers
drivers
Device Management software (usually
a part of the OS) provide codes for
detecting the presence of devices, for
initializing (configuring) these and for
testing the devices that are present.
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
10
Also includes software for allocating
and registering port(s) or device codes
and data at memory addresses for the
various devices at distinctly different
addresses, including codes for
detecting any collision between the
allocated addresses , if any
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
11
Outline
Outline
Device drivers
Device manager
Multitasking using an operating
system (OS) and Real time operating
system (RTOS)
Software tools
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
12
Concurrent Processes, tasks or
Concurrent Processes, tasks or
threads
threads
A System is composed of two
or more concurrent processes
that execute
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
13
Operating System
Operating System
Multitasking (multiprocessing or
multithreaded) software
Scheduling multiple tasks,
Processes, memory, device, ports,
network, file system, timers, event
functions, inter-processor
communication, shared memory,
security, GUIs, ... management
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
14
Real Time Operating System (RTOS)
Real Time Operating System (RTOS)
Embedded software is most often designed
for deterministic performance and task and
ISR latencies in addition to the OS
functions
Performing multiple actions and
controlling multiple devices and their ISRs
with defined real time constraints and with
deadlines for these
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
15
Real Time Operating System (RTOS)
Real Time Operating System (RTOS)
Task and ISRspriority allocations,
their preemptive scheduling, ..
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
16
RTOS and concurrent processes
OS for providing deterministic
performance during concurrent
processing and execution with hard
(stringent) or soft timing requirements
with priority allocation and
preemption
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
17
RTOS is needed when the tasks for the
system have real time constraints and
deadlines for finishing the tasks
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
18

OS
OS


C
C
OS
OS
-
-
II
II

VxWorks
VxWorks

Windows CE
Windows CE

OSEK
OSEK

Linux
Linux
2.6.24
2.6.24
or
or
RTLinux
RTLinux

QNX
QNX
Important
Important
RTOSes
RTOSes
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
19
Outline
Outline
Device drivers
Device manager
Multitasking using an operating
system (OS) and Real time operating
system (RTOS)
Software tools
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
20
1. Editor,
2. Interpreter,
3. Compiler,
4. Assembler and Cross Assembler,
IDE,
5. Prototyper
[Ref: Table 1.2 and Chapter 13 for details]
Development Tools
Development Tools
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
21
Application Software Development
Application Software Development
Tools
Tools
Source Code Engineering Tools
Stethoscope (tracks the switching from
one task to another as a function of
time, stores beats)
Trace Scope (traces changes in a
parameter(s) as a function of time)
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
22
A Simulator... To simulate the target
A Simulator... To simulate the target
processor and hardware elements on a
processor and hardware elements on a
host
host
PC and to run and test the executable module
PC and to run and test the executable module
Simulator
Simulator
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
23
To manage the files that associates
with a design stage project and keep
several versions of the source file(s) in
an orderly fashion.
Project Manager
Project Manager
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
24
Summary
Summary
We learnt:
Device and manager functions
OS and RTOSes
Tools
2008
Chapter-1L05: "Embedded Systems - " , Raj Kamal,
Publs.: McGraw-Hill Education
25
End of the Lesson
End of the Lesson

5
5

S-ar putea să vă placă și