μC/
OS-III
TM
The Real-Time Kernel
User’s Manual
Weston, FL 33326
Micriμm Press
1290 Weston Road, Suite 306
Weston, FL 33326
USA
www.micrium.com
Designations used by companies to distinguish their products are often claimed as trademarks.
In all instances where Micriμm Press is aware of a trademark claim, the product name appears in
initial capital letters, in all capital letters, or in accordance with the vendor’s capatilization
preference. Readers should contact the appropriate companies for more complete information
on trademarks and trademark registrations. All trademarks and registerd trademarks in this book
are the property of their respective holders.
Copyright © 2010 by Micriμm Press except where noted otherwise. Published by Micriμm Press.
All rights reserved. Printed in the United States of America. No part of this publication may be
reproduced or distributed in any form or by any means, or stored in a database or retrieval
system, without the prior written permission of the publisher; with the exception that the
program listings may be entered, stored, and executed in a computer system, but they may not
be reproduced for publication.
The programs and code examples in this book are presented for instructional value. The
programs and examples have been carefully tested, but are not guaranteed to any particular
purpose. The publisher does not offer any warranties and does not guarantee the accuracy,
adequacy, or completeness of any information herein and is not responsible for any errors and
ommissions. The publisher assumes no liability for damages resulting from the use of the
information in this book or for any infringement of the intellectual property rights of third parties
that would result from the use of this information.
For bulk orders, please contact Micrium Press at: +1 954 217 2036
ISBN: 978-0-9823375-9-2
600-uCOS-III-Users-Manual-002
3
Table of Contents
Preface .................................................................................................. 13
Chapter 1 Introduction .......................................................................................... 15
1-1 Foreground/Background Systems ...................................................... 16
1-2 Real-Time Kernels ................................................................................ 17
1-3 RTOS (Real-Time Operating System) .................................................. 19
1-4 μC/OS-III ............................................................................................... 19
1-5 μC/OS, μC/OS-II and μC/OS-III Features Comparison ...................... 24
1-6 How the Book is Organized ................................................................. 26
1-7 μC/Probe .............................................................................................. 26
1-8 Conventions ......................................................................................... 27
1-9 Chapter Contents ................................................................................. 28
1-10 Licensing .............................................................................................. 32
1-11 Contacting Micrium .............................................................................. 32
Chapter 2 Directories and Files ............................................................................ 33
2-1 Application Code ................................................................................. 36
2-2 CPU ....................................................................................................... 37
2-3 Board Support Package (BSP) ............................................................ 38
2-4 μC/OS-III, CPU Independent Source Code ........................................ 39
2-5 μC/OS-III, CPU Specific Source Code ................................................ 43
2-6 μC/CPU, CPU Specific Source Code .................................................. 44
2-7 μC/LIB, Portable Library Functions ..................................................... 46
2-8 Summary .............................................................................................. 47
Chapter 3 Getting Started with μC/OS-III ............................................................ 51
3-1 Single Task Application ....................................................................... 52
3-2 Multiple Tasks Application with Kernel Objects ................................. 60