You are on page 1of 12

Software Components –

The Application & The OS


M1: Introduction to Embedded Systems
Components of an Embedded System

FPGA/ASIC Memory

Sensors ADC CPU DAC Actuators

Diagnostic Human I/f


Port

Software
Embedded System Design - RL1.3.1 © K.R.Anupama & Meetha.V.Shenoy 2
Software

Appln Layer

RTOS

Hardware

Embedded System Design - RL1.3.1 © K.R.Anupama & Meetha.V.Shenoy 3


Software in ES
 S/w particular to an application
 Processor of ES- handles inst/data
 Final stage  ROM Image

Embedded System Design - RL1.3.1 © K.R.Anupama & Meetha.V.Shenoy 4


ROM IMAGE
 Boot-up program
 Stack/addr pointers
 Appln tasks
 ISR
 RTOS
 i/p data
 Vector address

Embedded System Design - RL1.3.1 © K.R.Anupama & Meetha.V.Shenoy 5


Software in Processor Specific
ALP
 Configuring devices
 Device drivers for specific processors
 Small –Scale ES

Embedded System Design - RL1.3.1 © K.R.Anupama & Meetha.V.Shenoy 6


Assembler
Machine code
ALP [any loc]
.obj
Bytes for Machine code
Library [MC] linked program [any loc]
Re-locating .exe
Linker
Addr [loader] Locater

Data Bytes Programmer

c

.s19/hex

Embedded System Design - RL1.3.1 © K.R.Anupama & Meetha.V.Shenoy 7


Software for Device Drivers &
Device Management using OS
 Device Types
 Physical e.g. Keyboard/Display
 Virtual e.g. File/ Pipe

 Each device has three components


 Control Registers
 Status Register H/w of
 Device Mechanism Device
 (I/p Buffer, O/p Buffer)

Embedded System Design - RL1.3.1 © K.R.Anupama & Meetha.V.Shenoy 8


Device Driver
 s/w for controlling/ receiving/ sending data
 Made up of 3 functions
 Initializing Device
 Calling the ISR
 Resetting status bits after ISR

 If Underlying h/w as hidden as possible  OS Functions


 API- then defines the h/w
 Device usable – when h/w in the system is changed

Embedded System Design - RL1.3.1 © K.R.Anupama & Meetha.V.Shenoy 9


Device Management
 Codes for detecting the presence of devices initializing and
testing
 Allocates address and checks for collision
 Address Allocation can be – pre-defined, relocatable

Embedded System Design - RL1.3.1 © K.R.Anupama & Meetha.V.Shenoy 10


Scheduling Multiple Tasks/
Devices using RTOS
 Each Task has a distinct memory location
 Tasks – made up of one or more procedure
 Scheduling by OS - takes care of constraints
 RTOS kernel important func - schedule transitions of task
 Ready state - Running State
 Block state - Running State

Embedded System Design - RL1.3.1 © K.R.Anupama & Meetha.V.Shenoy 11


Scheduling Multiple Tasks/
Devices using RTOS
 Tasks can enter into ready state at any time
 At a time only one task will be in running state
 Scheduling Algo
 RMS
 EDF
 LLF

 RTOS also controls inter-process communication

Embedded System Design - RL1.3.1 © K.R.Anupama & Meetha.V.Shenoy 12

You might also like