图书目录

Preface to the Second Edition v

1. Introduction to Embedded Systems 1

l.l Embedded Systems 3

l.2 Processor Embedded into a System 5

l.3 Embedded Hardware Units and Devices in a System 10

l.4 Embedded Software in a System ig

l.5 Examples of Embedded Systems 27

l .6 Embedded System--on--chip (Soc) and Use of VLSI Circuit Design Technology 29

l.7 Complex Systems Design and Processors 32

l.8 Design Process in Embedded System 37

l.9 Formalization of System Design 42

l.10 Design Process and Design Examples 43

l.ll Classification of Embedded Systems 52

1. 12 Skills Required for an Embedded System Designer 53

2. 8051 and Advanced Processor Architectures, Memory Organization alld

Real-world lllterfacing 61

2.1 8051 Architecture 62

2.2 Real WOrld interfacing 72

2.3 Introduction to Advanced Architectures 84

2.4 Processor and Memory Organization 96

2.5 Instttiction--Level Parallelism i04

2.6 Performance Metrics i06

2.7 Memory--Types, Memory--Maps and Addresses 106

2.8 Processor Selection 113

2.9 Memory Selection 118

3. Devices and Commullicatioll Buses for Devices Network 128

3.1 IO Types and Examples 130

3.2 Serial Communication Devices 134

3.3 Parallel Device Ports 143

3.4 Sophisticated interfacing Features in Device Ports 150

3.5 Wireless Devices 151

3.6 Timer and Counting Devices i52

3.7 Watchdog Timer i57

3.8 Real Time Clock i58

3.9 Networked Embedded Systems 159

3.10 Serial Bus Communication Protocols 160

3.if Parallel Bus Device Protocols--Parallel Communication

Network Using ISA, PCI, PCI--X and Advanced Buses 166

3.12 Internet Enabled Systems--NetWork Protocols 170

3.13 Wireless and Mobile System Protocols 175

4. Device Drivers and interrupts Service Mechanism 187

4.1 Programmed--I/O Busy--wait APproach without interrupt Service Mechanism 189

D Contents

4.2 ISR Concept i92

4.3 Interrupt Sources 200

4.4 Interrupt Servicing (Handling) Mechanism 203

4.5 Multiple interrupts 209

4.6 Context and the Periods for Context Switching, Intemipt Latency and Deadline 211

4.7 Classification of Processors interrupt Service Mechanism from

Context--Saving Angle 2i7

4.8 Direct Memory Access 218

4.9 Device Driver Programming 220

5. Programming Concepts alld Embedded Programming in C, C++ and Java 234

5.1 Software Programming in Assembly Language (ALP) and in High--Level

Language 'C' 235

5.2 C Program Elements: Header and Source Files and Preprocessor Directives 237

5.3 Program Elements' Macros and Functions 239

5.4 Program Elements: Data Types, Data Stfuctures, Modifiers, Statements,

Loops and Pointers 24)

5.5 Object--Oriented Programming 262

5.6 Embedded Programming in C++ 263

5.7 Embedded Programming in Java 264

6. Program Modeling Concepts 273

6.1 Program Models 274

6.2 DFG Models 277

6.3 State Machine Programming Models for Event--controlled Program Flow 282

6.4 Modeling of Multiprocessor Systems 288

6.5 UML Modelling 295

7. Interprocess Communication and Synchronization of Processes, Threads alld Tasks 303

7.1 Multiple Processes in an Application 305

7.2 Multiple Threads in an APplication 306

7.3 Tasks 308

7.4 Task States 308

7.5 Task and Data 310

7.6 Clear--cut Distinction between Functions, ISRS and Tasks by their Characteristics 311

7.7 Concept of Semaphores 3i4

7.8 Shared Data 326

7.9 Interprocess Communication 330

7.10 Signal Function 332

7.if Semaphore Functions 334

7.12 Message Queue Functions 335

7.13 Mailbox Functions 337

7.14 Pipe Functions 339

7.15 Socket Functions 341

7.16 RPC Functions 345

8. Real-Time Operating Systems 350

8.1 OS Services 351

8.2 Process Management 355

8.3 Timer Functions 356

8.4 Event Functions 358

8.5 Memory Management 359

Contents n

M

8.6 Device, File and tO Subsystems Management 36)

8.7 Interrupt Routines in RTOS Environment and Handling of intemipt Source Calls 366

8.8 Real--time Operating Systems 370

8.9 Basic Design Using an RTOS 372

8. 10 Rtos Task Scheduling Models, Interrupt Latency and Response of the Tasks as

Performance Metrics 385

8.1 1 OS Security Issues 40)

9. Real-time Operating System Programming-I: Microc/OS-II and VxWOrks 406

9.1 Basic Functions and Types of RTOSES 408

9.2 RTOS mCOS--II 4i0

9.3 RTOS VxWorks 453

10. Real-time Operating System Programmillg-n: Willdows CE, OSEK alld Real-time

Linux Functions 477

10.1 Windows CE 478

10.2 OSEK 494

10.3 Linux 2.6.x and RTLinux 496

11. Design Examples and Case Studies of Program Modeling and Programming

with RTOS-1 511

l I .l Case Study of Embedded System Design and Coding for an Automatic 5i2

Chocolate Vending Machine (ACVM) Using Mucos RTOS

11.2 Case Study of Digital Camera Hardware and SofWare Architecture 531

l I .3 Case Study of Coding for Sending Application Layer Byte Streams on a

TCP/IP Network Using RTOS Vxworks 537

12. Design Examples and Case Studies of Program Modelillg and Programming with

RTOS-2 566

12.1 Case Study of Communication Between Orchestfa Robots 567

12.2 Embedded Systems in Automobile 574

12.3 Case Study of an Embedded System for an Adaptive Cruise Control (ACC)

System in a Car 577

12.4 Case Study of an Embedded System for a Smart Card 593

12.5 Case Study of a Mobile Phone Software for Key inputs 604

13. Embedded Software Development Process and TOols 618

l 3.1 Introduction to Embedded Software Development Process and TOols 620

13.2 Host and Target Machines 623

13.3 Linking and Locating Software 626

13.4 Getting Embedded Software into the Target System 630

13.5 Issues in Hardware--Software Design and Co--design 634

14. Testing, Simulatioll alld Debugging Techniques and TOols 648

14. I Testing on Host Machine 649

14.2 Simulators 650

14.3 Laboratory TOols 653

APPendix i: Roadmapfor Various Course Studies 662

APPendix 2.. Select Bibliography 663