unit-1embeddedsystemsandapplications
unit-1embeddedsystemsandapplications
ntr
oduct
iont
oEmbeddedsy
stems
I
NTRODUCTI
ON : Anembedded sy
stem i
sanel
ect
roni
csy
stem,
whi
chi
ncl
udesa
si
ngl
e chi
p mi
crocomput
ers(
Micr
ocont
rol
l
ers)l
i
ke t
he ARM orCor
tex orSt
ell
ari
s
LM3S1968.
Iti
sconf
igur
edt
oper
for
m aspeci
fi
cdedi
cat
edappl
i
cat
ion.
Sof
twar
eis
pr
ogr
ammedi
ntot
heonchi
p ROM oft
hesi
ngl
echi
pcomput
er.Thi
ssof
twar
eisnot
accessi
blet
otheuser,
andsof
twar
esol
vesonl
yal
i
mit
edr
angeofpr
obl
ems.
Her
ethe
mi
crocomput
er i
s embedded or hi
dden i
nsi
de t
he sy
stem. Ev
ery embedded
mi
crocomput
ersy
stem ,
accept
sinput
s,per
for
mscomput
ati
ons,
andgener
atesout
put
s
andr
unsi
n“r
eal
time.
”
ForExampl
e at
ypi
calaut
omobi
l
e now a day
s cont
ains an av
erage oft
en
mi
crocont
rol
l
ers.I
nfact
,moder
nhousesmaycont
ainasmanyas150mi
crocont
rol
l
ers
andonav
erageaconsumernowi
nter
act
swi
thmi
crocont
rol
l
ersupt
o300t
imesaday
.
Gener
alar
east
hatempl
oyembeddedsy
stemscov
ers ev
erybr
anchofdayt
oday
sci
ence and t
echnol
ogy
,namel
y Communi
cat
ions,aut
omot
ive,mi
l
itar
y, medi
cal
,
consumer
,machi
necont
rol
etc.
..
Ex:Cel
lphone,Di
git
alcamera,Micr
owaveOv
en,
MP3pl
ayer
,Por
tabl
edi
git
alassi
stant
&automobil
eant
il
ockbrakesyst
em et
c.
Char
act
eri
sti
csofanEmbeddedSy
stem :Thei
mpor
tantchar
act
eri
sti
csofan
embeddedsy
stem ar
e
Speed(
byt
es/
sec):
Shoul
dbehi
ghspeed
Power(
wat
ts):Lowpowerdi
ssi
pat
ion
Si
ze andwei
ght:
Asf
araspossi
blesmal
li
nsi
zeandl
owwei
ght
Accur
acy(
%er
ror
):Mustbev
eryaccur
ate
Adapt
abi
l
ity:Hi
ghadapt
abi
l
ityandaccessi
bil
i
ty.
Rel
i
abi
l
ity:
Mustber
eli
abl
eov
eral
ongper
iodoft
ime.
So,
anembeddedsy
stem mustper
for
mtheoper
ati
onsata hi
ghspeed sot
hati
tcan
ber
eadi
l
yusedf
orr
ealt
imeappl
i
cat
ionsandi
tspowerconsumpt
ionmustbev
eryl
ow
andt
hesi
zeoft
hesy
stem shoul
dbeasf
oraspossi
blesmal
landt
her
eadi
ngsmustbe
accur
ate wi
th mi
nimum er
ror
.The sy
stem mustbe easi
l
y adapt
abl
efordi
ff
erent
si
tuat
ions.
CATEGORI
ESOFEMBEDDEDSYSTEMS:
Embeddedsy
stemscanbecl
assi
fi
edi
ntot
he
f
oll
owi
ng4cat
egor
iesbasedont
hei
rfunct
ional
andper
for
mancer
equi
rement
s.
Stand-aloneembeddedsystems
Real-t
imeembeddedsy st
ems - - Har
dreal
-t
imesy
stems& Sof
treal
-t
ime
system
Networ kedembeddedsystems and
Mobi l
eEmbeddedsy stems.
Basedontheperf
ormanceoftheMicr
ocontr
oll
ert
heyarealsoclassi
fi
edint
o(i)Small
scal
edembeddedsystem (
ii
)Medi
um scaledembeddedsystem and(ii
i
)Largescal
ed
embeddedsyst
em.
St
andal
oneEmbeddedsy
stems : Ast
and-
aloneembeddedsy
stem wor
ksbyi
tsel
f.I
t
i
sasel
f-
cont
aineddev
icewhi
chdonotr
equi
reanyhostsy
stem l
i
keacomput
er.
.It
t
akesei
therdi
git
aloranal
og i
nput
sfr
om i
tsi
nputpor
ts,cal
i
brat
es,conv
ert
s,and
pr
ocessest
he dat
a,andout
put
sther
esul
ti
ngdat
atoi
tsat
tachedout
putdev
ice,
whi
ch
ei
therdi
spl
ays dat
a,orcont
rol
s and dr
ives t
he at
tached dev
ices.Temper
atur
e
measur
ementsy
stems,Vi
deo gameconsol
es,MP3 pl
ayer
s,di
git
alcamer
as,and
mi
crowav
eov
ensar
etheexampl
esf
ort
hiscat
egor
y.
Real
-t
imeembeddedsy
stems :Anembeddedsy
stem whi
chgi
vest
her
equi
redout
put
i
naspeci
fi
edt
imeorwhi
chst
ri
ctl
yfol
l
owst
het
imedead l
i
nesf
orcompl
eti
onofat
ask
i
sknownasaRealt
imesy
stem.i
.eaRealTi
mesy
stem ,i
naddi
ti
ont
o f
unct
ional
cor
rect
ness,
alsosat
isf
ies t
het
imeconst
rai
nts.
Ther
ear
etwot
ypesofRealt
imesy
stems.
(i
)Sof
trealt
imesy
stem and(
ii
)Har
dreal
t
imesy
stem.
Sof
tReal
-Ti
mesy
stem :ARealt
imesy
stem i
nwhi
ch,
the v
iol
ati
onoft
imeconst
rai
nts
wi
l
lcauseonl
ythe degr
adedqual
i
ty,
butt
hesy
stem cancont
inuet
ooper
atei
sknown
asaSof
trealt
imesy
stem.I
nsof
treal
-t
imesy
stems,t
hedesi
gnf
ocusi
stoof
fera
guar
ant
eedbandwi
dtht
oeach r
eal
-t
imet
askandt
odi
str
ibut
ether
esour
cest
othe
t
asks.
Ex:A Mi
crowav
eOv
en,
washi
ngmachi
ne,
TVr
emot
eet
c.
Har
dReal
-Ti
mesy
stem :ARealt
imesy
stem i
nwhi
ch,
thev
iol
ati
onoft
imeconst
rai
nts
wi
l
lcausecr
it
ical
fai
l
ureandl
ossofl
i
feorpr
oper
tydamageorcat
ast
rophei
sknownas
aHar
dReal
timesy
stem.
Thesesy
stemsusual
l
yint
eractdi
rect
lywi
thphy
sicalhar
dwar
einst
eadoft
hrough a
humanbei
ng.
Thehar
dwar
eandsof
twar
eofhar
dreal
-t
imesy
stemsmustal
l
owawor
st
caseexecut
ion(
WCET)anal
ysi
sthatguar
ant
eest
heexecut
ionbecompl
etedwi
thi
na
st
ri
ctdeadl
i
ne.Thechi
psel
ect
ionandRTOSsel
ect
ionbecomei
mpor
tantf
act
orsf
or
har
dreal
-t
imesy
stem desi
gn.
Ex: Deadl
i
nei
nami
ssi
l
econt
rolembeddedsy
stem ,Del
ayedal
arm dur
ing aGas
l
eakage,carai
rbagcont
rolsy
stem ,Adel
ayed r
esponsei
npacemaker
s,Fai
l
urei
n
RADARf
unct
ioni
nget
c.
Net
wor
kedembeddedsy
stems :Thenet
wor
kedembeddedsy
stemsar
erel
atedt
oa
net
wor
kwi
thnet
wor
kint
erf
acest
o accesst
he r
esour
ces.Theconnect
ednet
wor
kcan
beaLocalAr
eaNet
wor
k(LAN)ora Wi
deAr
eaNet
wor
k(WAN)
,ort
heI
nter
net
.The
connect
ioncanbeei
therwi
redorwi
rel
ess.
Thenet
wor
kedembeddedsy
stem i
sthef
ast
estgr
owi
ngar
eai
nembeddedsy
stems
appl
i
cat
ions.Theembeddedwebser
veri
ssuchasy
stem wher
eal
lembeddeddev
ices
ar
econnect
edt
oawebser
verandcanbeaccessedandcont
rol
l
edbyanywebbr
owser
.
Ex:A homesecur
it
ysy
stem i
sanexampl
eofaLAN net
wor
kedembeddedsy
stem
wher
eal
lsensor
s(e.
g.mot
iondet
ect
ors,l
i
ghtsensor
s,orsmokesensor
s)ar
ewi
red
andr
unni
ngont
heTCP/
IPpr
otocol
.
Mobi
l
eEmbeddedsy
stems :Thepor
tabl
eembeddeddev
icesl
i
kemobi
l
eandcel
l
ular
phones ,di
git
alcamar
as,
MP3 pl
ayer
s,PDA (
Per
sonalDi
git
alAssi
stant
s)ar
ethe
exampl
eformobi
l
eembeddedsy
stems.Thebasi
cli
mit
ati
onoft
hesedev
icesi
sthe
l
i
mit
ati
onofmemor
yandot
herr
esour
ces.
Smal
lscal
ed embeddedsy
stem :
Anembeddedsy
stem suppor
tedbyasi
ngl
e8–16bi
t
Mi
crocont
rol
l
erwi
thon-
chi
pRAM andROM desi
gnedt
oper
for
m si
mpl
etasksi
sa
Smal
lscal
eembeddedsy
stem.
Medi
um scal
edembeddedsy
stem :Anembeddedsy
stem suppor
tedby16–32bi
t
Mi
crocont
rol
l
er/
Micr
opr
ocessorwi
thext
ernalRAM andROM t
hatcanper
for
m mor
e
compl
exoper
ati
onsi
saMedi
um scal
eembeddedsy
stem.
Lar
gescal
ed embedded sy
stem:An embedded sy
stem suppor
ted by32-
64 bi
t
mul
ti
plechi
pswhi
ch canper
for
m di
str
ibut
edj
obsi
sconsi
der
edasaLar
gescal
e
embeddedsy
stem.
Appl
i
cat
ionAr
easofEmbeddedSy
stems:Theembeddedsyst
emshav
eahuge
v
ari
etyofappl
i
cat
iondomai
nswhi
chv
ari
esf
rom v
eryl
ow costt
over
yhi
ghcostand
f
rom dai
l
yli
fe consumer el
ect
roni
cs t
oindust
ry aut
omat
ion equi
pment
s,f
rom
ent
ert
ainmentdev
icest
o academi
cequi
pment
s,and f
rom medi
cali
nst
rument
sto
aer
ospaceandweaponcont
rolsy
stems.So,
theEmbeddedsy
stemsspanal
laspect
sof
ourmoder
nli
fe.Thef
oll
owi
ng t
abl
egi
vest
hev
ari
ousappl
i
cat
ionsof embedded
sy
stems.
S.
No EmbeddedSy
stem Appl
i
cat
ion
1 HomeAppl
i
ances Dishwasher ,washi ngmachi ne,microwav e, Top-
set
box,secur itysy st em , HVACsy stem, DVD,
answer ingmachi ne, gardenspr i
nklersy stemset c.
.
2 Of
fi
ceAut
omat
ion Fax,copymachi ne, smar tphonesy st em, moder n,
scanner ,printers.
3 Secur
it
y Facer ecogni tion, fi
ngerr ecogniti
on, eye
recogni t
ion, buil
di ngsecur it
y sy stem , airport
securitysy stem, alarm system.
4 Academi
a Smar tboar d, smar troom, OCR, calculator, smart
cord.
5 I
nst
rument
ati
on Signal gener ator,signal processor ,
power
supplier,Pr
ocessi nstrument ati
on,
6 Tel
ecommuni
cat
ion Router ,hub, cell
ul arphone, IPphone, webcamer a
7 Aut
omobi
l
e Fuelinj
ect
ioncontr
oller
,ant
i-
locki
ngbrakesy
stem,
ai
r-bagsystem,GPS,crui
secontrol
.
8 Ent
ert
ainment MP3, vi
deogame, MindStor
m, smartt
oy .
9 Aer
ospace Nav i
gati
onsy stem, automat i
clandingsystem,
fl
ightatt
itudecont r
oller
,spaceexpl or
er,space
roboti
cs.
10 I
ndust
ri
alaut
omat
ion Assembl yli
ne, dat
acol lecti
onsystem,moni t
ori
ng
systemsonpr essure,v olt
age,curr
ent,
temperature,hazarddet ecti
ngsy st
em, i
ndustri
al
robot
.
11 Per
sonal PDA,iPhone,
pal
mtop,
dat
aor
gani
zer
.
12 Medi
cal CTscanner ,ECG, EEG,EMG, MRI ,Gl
ucose
monitor
, bl
ood pr essur
emoni tor,medical
di
agnost i
cdev i
ce.
13 Banki
ng&Fi
nance ATM, smartv endormachine,cashregister,
Shar
e
market
14 Mi
scel
l
aneous: El
evators,tr
eadmi ll
,smartcard,secur
itydooret
c.
Ov
erv
iewofembeddedsy
stemsar
chi
tect
ure:
Ev
eryembeddedsy
stem consi
stsofcust
omer
-bui
l
thar
dwar
ecomponent
ssuppor
ted
byaCent
ralPr
ocessi
ngUni
t(CPU)
,whi
chi
sthehear
tofami
cropr
ocessor(
µP)or
mi
crocont
rol
l
er(
µC)
.Ami
crocont
rol
l
eri
sani
ntegr
atedchi
pwhi
chcomeswi
thbui
l
t-i
n
memor
y,I
/Opor
ts,
timer
s,andot
hercomponent
s.Mostembeddedsy
stemsar
ebui
l
ton
mi
crocont
rol
l
ers,whi
chr
unf
ast
ert
hanacust
om-
bui
l
tsy
stem wi
thami
cropr
ocessor
,
becauseal
lcomponent
sar
eint
egr
atedwi
thi
nasi
ngl
echi
p.Oper
ati
ngsy
stem pl
ayan
i
mpor
tantr
olei
nmostoft
heembeddedsy
stems.Butal
ltheembeddedsy
stemsdonot
uset
heoper
ati
ngsy
stem.Thesy
stemswi
thhi
ghendappl
i
cat
ionsonl
yuseoper
ati
ng
sy
stem.Touset
heoper
ati
ngsy
stem t
heembeddedsy
stem shoul
dhav
elar
gememor
y
capabi
l
ity
.So,Thi
sisnotpossi
blei
nlowendappl
i
cat
ionsl
i
ker
emot
esy
stems,di
git
al
camer
as,
MP3pl
ayer
s,r
obot
oys et
c.Thear
chi
tect
ureofanembeddedsy
stem wi
thOS
canbedenot
edbyl
ayer
edst
ruct
ureasshownbel
ow.The OSwi
l
lpr
ovi
deani
nter
face
bet
weent
hehar
dwar
eandappl
i
cat
ionsof
twar
e.
I
nthecaseofembeddedsy
stemswi
thOS,
oncet
heappl
i
cat
ionsof
twar
eisl
oadedi
nto
memor
yitwi
l
lrunt
heappl
i
cat
ionwi
thoutanyhostsy
stem.
Comi
ngt
othehar
dwar
edet
ail
soft
heembeddedsy
stem,i
tconsi
stsoft
hef
oll
owi
ng
i
mpor
tantbl
ocks.
CPU(
Cent
ral
Processi
ngUni
t)
RAM andROM
I
/ODev
ices
Communi
cat
ionI
nter
faces
Sensor
set
c.(
Appl
i
cat
ionspeci
fi
cci
rcui
tar
y)
Thi
shar
dwar
ear
chi
tect
urecanbeshownbyt
hef
oll
owi
ngbl
ockdi
agr
am.
Cent
ralPr
ocessi
ngUni
t:A CPU i
scomposedofanAr
it
hmet
icLogi
cUni
t(ALU)
,a
Cont
rolUni
t(CU)
,andmanyi
nter
nalr
egi
ster
sthatar
econnect
edbybuses.TheALU
per
for
msal
lthemat
hemat
icaloper
ati
ons(
Add,Sub,Mul
,Di
v),l
ogi
caloper
ati
ons(
AND,
OR)
,and shi
ft
ing oper
ati
ons wi
thi
n CPU .
The t
imi
ng and sequenci
ng ofal
lCPU
oper
ati
onsar
econt
rol
l
edbyt
heCU,whi
chi
sact
ual
l
ybui
l
tofmanysel
ect
ionci
rcui
ts
i
ncl
udi
ng l
atches and decoder
s.The CU i
sresponsi
blef
ordi
rect
ing t
he f
low of
i
nst
ruct
ionanddat
awi
thi
ntheCPUandcont
inuousl
yrunni
ngpr
ogr
am i
nst
ruct
ionsst
ep
byst
ep.
TheCPUwor
ksi
nacy
cleoff
etchi
ngani
nst
ruct
ion,
decodi
ngi
t,andexecut
ingi
t,known
ast
hef
etch-
decode-
execut
ecy
cle.Thecy
clebegi
nswhenani
nst
ruct
ioni
sfet
ched
f
rom amemor
ylocat
ionpoi
ntedt
obyt
hePCt
otheI
Rvi
athedat
abus.
Forembedded sy
stem desi
gn,many f
act
orsi
mpactt
he CPU sel
ect
ion,e.
g.,t
he
maxi
mum si
ze(
numberofbi
ts)i
nasi
ngl
eoper
andf
orALU(
8,16,
32,
64bi
ts)
,andCPU
cl
ockf
requencyf
ort
imi
ngt
ickcont
rol
,i
.e.t
henumberoft
icks(
clockcy
cles)persecond
i
nmeasur
esofMHz.
Memor
y:Embeddedsy
stem memor
ycanbeei
theron-
chi
porof
f-
chi
p.Onchi
pmemor
y
accessi
smuchf
astt
hanof
f-
chi
pmemor
y,butt
hesi
zeofon-
chi
pmemor
yismuch
smal
l
ert
hant
hesi
zeofof
f-
chi
pmemor
y.Usual
l
y,i
ttakesatl
eastt
woI
/O por
tsas
ext
ernaladdr
essl
i
nespl
usaf
ewcont
roll
i
nessuchasR/
W andALEcont
roll
i
nest
oenabl
e
t
heext
endedmemor
y.Gener
all
ythedat
aisst
oredi
nRAM andt
hepr
ogr
am i
sst
oredi
nROM.
I
/OPor
ts:TheI
/Opor
tsar
eusedt
oconnecti
nputandout
putdev
ices.Thecommon
i
nputdev
icesf
oranembeddedsy
stem i
ncl
udekey
pads,swi
tches,but
tons,knobs,and
al
lki
ndsofsensor
s(l
i
ght
,temper
atur
e,pr
essur
e,et
c).
Theout
putdev
icesi
ncl
udeLi
ghtEmi
tt
ingDi
odes(
LED)
,Li
qui
dCr
yst
alDi
spl
ays(
LCD)
,
pr
int
ers,al
arms,act
uat
ors,et
c.Somedev
icessuppor
tbot
hinputandout
put
,suchas
communi
cat
ion i
nter
faces i
ncl
udi
ng Net
wor
kInt
erf
ace Car
ds (
NIC)
,modems,and
mobi
l
ephones.
Communi
cat
ionI
nter
faces:
Tot
ransf
ert
hedat
aort
oint
eractwi
thot
herdev
ices,
the
embeddeddev
icesar
epr
ovi
dedt
hev
ari
ous communi
cat
ioni
nter
facesl
i
keRS232,
RS422,RS485 ,
USB,SPI
(Ser
ialPer
ipher
alI
nter
face ),
SCI(
Ser
ialCommuni
cat
ion
I
nter
face),
Ether
netet
c.
Appl
i
cat
ionSpeci
fi
cCi
rcui
tr
y:Theembeddedsy
stem somet
imesr
ecei
vest
hei
nput
f
rom asensororact
uat
or.I
nsuchsi
tuat
ionscer
tai
nsi
gnalcondi
ti
oni
ngci
rcui
tr
yis
needed.Thi
shar
dwar
eci
rcui
tr
ymaycont
ainADC,Op-
amps,
DACet
c.Such ci
rcui
tr
y
wi
l
lint
eractwi
tht
heembeddedsy
stem t
ogi
vecor
rectout
put
.
Powersuppl
y:Mostoft
heembeddedsy
stemsnow day
swor
konbat
ter
yoper
ated
suppl
i
es.Becausel
ow powerdi
ssi
pat
ion i
sal
way
srequi
red.Hencet
hesy
stemsar
e
desi
gnedt
owor
kwi
thbat
ter
ies.
Speci
alt
iesofan Embedded Sy
stems :An embedded syst
em has cer
tai
n
speci
alt
ies whencompar
ed t
o anor
malcomput
ersy
stem orawor
kst
ati
onora
mai
nfr
amecomput
ersy
stem.
(
i)
.Embedded sy
stems ar
e dedi
cat
ed t
o speci
fi
ctasks,wher
eas PCs ar
e gener
ic
comput
ingpl
atf
orms.
(
ii
).
Embeddedsy
stemsar
esuppor
tedbyawi
dear
rayofpr
ocessor
sandpr
ocessor
ar
chi
tect
ures
(
ii
i)
.Embeddedsy
stemsar
eusual
l
ycostsensi
ti
ve.
(
iv)
.Embeddedsy
stemshav
ereal
-t
imeconst
rai
nts.
(
v).
Ifanembeddedsy
stem usean oper
ati
ngsy
stem ,
iti
smostl
i
kel
yusi
ngar
eal
-t
ime
per
ati
ngsy
stem (
RTOS)
,butnot Wi
ndows 9X,Wi
ndowsNT,Wi
ndows2000,Uni
x,
Sol
ari
s,et
c.
(
vi)
.Thei
mpl
i
cat
ionsofsof
twar
efai
l
urei
smuchmor
esev
erei
nembeddedsy
stems
t
hani
ndeskt
opsy
stems.
(
vii
)Embeddedsy
stemsof
tenhav
epowerconst
rai
nts.
(
ix)
.Embeddedsy
stemsmustbeabl
e t
o oper
ateunderext
remeenv
ironment
al
condi
ti
ons.
(
x).Embeddedsy
stemsut
il
izesf
ewersy
stem r
esour
cest
handeskt
opsy
stems.
(
xi)
.Embeddedsy
stemsof
tenst
oreal
lthei
robj
ectcodei
nROM.
(
xii
).Embedded sy
stems r
equi
re speci
ali
zed t
ool
s and met
hods t
o be ef
fi
cient
ly
desi
gnedwhencompar
edt
odeskt
opcomput
ers.
(
xii
i
).Embeddedmi
cropr
ocessor
sof
tenhav
ededi
cat
eddebuggi
ngci
rcui
tr
y.
(
xiv
).Embeddedsy
stemshav
eSof
twar
eUpgr
adat
ioncapabi
l
ity
(
xv)
.Embeddedsy
stemshav
elar
geUserI
nter
facesf
orr
eal
timeappl
i
cat
ions.
Recentt
rends i
n Embedded sy
stems :Wi
tht
he f
ast dev
elopment
sin
semi
conduct
ori
ndust
ryandVLSIt
echnol
ogy,
onecanf
ind t
remendouschangesi
nthe
embedded sy
stem desi
gn i
nter
ms ofpr
ocessorspeed ,power,communi
cat
ion
i
nter
facesi
ncl
udi
ngnet
wor
kcapabi
l
iti
esandsof
twar
edev
elopment
sli
ke oper
ati
ng
sy
stemsandpr
ogr
ammi
ngl
anguageset
c.
Pr
ocessorspeedandPower:Wi
tht
headv
ancement
sinpr
ocessort
echnol
ogy,
the
embeddedsy
stemsar
enowday
sdesi
gnedwi
th16,
32bi
tpr
ocessor
swhi
chcanwor
kin
r
ealt
ime env
ironment
.These pr
ocessor
s ar
e abl
eto per
for
m hi
gh speed si
gnal
pr
ocessi
ng act
ivi
ti
es whi
ch r
esul
ted i
n t
he dev
elopment of hi
gh def
ini
ti
on
communi
cat
iondev
icesl
i
ke3G mobi
l
eset
c.Al
so t
her
ecentdev
elopment
sinVLSI
t
echnol
ogyhaspav
edt
hewayf
orl
ow powerbat
ter
yoper
ateddev
iceswhi
char
ever
y
handyandhav
ehi
ghl
ongev
ity
.Al
so ,
thepr
esentdayembeddedsy
stemsar
epr
ovi
ded
wi
thhi
ghermemor
ycapabi
l
iti
es,
sot
hatmostoft
hem ar
ebasedont
inyoper
ati
ng
sy
stemsl
i
keandr
oidet
c.
Communi
cat
ioni
nter
faces:Mostoft
hepr
esentdayembeddedsy
stemsar
eai
medat
i
nter
netbased appl
i
cat
ions.So,
the communi
cat
ion i
nter
faces l
i
ke Et
her
net
,USB,
wi
rel
essLAN et
c.hav
ebecomev
erycommonr
esour
cesi
nal
mostal
ltheembedded
sy
stems.Thedev
elopment
sinmemor
ytechnol
ogi
esal
sohel
pedi
npor
ti
ngt
he TCP/
IP
pr
otocolst
ack andt
heHTTP ser
versof
twar
eont
otheembeddedsy
stems.Such
embeddedsy
stemscanpr
ovi
deal
i
nkbet
weenanyt
wodev
icesanywher
eint
hegl
obe.
Oper
ati
ngsy
stems:Wi
thr
ecentsof
twar
edev
elopment
s,t
her
eisaconsi
der
abl
egr
owt
h
i
ntheav
ail
abi
l
ityofoper
ati
ngsy
stemsf
orembeddedsy
stems.Mai
nlynew oper
ati
ng
sy
stemsar
edev
elopedwhi
chcanbeusedi
nrealt
imeappl
i
cat
ions.Ther
ear
ebot
h
commer
cialRTOSesl
i
keVxWor
ks,QNX,
WIN-
CE andopensour
ce RTOSes l
i
ke
RTLI
NUXet
c.TheAndr
oidOSi
nmobi
l
eshasr
evol
uti
oni
zedt
heembeddedi
ndust
ry.
Pr
ogr
ammi
ngLanguages:
Ther
eisal
soar
emar
kabl
edev
elopmenti
nthepr
ogr
ammi
ng
l
anguages.Languagesl
i
keC++,
Jav
aet
c.ar
enowwi
del
yusedi
nembeddedappl
i
cat
ion
pr
ogr
ammi
ng.Forexampl
ebyhav
ingt
heJav
avi
rt
ualmachi
nei
namobi
l
ephones,
one
candownl
oadJav
aappl
etsf
rom aser
verandcanbeexecut
edony
ourmobi
l
e.
I
naddi
ti
ont
othesedev
elopment
s,nowaday
sweal
sof
indnewdev
icesl
i
keASI
Csand
FPGAsi
ntheembeddedsy
stem mar
ket
.Thesenew har
dwar
edev
icesar
epopul
aras
pr
ogr
ammabl
edev
icesandr
econf
igur
abl
edev
ices.
Det
ail
edHar
dwar
e ar
chi
tect
ureofanEmbeddedsy
stem :Thehar
dwar
e
ar
chi
tect
ureofanembeddedsy
stemsi
sver
yimpor
tant
,because i
tisoneoft
he
power
fult
ool
sthatcanbeusedt
ounder
standanembeddedsy
stemsdesi
gnort
o
r
esol
vechal
l
engesf
acedwhi
l
edesi
gni
nganew sy
stem.Thehar
dwar
ear
chi
tect
ureof
anyembeddedsy
stem consi
stsoft
hree sect
ionsnamel
y :Cor
e,Cent
ralPr
ocessi
ng
Uni
t(CPU)andPer
ipher
als.
Cor
eist
hecomponentwhi
chexecut
est
hei
nst
ruct
ions.CPUcont
ainst
hecor
eandt
he
ot
hercomponent
swhi
chsuppor
tthecor
etoexecut
epr
ogr
ams.Per
ipher
alsar
ethe
component
swhi
chcommuni
cat
ewi
thot
hersy
stemsorphy
sicalwor
ld(
Likepor
ts,
ADC,
DAC,Wat
chdogTi
mer
set
c.)
.Thecor
eis separ
atedf
rom ot
hercomponent
sby
t
hesy
stem bus.
The CPU i
nthe embedded sy
stem maybe a gener
alpur
pose pr
ocessorl
i
ke a
mi
crocont
rol
l
eroraspeci
alpur
posepr
ocessorl
i
keaDSP(
Digi
talsi
gnalpr
ocessor
).But
anyCPUconsi
stsofofanAr
it
hmet
icLogi
cUni
t(ALU)
,aCont
rolUni
t(CU)
,andmany
i
nter
nalr
egi
ster
sthatar
econnect
edbybuses.TheALUper
for
msal
lthemat
hemat
ical
oper
ati
ons(
Add,Sub,Mul
,Di
v),l
ogi
caloper
ati
ons(
AND,OR)
,andshi
ft
ingoper
ati
ons
wi
thi
nCPU.
Thet
imi
ngandsequenci
ngofal
lCPUoper
ati
onsar
econt
rol
l
edbyt
heCU,whi
chi
s
act
ual
l
ybui
l
tofmanysel
ect
ionci
rcui
tsi
ncl
udi
ngl
atchesanddecoder
s.TheCU i
s
r
esponsi
blef
ordi
rect
ing t
he f
low ofi
nst
ruct
ion and dat
a wi
thi
nthe CPU and
cont
inuousl
yrunni
ngpr
ogr
am i
nst
ruct
ionsst
epbyst
ep.
Ther
ear
emanyi
nter
nal
regi
ster
sint
heCPU.
Theaccumul
ator(
A)i
saspeci
aldat
aregi
stert
hatst
orest
her
esul
tofALU oper
ati
ons.
I
tcanal
sobeusedasanoper
and.ThePr
ogr
am Count
er(
PC)st
orest
hememor
y
l
ocat
ionoft
henexti
nst
ruct
iont
obeexecut
ed.TheI
nst
ruct
ionRegi
ster(
IR)st
orest
he
cur
rentmachi
nei
nst
ruct
iont
obedecodedandexecut
ed.
.
TheDat
aBuf
ferRegi
ster
sst
oret
hedat
arecei
vedf
rom t
hememor
yort
hedat
atobe
sentt
omemor
y.TheDat
aBuf
ferRegi
ster
sar
econnect
edt
othedat
abus.TheAddr
ess
Regi
sterst
orest
hememor
ylocat
ionoft
hedat
atobeaccessed(
getorset
).The
Addr
essRegi
steri
sconnect
edt
otheaddr
essbus.
I
nanembeddedsy
stem,
theCPUmaynev
erst
opandr
unf
orev
er.
TheCPUwor
ksi
na
cy
cleoff
etchi
ngani
nst
ruct
ion,
decodi
ngi
t,andexecut
ingi
t,knownast
hef
etch-
decode
-
execut
ecy
cle.Thecy
clebegi
nswhenani
nst
ruct
ioni
sfet
chedf
rom amemor
ylocat
ion
poi
ntedt
obyt
hePCt
otheI
Rvi
athedat
abus.
The memor
yisdi
vi
dedi
ntoDat
aMemor
yandCodeMemor
y.Mostofdat
aisst
oredi
n
Random AccessMemor
y(RAM)andcodei
sst
oredi
nReadOnl
yMemor
y(ROM)
.Thi
sis
duet
otheRAM const
rai
ntoft
heembeddedsy
stem andt
hememor
yor
gani
zat
ion.
The
RAM i
sreadabl
eandwr
it
abl
e,f
ast
eraccessandmor
eexpensi
vev
olat
il
est
orage,
whi
ch
canbeusedt
ost
oreei
therdat
aorcode.Oncet
hepoweri
stur
nedof
f,al
linf
ormat
ion
st
oredi
ntheRAM wi
l
lbel
ost
.TheRAM chi
pcanbeSRAM (
stat
ic)orDRAM (
dynami
c)
dependi
ngont
hemanuf
act
urer
.SRAM i
sfast
ert
hanDRAM,
buti
smor
eexpensi
ve.
TheROM,EPROM,andFl
ashmemor
yar
eal
lread-
onl
yty
pememor
iesof
tenusedt
o
st
orecodei
nanembeddedsy
stem.Theembeddedsy
stem codedoesnotchangeaf
ter
t
hecodei
sloadedi
ntomemor
y.TheROM i
spr
ogr
ammedatt
hef
act
oryandcannotbe
changedov
ert
ime.Thenewermi
crocont
rol
l
erscomewi
thEPROM orFl
ashi
nst
eadof
ROM.Mostmi
crocont
rol
l
erdev
elopmentki
tscomewi
thEPROM aswel
l
.EPROM and
Fl
ashmemor
yar
eeasi
ert
orewr
it
ethanROM.EPROM i
sanEr
asabl
ePr
ogr
ammabl
e
ROM i
nwhi
cht
hecont
ent
scanbef
iel
dpr
ogr
ammedby
aspeci
albur
nerandcanbe
er
asedbyaUVl
i
ghtbul
b.Thesi
zeofEPROM r
angesupt
o32kbi
nmostembedded
sy
stems.Fl
ashmemor
yisanEl
ect
ri
cal
l
yEPROM whi
chcanbepr
ogr
ammedf
rom
sof
twar
esot
hatt
hedev
eloper
sdon’
tneedt
ophy
sical
l
yremov
etheEPROM f
rom t
he
ci
rcui
ttor
e-pr
ogr
am i
t.I
tismuchqui
ckerandeasi
ert
ore-
wri
teFl
asht
hanot
hert
ypes
ofEPROM.Whent
hepoweri
son,
thef
ir
sti
nst
ruct
ioni
nROM i
sloadedi
ntot
hePCand
t
hent
heCPUf
etchest
hei
nst
ruct
ionf
rom t
hel
ocat
ioni
ntheROM poi
ntedt
obyt
hePC
andst
oresi
tint
heI
Rtost
artt
hecont
inuousCPUf
etchandexecut
ioncy
cle.ThePCi
s
adv
ancedt
otheaddr
essoft
henexti
nst
ruct
iondependi
ngont
hel
engt
hoft
hecur
rent
i
nst
ruct
ionort
hedest
inat
ionoft
heJumpi
nst
ruct
ion.
TheI
/Opor
tsar
eusedt
oconnecti
nputandout
putdev
ices.Thecommoni
nputdev
ices
f
oranembeddedsy
stem i
ncl
udekey
pads,swi
tches,but
tons,knobs,andal
lki
ndsof
sensor
s(l
i
ght
,temper
atur
e,pr
essur
e,et
c).Theout
putdev
icesi
ncl
udeLi
ghtEmi
tt
ing
Di
odes(
LED)
,Li
qui
dCr
yst
alDi
spl
ays(
LCD)
,pr
int
ers,al
arms,act
uat
ors,et
c.Some
dev
icessuppor
tbot
hinputandout
put
,suchascommuni
cat
ioni
nter
facesi
ncl
udi
ng
Net
wor
kInt
erf
aceCar
ds(
NIC)
,modems,
andmobi
l
ephones.
Cl
ock:Thecl
ocki
susedt
ocont
rolt
hecl
ocki
ngr
equi
rementoft
heCPUf
orexecut
ing
i
nst
ruct
ionsandt
heconf
igur
ati
onoft
imer
s.Forex:t
he 8051cl
ockcy
clei
s(1/ 10-6
12)
second(
1/12µs)becauset
hecl
ockf
requencyi
s12MHz.A si
mpl
e8051i
nst
ruct
ion
t
akes12cy
cles(
1ms)t
ocompl
ete.Ofcour
se,somemul
ti
-cy
clei
nst
ruct
ionst
akemor
e
cl
ockcy
cles.
At
imeri
sar
eal
-t
imecl
ockf
orr
eal
-t
imepr
ogr
ammi
ng.Ev
eryt
imercomeswi
tha
count
erwhi
chcanbeconf
igur
edbypr
ogr
amst
ocountt
hei
ncomi
ngpul
ses.Whent
he
count
erov
erf
lows(
reset
stozer
o)i
twi
l
lfi
reat
imeouti
nter
ruptt
hatt
ri
gger
spr
edef
ined
act
ions.Manyt
imedel
ayscanbegener
atedbyt
imer
s.Forexampl
e,at
imercount
er
conf
igur
edt
o24,
000wi
l
ltr
iggert
het
imeoutsi
gnal
in24000x1/
12µs=2ms.
I
naddi
ti
ont
oti
medel
aygener
ati
on,t
het
imeri
sal
sowi
del
yusedi
nther
eal
-t
ime
embedded sy
stem t
o schedul
e mul
ti
plet
asks i
n mul
ti
taski
ng pr
ogr
ammi
ng.The
wat
chdogt
imeri
saspeci
alt
imi
ngdev
icet
hatr
eset
sthesy
stem af
terapr
esett
ime
del
ayi
ncaseofsy
stem anomal
y.Thewat
chdogst
art
supaut
omat
ical
l
yaf
tert
he
sy
stem powerup.
Oneneedt
oreboott
hePCnowandt
henduet
ovar
iousf
aul
tscausedbyhar
dwar
eor
sof
twar
e.Anembeddedsy
stem cannotber
eboot
edmanual
l
y,becausei
thasbeen
embeddedi
ntoi
tssy
stem.Thati
swhymanymi
crocont
rol
l
erscomewi
thanon-
chi
p
wat
chdogt
imerwhi
chcanbeconf
igur
edj
ustl
i
ket
hecount
eri
nther
egul
art
imer
.Af
ter
asy
stem get
sst
uck(
powersuppl
yvol
tageoutofr
angeorr
egul
art
imerdoes noti
ssue
t
imeoutaf
terr
eachi
ngzer
ocount
)thewat
chdogev
ent
ual
l
ywi
l
lrest
artt
hesy
stem t
o
br
ingt
hesy
stem backt
oanor
mal
oper
ati
onal
condi
ti
on.
ADC&DAC :
Manyembeddedsy
stem appl
i
cat
ionneedt
odealwi
thnon-
digi
talext
ernalsi
gnal
ssuch
asel
ect
roni
cvol
tage,
musi
corv
oice,
temper
atur
e,pr
essur
es,
andmanyot
hersi
gnal
sin
t
heanal
ogf
orm.Thedi
git
alcomput
erdoesnotunder
standt
hesedat
aunl
esst
heyar
e
conv
ert
edt
odi
git
alf
ormat
s.TheADCi
sresponsi
blef
orconv
ert
inganal
ogv
aluest
o
bi
nar
ydi
git
s.TheDAC i
sresponsi
blef
orout
put
ti
nganal
ogsi
gnal
sforaut
omat
ion
cont
rol
ssuchasDCmot
ororHVDCf
urnacecont
rol
.
I
naddi
ti
ont
otheseper
ipher
als,anembeddedsy
stem mayal
sohav
esensor
s,Di
spl
ay
modul
es l
i
ke LCD orTouch scr
een panel
s,Debug por
ts cer
tai
n communi
cat
ion
2
per
ipher
alsl
i
keIC,SPI
,Et
her
net
,CAN ,
USBf
orhi
ghspeeddat
atr
ansmi
ssi
on.Now a
day
svar
ioussensor
sar
eal
sobecomi
ngani
mpor
tantpar
t i
nthedesi
gnofr
ealt
ime
embeddedsy
stems.Sensor
sli
ket
emper
atur
esensor
s,l
i
ghtsensor
s,PI
Rsensor
s,gas
sensor
sar
ewi
del
yusedi
nappl
i
cat
ionspeci
fi
cci
rcui
tr
y.
Sof
twar
ear
chi
tect
ure:Todesi
gnanef
fi
cientembeddedsy
stem ,bot
hhar
dwar
eand
sof
twar
easpect
sar
eequal
l
yimpor
tant
.Thesof
twar
eofanembeddedsy
stem i
smai
nly
ai
medataccessi
ngt
hehar
dwar
eresour
cespr
oper
ly.Thesof
twar
eofanembedded
sy
stem means bot
hoper
ati
ngsy
stem andappl
i
cat
ionsof
twar
e.Butev
eryembedded
sy
stem neednotcont
aint
heoper
ati
ngsy
stem.
Forl
ow endappl
i
cat
ions,oper
ati
ng
sy
stem i
snotneeded.I
nsuchcasest
he desi
gnerhast
o wr
it
ethenecessar
ysof
twar
e
r
out
inest
oaccesst
hehar
dwar
e.Thear
chi
tect
ureoft
hesof
twar
einanembedded
sy
stem canbeshownbyt
hef
oll
owi
ngf
igur
e.
Thecent
ralpar
tornucl
eusoft
heoper
ati
ngsy
stem i
stheKer
nel.
Aker
nelconnect
sthe
appl
i
cat
ionsof
twar
etot
hehar
dwar
eofanembeddedsy
stem.Theot
heri
mpor
tant
component
soft
heOSar
e Dev
icemanager
,Communi
cat
ionsof
twar
e,Li
brar
iesand
Fi
l
e sy
stem.The ker
nelwi
l
ltake car
e oft
askschedul
i
ng ,pr
ior
it
ies,memor
y
management et
c.I
tmanagest
het
askst
oachi
evet
hedesi
redper
for
manceoft
he
sy
stem .I
tschedul
est
het
asksandpr
ovi
dei
nterpr
ocesscommuni
cat
ionbet
ween
di
ff
erentt
asks.
Thedev
icemanagermanagest
heI
/Odev
icest
hroughi
nter
rupt
sanddev
icedr
iver
s.The
dev
ice dr
iver
s pr
ovi
de t
he necessar
yint
erf
ace bet
ween t
he appl
i
cat
ion and t
he
har
dwar
e.Adev
icedr
iveri
saspeci
fi
cty
peofsof
twar
edev
elopedt
oal
l
owi
nter
act
ion
wi
thhar
dwar
edev
ices.Thi
sconst
it
utesani
nter
facef
orcommuni
cat
ingwi
tht
hedev
ice,
t
hrought
hespeci
fi
csy
stem busorcommuni
cat
ionssubsy
stem t
hatt
hehar
dwar
eis
connect
edt
o,pr
ovi
dingcommandst
orecei
vi
ngdat
afr
om t
hedev
ice,
andont
heot
her
end,
ther
equi
si
tei
nter
facest
otheoper
ati
ngsy
stem andsof
twar
eappl
i
cat
ions.
Thecommuni
cat
ionsof
twar
epr
ovi
desnecessar
ypr
otocol
stomaket
heembedded
sy
stem net
wor
kenabl
ed.Thi
ssof
twar
eint
egr
atest
heupperl
ayerpr
otocol
ssuchas
TCP/
IP st
ackwi
tht
heoper
ati
ngsy
stem.
Appl
i
cat
ionpr
ogr
ammi
ngi
nter
facei
susedbyt
hedesi
gnert
owr
it
etheappl
i
cat
ion
sof
twar
e.TheAPIpr
ovi
dest
hef
unct
ioncal
l
stoaccesst
heoper
ati
ngsy
stem ser
vices.
Appl
i
cat
ion Speci
fi
csof
twar
e :I
tsi
tsabov
ethe O.
S.The appl
i
cat
ion sof
twar
eis
dev
elopedaccor
dingt
othef
eat
uresoft
hedev
elopmentt
ool
sav
ail
abl
eint
heOS.
These
dev
elopmentt
ool
spr
ovi
det
hef
unct
ioncal
l
stoaccesst
heser
vicesoft
heOS.These
f
unct
ioncal
l
sincl
ude,cr
eat
ingat
ask,
tor
eadt
hedat
afr
om t
hepor
tandwr
it
ethedat
a
t
othememor
yet
c.
Thev
ari
ousf
unct
ioncal
l
spr
ovi
dedbyanoper
ati
ngsy
stem ar
e
i
.Tocr
eat
e,suspendanddel
etet
asks.
i
i
.Todot
askschedul
i
ngt
opr
ovi
dingr
eal
timeenv
ironment
.
i
i
i.
Tocr
eat
eint
ert
askcommuni
cat
ionandachi
evet
hesy
nchr
oni
zat
ionbet
weent
asks.
i
v.
Toaccesst
heI
/Odev
ices.
v
i.
Toaccesst
hecommuni
cat
ionpr
otocol
stack.
Thedesi
gnerdev
elopst
heappl
i
cat
ionsof
twar
e basedont
hesef
unct
ioncal
l
s.
Communi
cat
ionSof
twar
e: To connectt
otheext
ernalwor
ldt
hroughi
nter
net,
the
embedded sy
stem need a communi
cat
ion i
nter
face.The communi
cat
ion sof
twar
e
i
ncl
udet
heEt
her
neti
nter
faceandt
he TCP/
IPpr
otocolsui
t.Now aday
sev
ensmal
l
embedded sy
stemsl
i
kemobi
l
ephones,
PDAsar
enet
wor
kenabl
ed t
hrough t
hese
TCP/
IPsuppor
t.TheTCP/
IPpr
otocol
sui
tei
sshowni
nthedi
agr
am bel
ow.
Appl
i
cat
ionl
ayer
Tr
anspor
tLay
erTCP/
UDP
I
PLay
er
Dat
aLi
nkLay
er
Phy
sical
Lay
er
Thi
ssui
teconsi
stsofdi
ff
erentl
ayer
sli
ke,appl
i
cat
ionl
ayer
,Tr
anspor
tlay
er,I
Play
er
et
c.TCPmeansTr
ansmi
ssi
onCont
rolPr
otocol
.Itensur
est
hatt
hedat
aisdel
i
ver
edt
o
t
heappl
i
cat
ionl
ayerwi
thoutanyer
ror
s.TheUDP(
UserDat
agr
am pr
otocol
)pr
ovi
desa
connect
ionl
essser
vicef
orer
rorcont
rolandf
low ofdat
a.Thi
sTCP/
IPpr
otocolsui
te
hel
pst
ounder
standt
hewor
kingofcommuni
cat
ionsof
twar
epackages.
Cr
osspl
atf
orm dev
elopment
:Some t
imes t
he hostcomput
erusedf
or t
he
dev
elopmentofappl
i
cat
ion sof
twar
e maynotbeused t
o debug orcompi
l
ethe
sof
twar
e.Thenanot
her sy
stem whi
chcont
ainsal
ltheofr
unni
ngdev
elopmentt
ool
s
(
edi
tor
s,compi
l
ers,
assembl
ers,
debugger
set
c.)maybeused.Thi
sty
peofchoosi
nganot
herhostsy
tem ,
othert
hant
he
or
igi
nalhost sy
stem i
s known as Cr
oss pl
atf
orm dev
elopment
.Some common
di
ff
erencesbet
weenhostandt
argetmachi
nesar
edi
ff
erentoper
ati
ngsy
stem,
dif
fer
ent
sy
stem boar
dsoradi
ff
erentCPU.
Acr
osspl
atf
orm dev
elopmentenv
ironmental
l
owsy
out
omaxi
mizet
heuseofal
lyour
r
esour
ces.Thi
scani
ncl
udeev
ery
thi
ngf
rom y
ourwor
kst
ati
onsandser
ver
stot
hei
rdi
sk
spaceandcpucy
cles.
Her
ehostmachi
nei
s t
hemachi
neonwhi
chy
ouwr
it
eandcompi
l
epr
ogr
ams.
Atar
get
machi
ne may be anot
her gener
al-
pur
pose comput
er,a speci
al-
pur
pose dev
ice
empl
oyi
ngasi
ngl
e-boar
dcomput
eroranyot
heri
ntel
l
igentdev
ice.Debuggi
ngi
san
i
mpor
tanti
ssuei
n cr
oss-
plat
for
m dev
elopment
.Si
ncey
ou ar
eusual
l
ynotabl
eto
execut
ethebi
nar
yfi
l
esont
hehostmachi
ne,t
heymustber
unont
het
argetmachi
ne.
Thef
lowchar
tfort
hecr
oss-
plat
for
m dev
elopmenti
sshownbel
ow.
I
nthi
smet
hodf
ir
stt
hesour
cecodei
sdev
elopedont
hehostcomput
ersy
stem andt
his
codei
scompi
l
edandl
i
nkedusi
ngt
hecr
osspl
atf
orm dev
elopmentt
ool
s..
Thent
hecode
i
sdownl
oadedont
othet
argetanddebuggedont
het
argetsy
stem.I
fthecodei
s
wor
kingpr
oper
lyi
tisbur
nint
otheEPROM orFl
ashROM .
Final
l
ythecodei
srunont
he
t
argetsy
stem.
Ift
hecodei
snotcor
rect,
i
tisagai
nsentt
odev
elopmentst
agewher
eiti
s
cor
rect
ed.
Cr
oss compi
l
ati
on t
ool
s ar
ever
yimpor
tantf
orsuccessf
ulpr
oductdev
elopment
.
Sel
ect
ionoft
heset
ool
sshoul
dbemadebasedupont
heembeddedsy
stem i
tsel
fas
wel
lasf
eat
urest
otestanddebugsof
twar
eremot
ely
.Thenecessar
ytool
sfort
hecr
oss
pl
atf
orm dev
elopmentar
e
Cr
oss-compi
l
er
Cr
oss–assembl
er
Cr
oss-
Linker
Cr
oss–debugger
Cr
oss-
compi
l
edl
i
brar
ies.
These component
s wil
lenable t o compi
le,l
i
nk and debug code f
ort
he t
arget
envi
ronment
thr
ought hecr
oss-compi
lat
ionenv
ironment.
BootSequence :Boot
ingmeansst
art
ingt
hesy
stem.Anembeddedsy
stem canbe
boot
edi
noneoft
hef
oll
owi
ngway
s.
i
).
Execut
efr
om ROM usi
ngt
heRAM f
orDat
a.
i
i
).Execut
efr
om RAM af
terl
oadi
ngt
hei
magef
rom RAM.
i
i
i).
Execut
efr
om RAM af
terdownl
oadi
ngf
rom t
hehost
.
Nor
mal
l
yboot
ingf
rom ROM i
sthef
ast
estpr
ocess.
thepr
ocessf
orexecut
ingf
rom ROM
usi
ngt
heRAM f
ordat
aisshowni
nthef
igur
ebel
ow.
Execut
ingf
rom ROM Usi
ngRAM f
orDat
a:
Someembedded dev
iceshav
eli
mit
ed memor
yresour
cest
hatt
hepr
ogr
am i
mage
execut
esdi
rect
lyoutoft
heROM.Somet
imest
heboar
dvendorpr
ovi
dest
hebootROM,
andt
hecodei
nthebootROM doesnotcopyi
nst
ruct
ionsoutt
oRAM f
orexecut
ion.I
n
such cases,t
hedat
asect
ionsmustst
il
lresi
dei
nRAM.Bootsequencef
orani
mage
r
unni
ngf
rom ROM i
sshownbel
owf
igur
e.
Thet
wor
egi
ster
sofCPU t
heI
nst
ruct
ionPoi
nter(
IP)r
egi
sterandt
heSt
ackPoi
nter(
SP)
r
egi
sterar
eimpor
tant
.TheI
Ppoi
ntst
othenexti
nst
ruct
ion(
codei
nthe.
textsect
ion)
t
hatt
heCPUmustexecut
e,whi
l
etheSPpoi
ntst
othenextf
reeaddr
essi
nthest
ack.
Thest
acki
scr
eat
edf
rom aspacei
nRAM,
andt
hesy
stem st
ackpoi
nterr
egi
ster
smust
besetappr
opr
iat
elyatst
artup.
Thebootsequencef
orani
mager
unni
ngf
rom ROM i
sasf
oll
ows:
i
).
TheCPU’
sIPi
shar
dwi
redt
oexecut
ethef
ir
sti
nst
ruct
ioni
nmemor
y(t
her
esetv
ect
or)
.
i
i
).Ther
esetv
ect
orj
umpst
othef
ir
sti
nst
ruct
ionoft
he.
textsect
ionoft
hebooti
mage.
The.
textsect
ionr
emai
nsi
nROM ;t
heCPUusest
heI
Ptoexecut
e.t
ext
.Thi
scodei
s
cal
l
edbootst
rapcode.
Thi
scodei
nit
ial
i
zest
hememor
ysy
stem,
incl
udi
ngt
heRAM.
i
i
i).
The.
dat
asect
ionoft
hebooti
magei
scopi
edi
ntoRAM becausei
tisbot
hreadabl
e
andwr
it
eabl
e.
i
v).
Spacei
sreser
vedi
nRAM f
ort
he.
bsssect
ionoft
hebooti
magebecausei
tisbot
h
r
eadabl
eandwr
it
eabl
e.Ther
eisnot
hingt
otr
ansf
erbecauset
hecont
entf
ort
he.
bss
sect
ioni
sempt
y.
v
).St
ackspacei
sreser
vedi
nRAM.
v
i).
TheCPU’
sSPr
egi
steri
ssett
opoi
ntt
othebegi
nni
ngoft
henewl
ycr
eat
edst
ack.
Att
hispoi
nt,t
hebootcompl
etes.TheCPUcont
inuest
oexecut
ethecodei
nthe.
text
sect
ion andi
nit
ial
i
zesal
lthehar
dwar
eandsof
twar
ecomponent
sunt
ili
tiscompl
eteor
unt
ilt
hesy
stem i
sshutdown.
Embeddedsy
stem Dev
elopmentTool
s : Basi
cal
l
ytheembeddedt
ool
sar
e
di
vi
dedi
ntot
wot
ypes(i
).
Har
dwar
eDev
elopmentt
ool
s and(
ii
)Sof
twar
eDev
elopment
t
ool
s.
Har
dwar
edev
elopmentt
ool
s:Har
dwar
etool
sforembedded dev
elopmenti
ncl
ude
dev
elopmentorev
aluat
ion boar
ds f
orspeci
fi
c pr
ocessor
s,l
i
ke Fr
iendl
y ARM’
s
Mi
ni2440,Pandaboar
d,Beagl
eboar
d andCr
aneboar
det
c..
Inaddi
ti
ont
othi
s v
ari
ous
ot
hesdev
icesl
i
ke Di
git
almul
ti
met
ers ,
Logi
cAnal
yzer
s,Spect
rum Anal
yzer
sand
Di
git
alCROset
c.ar
eal
sor
equi
redi
nembeddeddesi
gn.
The di
git
almul
ti
met
er i
s used t
o measur
evol
tages,cur
rent
s and t
o check t
he
cont
inui
tyi
ntheci
rcui
tsi
nanembeddedsy
stems.Becauset
heembeddedsy
stem al
so
cont
ainssomeappl
i
cat
ionspeci
fi
cci
rcui
tr
ywhi
chsomet
imesr
equi
redebuggi
ng.
TheLogi
canal
yzeri
susedt
ocheckt
het
imi
ngsoft
hesi
gnal
s,andt
hei
rcor
rect
ness.
TheSpect
rum anal
yzeri
shel
pful
tot
oanal
yzet
hesi
gnal
sint
hef
requencydomai
n.
Thedi
git
alCROhel
pst
odi
spl
ayt
heout
putwav
efor
msandal
sot
ost
oreapor
ti
onoft
he
wav
efor
mset
c.
Sof
twar
edev
elopmentt
ool
s/t
est
ingt
ool
s :Thesof
twar
edev
elopmentt
ool
sincl
ude
t
he oper
ati
ng sy
stem dev
elopmentsui
te,
cross pl
atf
orm dev
elopmentt
ool
s,ROM
emul
ator,
EPROM pr
ogr
ammi
ngandI
nci
rcui
tEmul
ator(
ICE)et
c.Theoper
ati
ngsy
stem
dev
elopmentsui
teconsi
stsofAPIcal
l
stoaccesst
heOSser
vices.
Thi
ssui
tecanr
unon
ei
therWi
ndowsorUNI
X/Li
nuxsy
stems.
Undert
hecr
osspl
atf
ormt
ool
s,
thecompi
l
ergener
atest
heobj
ectcodef
ort
hesour
ce
codedev
elopedi
nhi
ghl
evell
anguagesl
i
keCandC++orJav
aet
c.ForLI
NUXsy
stemsa
numberofGNUt
ool
sar
eav
ail
abl
e.
TheEPROM pr
ogr
ammeri
susedt
oinci
rcui
tpr
ogr
ammi
ngbybur
ningt
hecodei
nthe
memor
yoft
het
argetsy
stem.
Thei
nst
ruct
ionsetSi
mul
ator
(I
SS)sof
twar
ecr
eat
est
hev
irt
ualv
ersi
onoft
hepr
ocessor
ont
hePC.
Assembl
erand Compi
l
er:The bi
nar
y code obt
ained by t
ransl
ati
ng an assembl
y
l
anguagepr
ogr
am usi
nganassembl
eri
ssmal
l
erandr
unsf
ast
ert
hant
hebi
nar
ycode
obt
ainedbyt
ransl
ati
ngahi
ghl
evell
anguageusi
ngacompi
l
ersi
ncet
heassembl
y
l
anguagegi
vest
hepr
ogr
ammercompl
etecont
rolov
ert
hef
unct
ioni
ngofapr
ocessor
.
Theadv
ant
ageofusi
ngahi
ghl
evell
anguagei
sthatapr
ogr
am wr
it
teni
nahi
ghl
evel
l
anguagei
seasi
ert
ounder
standandmai
ntai
nthanapr
ogr
am wr
it
teni
nassembl
y
l
anguage.Hencet
ime cr
it
icalappl
i
cat
ionsar
ewr
it
teni
nassembl
ylanguagewhi
l
e
compl
exappl
i
cat
ionsar
ewr
it
teni
nahi
ghl
evel
language.
Cr
oss compi
l
ati
on t
ool
s ar
ever
yimpor
tantf
orsuccessf
ulpr
oductdev
elopment
.
Sel
ect
ionoft
heset
ool
sshoul
dbemadebasedupont
heembeddedsy
stem i
tsel
fas
wel
lasf
eat
urest
otestanddebugsof
twar
eremot
ely
.Thecr
oss-
plat
for
m dev
elopment
t
ool
sshoul
dbecompat
ibl
ewi
tht
he hostmachi
ne.Dependi
nguponCPUf
ami
l
yused
f
ort
het
argetsy
stem,t
het
ool
setmustbecapabl
eofgener
ati
ngcodef
ort
het
arget
machi
ne.I
nthecaseofGNUdev
elopmentt
ool
s,weneedt
ohav
eanumberoft
hingst
o
wor
ktoget
hert
ogener
ateexecut
abl
ecodef
ort
het
arget
.Atl
eastoneoft
he f
oll
owi
ng
t
ool
smustbeav
ail
abl
eont
hemachi
ne.
•
Crosscompi
l
er
•
Crossassembl
er
•
Crossl
i
nker
•
Crossdebugger
•
Cross-
compi
l
edl
i
brar
iesf
ort
het
argethost
.
•
Oper
ati
ngsy
stem-
dependentl
i
brar
iesandheaderf
il
esf
ort
het
argetsy
stem
Si
mul
at :Asi
or mul
atori
ssof
twar
etoolt
hatr
unsont
hehostandsi
mul
atest
hebehav
ior
oft
het
arget
’spr
ocessorandmemor
y.Thesi
mul
atorknowst
het
argetpr
ocessor
’s
ar
chi
tect
ureandi
nst
ruct
ionset
.Thepr
ogr
am t
obet
est
edi
sreadbyt
hesi
mul
atorand
asi
nst
ruct
ionsar
eexecut
edt
hesi
mul
atorkeepst
rackoft
hev
aluesoft
het
arget
pr
ocessor
’sr
egi
ster
sandt
het
arget
’smemor
y.Si
mul
ator
spr
ovi
desi
ngl
est
epand
br
eakpoi
ntf
aci
l
iti
est
odebugt
hepr
ogr
am.
Emul
ator:Anot
heri
mpor
tantt
ooli
stheI
CE(
In-
Cir
cui
tEmul
ator
),
whi
chemul
atest
he
CPU.Anemul
atori
sahar
dwar
etool
thathel
psi
ntest
inganddebuggi
ngt
hepr
ogr
am on
t
het
arget
.Thet
arget
’spr
ocessori
sremov
edf
rom t
heci
rcui
tandt
heemul
atori
s
connect
edi
nit
spl
ace.Theemul
atordr
ivest
hesi
gnal
sint
heci
rcui
tint
hesamewayas
t
het
arget
’spr
ocessorandhencet
heemul
atorappear
stobet
hepr
ocessort
oal
lot
her
component
soft
heembeddedsy
stem.Emul
ator
sal
sopr
ovi
def
eat
uressuchassi
ngl
e
st
epandbr
eakpoi
ntst
odebugt
hepr
ogr
am.
Sof
twar
eemul
ator
sar
esof
twar
etool
sthatcanemul
ateapar
ti
cul
arCPU.Usi
nga
sof
twar
eemul
atoronecandebug t
he codeandf
indoutCPUr
egi
sterv
alues,st
ack
poi
nter
sandot
her i
nfor
mat
ionwi
thouthav
ingar
ealCPU.Sof
twar
eemul
ator
sar
e
usef
ulwhenwedon’
thav
ether
ealhar
dwar
eav
ail
abl
efort
est
inganddebuggi
ngand
wantt
oseehowt
heCPUwi
l
lbehav
e whenapr
ogr
am i
srunoni
t.
-
--
--
--
--
--
--
--
--
--
--
xx-
--
--
--
--
--
--
--
--
--
--
--
--
Acknowl
edgment:Gr
atef
ult
othef
oll
owi
ngaut
hor
s,whosebookshel
pedi
npr
epar
ing
t
hiscl
assnot
es.
Ref
erences:1.
TheLi
nuxDev
elopmentPl
atf
orm Conf
igur
ing,Usi
ng,andMai
ntai
ninga
Compl
etePr
ogr
ammi
ngEnv
ironmentbyRaf
eeqUrRehman
2.Embedded Sof
twar
e Dev
elopmentwi
t an •Dav
h C,KaiQi id den Har
ing •Li
Cao,
Spr
inger
.
3EmbeddedReal
-t
imeSy
stems-Dr
.K.
V.K.
KPr
asad