Real-Time Embedded Multithreading Using ThreadX and MIPS.pdf

(1490 KB) Pobierz
1185273385.003.png
Newnes is an imprint of Elsevier
30 Corporate Drive, Suite 400, Burlington, MA 01803, USA
Linacre House, Jordan Hill, Oxford OX2 8DP, UK
Copyright © 2009, Elsevier Inc. All rights reserved.
No part of this publication may be reproduced, stored in a retrieval system, or transmitted in
any form or by any means, electronic, mechanical, photocopying, recording, or otherwise,
without the prior written permission of the publisher.
Permissions may be sought directly from Elsevier’s Science & Technology Rights
Department in Oxford, UK: phone: (
44) 1865 853333,
E-mail: permissions@elsevier.com. You may also complete your request
online via the Elsevier homepage (http://elsevier.com), by selecting “Support & Contact”
then “Copyright and Permission” and then “Obtaining Permissions.”
44) 1865 843830, fax: (
Library of Congress Cataloging-in-Publication Data
Application submitted
British Library Cataloguing-in-Publication Data
A catalogue record for this book is available from the British Library.
ISBN: 978-1-85617-631-6
For information on all Newnes publications
visit our Web site at www.elsevierdirect.com
Typeset by Charon Tec Ltd., A Macmillan Company. (www.macmillansolutions.com)
08 09 10 10 9 8 7 6 5 4 3 2 1
Printed in the United States of America
1185273385.004.png 1185273385.005.png
à mes anc ê tres qu é becois
Preface
Embedded systems are ubiquitous. These systems are found in most consumer
electronics, automotive, government, military, communications, and medical equipment.
Most individuals in developed countries have many such systems and use them daily,
but relatively few people realize that these systems actually contain embedded computer
systems. Although the fi eld of embedded systems is young, the use and importance of
these systems is increasing, and the fi eld is rapidly growing and maturing.
This book is intended for persons who develop embedded systems, or for those who
would like to know more about the process of developing such systems. Although
embedded systems developers are typically software engineers or electrical engineers,
many people from other disciplines have made signifi cant contributions to this fi eld.
This book is specifi cally targeted toward embedded applications that must be small, fast,
reliable, and deterministic. 1
This book is composed of 14 chapters that cover embedded and real-time concepts, the
MIPS ® processor, all the services provided by the ThreadX ® real-time operating system
(RTOS), solutions to classical problem areas, and a case study. I assume the reader has
a programming background in C or C
, so we won’t devote any time to programming
fundamentals. Depending on the background of the reader, the chapters of the book may
be read independently.
There are several excellent books written about embedded systems. However, most of these
books are written from a generalist point of view. This book is unique because it is based
on embedded systems development using a typical commercial RTOS, as well as a typical
microprocessor. This approach has the advantage of providing specifi c knowledge and
techniques, rather than generic concepts that must be converted to your specifi c system.
Thus, you can immediately apply the topics in this book to your development efforts.
Because an actual RTOS is used as the primary tool for embedded application
development, there is no discussion about the merits of building your own RTOS or
1 Such systems are sometimes called deeply embedded systems.
www.newnespress.com
 
xvi
Preface
forgoing an RTOS altogether. I believe that the relatively modest cost of a commercial
RTOS provides a number of signifi cant advantages over attempts to “ build your own. ” For
example, most commercial RTOS companies have spent years refi ning and optimizing
their systems. Their expertise and product support may play an important role in the
successful development of your system.
The RTOS chosen for use in this book is ThreadX 2 (version 5). This RTOS was selected
for a variety of reasons, including reliability, ease of use, low cost, widespread use, and
the maturity of the product due to the extensive experience of its developers. This RTOS
contains most of the features found in contemporary RTOSes, as well as several advanced
features that are not. Another notable feature of this RTOS is the consistent and readable
coding convention used within its application programming interface (API). Developing
applications is highly intuitive because of the logical approach of the API.
Although I chose the C programming language for this book, you could use C
instead
for any of the applications described in this book.
There is a CD included with this book that contains a limited ThreadX 3 system. You may
use this system to perform your own experiments, run the included demonstration system,
and experiment with the projects described throughout the book.
Typographical conventions are used throughout this book so that key concepts are
communicated easily and unambiguously. For example, keywords such as main or int are
displayed in a distinctive typeface, whether these keywords are in a program or appear
in the discussion about a program. This typeface is also used for all program segment
listings or when actual input or output is illustrated. When an identifi er name such as
MyVar is used in the narrative portion of the book, it will appear in italics. The italics
typeface will also be used when new topics are introduced or to provide emphasis.
2 ThreadX is a registered trademark of Express Logic, Inc. The ThreadX API, associated data
structures, and data types are copyrights of Express Logic, Inc. MIPS is a registered trademark of
MIPS Processors, Inc.
3 Express Logic, Inc. has granted permission to use this demonstration system for the sample
systems and the case study in this book.
www.newnespress.com
1185273385.001.png 1185273385.002.png
 
Zgłoś jeśli naruszono regulamin