Embedded Operating System (Extract)

Page 1

History and Future in the Internet of Things Allan He

Allan holds a Master’s degree in Computer Science and has more than 30 years of experience in the embedded system. He is a founder of an embedded software company. He served as deputy director of the editorial board of Microcontroller and Embedded System journal. He is the author of five Chinese books and has published 80+ papers. He frequently speaks in conferences and teaches embedded Operating System and IoT course at universities and corporations.

Lingyuan He

Lingyuan lives in the San Francisco bay area in California, USA. He holds a Master’s degree in Computer Science, and currently works as a senior member of technical staff in a major cloud computing and virtualization company.

This book thoroughly reviews the history of the development of embedded Operating Systems, covers the technical characteristics, historic facts, as well as background business stories of mainstream embedded Operating Systems, and analyzes the technical evolution, market development, and new opportunities of embedded Operating Systems in the age of the Internet of Things. From the perspective of time, the book examines the evolution of critical technical aspects, including real-time and Power Management of embedded Operating Systems and Linux, Internet of Things security, communication, and cloud computing. The book looks into applications of embedded Operating Systems with important markets of mobile phones, communication equipment, automobile, and wearable devices, and also discusses business model and the issue of intellectual property of embedded Operating Systems. In addition, the book walks through the status quo, technical features, product evaluation and background of the Internet of Things Operating Systems in the second half of the book.

Embedded Operating System • Allan He & Lingyuan He

Embedded Operating System

Embedded Operating System History and Future in the Internet of Things

ISBN 978-1-907920-86-8

Elektor International Media BV www.elektor.com

lektor

lektor

Allan He & Lingyuan He



Embedded Operating System History and Future in the Internet of Things

â—? Allan He and Lingyuan He Haidian, Beijing, China

an Elektor Publication

LEARN DESIGN SHARE


This is an Elektor Publication. Elektor is the media brand of

Elektor International Media B.V. 78 York Street London W1H 1DP, UK Phone: (+44) (0)20 7692 8344 © Elektor International Media BV 2020 First published in the United Kingdom 2020

All rights reserved. No part of this book may be reproduced in any material form, including

photocopying, or storing in any medium by electronic means and whether or not transiently or incidentally to some other use of this publication, without the written permission of the copyright holder except in accordance with the provisions of the Copyright, Designs and Patents Act 1988 or under the terms of a licence issued by the Copyright Licensing Agency Ltd, 90 Tottenham Court Road, London, England W1P 9HE. Applications for the copyright holder’s written permission to reproduce any part of this publication should be addressed to the publishers. The publishers have used their best efforts in ensuring the correctness of the information contained in this book. They do not assume, and hereby disclaim, any liability to any party for any loss or damage caused by errors or omissions in this book, whether such errors or omissions result from negligence, accident or any other cause.

British Library Cataloguing in Publication Data

ISBN 978-1-907920-86-8

Catalogue record for this book is available from the British Library

Printed in the Netherlands by Wilco

Elektor is part of EIM, the world’s leading source of essential technical information and electronics products for pro engineers, electronics designers, and the companies seeking to engage them. Each day, our international team develops and delivers high-quality content - via a variety of media channels (e.g., magazines, video, digital media, and social media) in several languages - relating to electronics design and DIY electronics. www.elektor.com

LEARN DESIGN SHARE


Table of Contents

Table of Contents Foreword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 3 Preface . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 The Start of This Book . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 What is in This Book? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Acknowledgments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 4 Chapter 1 - Introduction to Embedded Operating System . . . . . . . . . . . . . . . . . . . . . . 7 What is an Embedded System? . . . . . . . . . . What is an Embedded Operating System? . . . Categories of Embedded Operating System . . Applications of Embedded Operating System .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

7 7 8 9

Chapter 2 - History of Embedded Operating System . . . . . . . . . . . . . . . . . . . . . . . . . 10 VRTX - the Early Pioneer . . . . . . . . . . . . . . . . . . . . . . . . . A Brief History of VRTX . . . . . . . . . . . . . . . . . . . . . . . The VRTX Family . . . . . . . . . . . . . . . . . . . . . . . . . . . Applications of VRTX . . . . . . . . . . . . . . . . . . . . . . . . . VRTX in China . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Motorola Force . . . . . . . . . . . . . . . . . . . . . . . . . . . . OS-9: Grow with Motorola . . . . . . . . . . . . . . . . . . . . . Freescale: A Full-Range Solution Provider . . . . . . . . . . . The µC/OS Story . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Celebrating 25 years of μC/OS . . . . . . . . . . . . . . . . . . Author’s Remarks . . . . . . . . . . . . . . . . . . . . . . . . . . . Wind River - The Evergreen of Embedded Operating System . History of VxWorks . . . . . . . . . . . . . . . . . . . . . . . . . . Wind River’s Product Lineup . . . . . . . . . . . . . . . . . . . . Applications of VxWorks . . . . . . . . . . . . . . . . . . . . . . . Mergers and Acquisitions . . . . . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Smaller Rivals . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Earliest RTOS Company . . . . . . . . . . . . . . . . . . . . SMX - A Pioneer of Embedded OS . . . . . . . . . . . . . . . . ThreadX - The Rigorous Hard-Worker . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . .

10 10 11 11 11 12 12 13 13 14 16 18 18 18 19 20 20 21 21 23 23

Chapter 3 - Open-Source Embedded Operating System . . . . . . . . . . . . . . . . . . . . . . 25 Open-Source Software and Embedded Operating System . Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MontaVista Linux . . . . . . . . . . . . . . . . . . . . . . . . . RedHat and eCos . . . . . . . . . . . . . . . . . . . . . . . . . Android . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

. . . . . .

25 25 25 26 27 27

●5


Embedded Operating System ● History and Future in the Internet of Things Thoughts on Embedded System Open-Source Software . . . . . . . . . . . . . . . . . . . The Strong Showing of Open-Source Software in Embedded Systems . . . . . . . Mobile Internet is a Key Opportunity for Open-Source Software . . . . . . . . . . . Integration of the Open-Source Culture . . . . . . . . . . . . . . . . . . . . . . . . . . . Understand the Diversified Open-Source Requirements of Embedded Systems . Recognizing the Limitations of Open-Source Software in Embedded Systems . . Customize Your Own Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Explosion of Software in Devices . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Explicit Investments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Implicit Investments . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Development Process, Complexity and Cost . . . . . . . . . . . . . . . . . . . . . . . . Overall Costs . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MontaVista and Embedded Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Start of MontaVista Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . HardHat Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Three Variants of MontaVista Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Real-Time in MontaVista Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MontaVista Linux Professional 5.0 . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Development Trends of Embedded Linux Technology . . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . .

28 28 28 30 33 33 34 34 35 35 35 36 36 36 37 38 38 38 39 41

Chapter 4 -The Embedded Operating System Dream of the IT Giants . . . . . . . . . . . . . 42 An Overlook of Microsoft Embedded Operating Systems . . . . A Brief History of Microsoft Embedded System Products . WinCE - The Core of Microsoft’s Embedded Platform . . . . WinCE Kernel . . . . . . . . . . . . . . . . . . . . . . . . . . . Board Support Packages in WinCE . . . . . . . . . . . . . Device Drivers in WinCE . . . . . . . . . . . . . . . . . . . . WinCE Development Tools . . . . . . . . . . . . . . . . . . . .NET Micro Framework for Micro Devices . . . . . . . . . . . . Microsoft’s Products and Other RTOSes . . . . . . . . . . . . Embedded Linux . . . . . . . . . . . . . . . . . . . . . . . . . Wind River’s VxWorks . . . . . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ARM - The Growing Pains . . . . . . . . . . . . . . . . . . . . . . . . ARM’s Fast Growth . . . . . . . . . . . . . . . . . . . . . . . . . . ARM on Two Frontiers . . . . . . . . . . . . . . . . . . . . . . . . Invest in Both Software and Hardware . . . . . . . . . . . . . ARM’s Challenges . . . . . . . . . . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Google and Brillo OS . . . . . . . . . . . . . . . . . . . . . . . . . . . Google’s IoT OS and strategy. . . . . . . . . . . . . . . . . . . . The Technical Route of Brillo OS Remains Unclear . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

●6

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . .

42 42 43 43 44 45 45 45 47 47 48 49 49 49 50 52 54 56 58 58 58 60


Table of Contents Chapter 5 - European Embedded Operating Systems . . . . . . . . . . . . . . . . . . . . . . . . 61 OSE – an RTOS from the Artic Europe . . . . A Brief History of Enea . . . . . . . . . . . The Lineup of Enea OSE . . . . . . . . . . . Characteristics of OSE . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . SafeRTOS – RTOS for Safety . . . . . . . . . . FreeRTOS – The Rising Open-Source Rival .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

61 61 61 61 63 64 64

Chapter 6 - Asian Embedded Operating Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . 68 Embedded Software: the Chinese and Japanese Approaches . . . . . . ITRON and TOPPERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Chinese and Japanese Approaches on Embedded Software . The Open-Source and Education Commitments . . . . . . . . . . . . An Overview of TOPPERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . TRON and ITRON . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . T-Engine . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Real-Time Embedded Operating System TOPPERS . . . . . . . . . . The Current Status of TOPPERS . . . . . . . . . . . . . . . . . . . . . . . Middleware in TOPPERS . . . . . . . . . . . . . . . . . . . . . . . . . . . . The New Generation Real-Time Kernel in TOPPERS . . . . . . . . . . TOPPERS Development Tools . . . . . . . . . . . . . . . . . . . . . . . . Common Characteristics of TOPPERS New Generation Kernels . . The Next Decade for TOPPERS . . . . . . . . . . . . . . . . . . . . . . . The Internationalization Process of TOPPERS . . . . . . . . . . . . . . Development of RT-Thread . . . . . . . . . . . . . . . . . . . . . . . . . . . . A Brief History of RT-Thread . . . . . . . . . . . . . . . . . . . . . . . . . Enterprise-Facing Strategies . . . . . . . . . . . . . . . . . . . . . . . . . The Open-Source Community . . . . . . . . . . . . . . . . . . . . . . . . Challenges and Opportunities . . . . . . . . . . . . . . . . . . . . . . . . SylixOS – A New Promising Star in RTOS . . . . . . . . . . . . . . . . . . . History of SylixOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Technical Characteristics of SylixOS . . . . . . . . . . . . . . . . . . . . Future Outlook of SylixOS . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . .

68 68 69 69 70 70 71 72 73 74 76 79 81 86 86 87 88 89 90 91 92 92 93 95

Chapter 7 - Embedded Linux Operating Systems . . . . . . . . . . . . . . . . . . . . . . . . . . . 96 Real-Time Technologies in Embedded Linux . . . . . Time Delays in Linux Kernel . . . . . . . . . . . . . Real-Time Developments in Linux . . . . . . . . . Real-Time Improvements to the Linux Kernel . Real-Time Preemption Kernel Performance . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . Improve Clock Precision in Embedded Linux . . . . . Methods to Improve Clock Precision . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . Dynamic Power Management in Embedded Linux . Principles of Dynamic Power Management . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. 96 . 96 . 97 . 98 100 101 101 101 103 103 103

●7


Embedded Operating System ● History and Future in the Internet of Things Hardware Platform Support for Dynamic Power Management . . . . Implementation of Embedded Linux Dynamic Power Management . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Afterword . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

. . . .

104 105 109 109

Chapter 8 - Embedded System Safety and Security . . . . . . . . . . . . . . . . . . . . . . . . 110 Safety and Security of Embedded Systems in the Internet of Things . Thoughts on the Toyota Unintended Acceleration Recall . . . . . . . . . . Automotive Industry Should Learn from the Aviation Industry . . . Revelations to the Automotive Industry in China . . . . . . . . . . . . Further Read . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Build a Secure Internet of Things System . . . . . . . . . . . . . . . . . . . Background . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Objectives of IoT Security . . . . . . . . . . . . . . . . . . . . . . . . . . . Design a Secure IoT Architecture . . . . . . . . . . . . . . . . . . . . . . . IoT Security in Practice: An Example of Secure OTA Update . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

110 111 111 112 113 113 113 113 114 116 118

Chapter 9 - Embedded System and Cloud Computing . . . . . . . . . . . . . . . . . . . . . . . 119 Cloud Computing, the IoT and Embedded Systems . The Cloud . . . . . . . . . . . . . . . . . . . . . . . . . . Backend Services . . . . . . . . . . . . . . . . . . . . . Data Analysis (Big Data) . . . . . . . . . . . . . . . . Further Reads . . . . . . . . . . . . . . . . . . . . . . . The Internet and the IoT Protocols . . . . . . . . . . . . People Internet vs. Device Internet . . . . . . . . . TCP/IP Protocol Stack . . . . . . . . . . . . . . . . . . The IoT Protocols . . . . . . . . . . . . . . . . . . . . . Comparing Web and IoT Protocols . . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

. . . . . . . . . .

119 119 120 121 122 123 123 123 124 126

Chapter 10 - Embedded Operating Systems in Mobile Phones . . . . . . . . . . . . . . . . . 128 Mobile Phones: a Battleground of Embedded Operating Systems . An Analysis of Feature Phone Platforms . . . . . . . . . . . . . . . Symbian Operating System . . . . . . . . . . . . . . . . . . . . . . . Open-Source Mobile Phone Operating System . . . . . . . . . . . Android and Its Competitors . . . . . . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Growing Role of Android . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

128 128 129 130 132 134 134

Chapter 11 - Embedded Operating System Applications . . . . . . . . . . . . . . . . . . . . . 139 Embedded Communication Products Development . . . . . . . . . . . . . Embedded Linux in Communication Devices . . . . . . . . . . . . . . . . . . Design Method Are Keys to the Adoption of Embedded Linux . . . . Why Do We Use Linux? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Embedded Linux for the Next Generation of Communication Devices . MontaVista Embedded Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

●8

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

. . . . . . .

139 141 141 141 142 143 144


Table of Contents Further Reads . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Embedded Linux-Based Wireless Networking Device Development . . . . . . . . . . . MontaVista Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Features of MontaVista Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . MontaVista Linux’s Support for Wireless Networks . . . . . . . . . . . . . . . . . Develop Wireless Network Application Systems on MontaVista Linux . . . . . . . The Procedure to Develop a Wireless Network Application System . . . . . . An Embedded Wireless Network Application System Based on Rpxlite823 . Principles of an IEEE 802.11b Wireless NIC . . . . . . . . . . . . . . . . . . . . . Kernel Configuration and Wireless NIC Driver Debugging . . . . . . . . . . . . Wireless Network Configuration and Software Solidification . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Automotive Electronics: The New Battlefield . . . . . . . . . . . . . . . . . . . . . . . . . . OSEK and AUTOSAR . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . QNX – The Leader of Automotive Electronics Software . . . . . . . . . . . . . . . . Open versus Closed . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Automobile Safety . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . .

144 145 145 145 146 147 147 147 148 148 149 149 150 150 151 151 153 153

Chapter 12 - Intellectual Property in Embedded Software . . . . . . . . . . . . . . . . . . . . 154 Intellectual Property in Embedded Software . . . . . . . . . . . . . . . . . The Concept of Software Intellectual Property . . . . . . . . . . . . . Characteristics of Embedded Software . . . . . . . . . . . . . . . . . . Licensing of Embedded Software . . . . . . . . . . . . . . . . . . . . . Embedded Software Intellectual Property Strategies . . . . . . . . . Embedded Software Innovation . . . . . . . . . . . . . . . . . . . . . . . Obtaining Licenses from Semiconductor Manufacturers . . . . . . . Participate in Industry Standard Underwriting and Patent Filing . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . FreeRTOS and its Licensing Scheme . . . . . . . . . . . . . . . . . . . . . . The Origin of FreeRTOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . Products of FreeRTOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Licensing of FreeRTOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

. . . . . . . . . . . . . .

154 154 155 155 157 157 158 158 160 160 160 161 162 163

Chapter 13 - Wearable Devices and Embedded Operating System . . . . . . . . . . . . . . 164 Wearable Devices: The Status Quo and the Future . . . . . . . . Operating Systems on Wearable Devices . . . . . . . . . . . . . . . The History of Wearable Operating Systems . . . . . . . . . . Technical Characteristics of Wearable Operating Systems . Methods of Developing Wearable Operating Systems . . . . Mainstream Wearable Operating Systems . . . . . . . . . . . . Google’s Android Wear . . . . . . . . . . . . . . . . . . . . . . Samsung’s Tizen . . . . . . . . . . . . . . . . . . . . . . . . . . Apple Watch . . . . . . . . . . . . . . . . . . . . . . . . . . . . . ARM mbed OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

. . . . . . . . . . .

164 167 167 168 171 172 172 172 173 173 173

●9


Embedded Operating System ● History and Future in the Internet of Things Chapter 14 - Internet of Things Operating Systems . . . . . . . . . . . . . . . . . . . . . . . . 174 What is the Internet of Things Operating System? . . . . . . . . . . . . . The Origin of the Internet of Things Operating Systems . . . . . . . The Status Quo of Internet of Things Operating Systems . . . . . . . Technical Characteristics and Implementations . . . . . . . . . . . . . The Ability to Manage “Things” . . . . . . . . . . . . . . . . . . . . . Ubiquitous Connectivity . . . . . . . . . . . . . . . . . . . . . . . . . . Maintainability . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IoT Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IoT Cloud Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Advanced Programming Language Support . . . . . . . . . . . . . ARM mbed OS IoT Platform . . . . . . . . . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Deep Dive into the Internet of Things Operating Systems . . . . . . . . . The Beginning of IoT OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Race of IoT OS Has Just Started . . . . . . . . . . . . . . . . . . . . Open-Source Remains in the Leading Role . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Research and Thoughts on the Internet of Things Operating Systems . The Origin of IoT OSes . . . . . . . . . . . . . . . . . . . . . . . . . . . . . What is an IoT OS? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . The Status Quo of IoT OS . . . . . . . . . . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Huawei LiteOS - Connecting the World of Intelligent Things . . . . . . . A Brief History of LiteOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . Architecture of LiteOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Technical Characteristics . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ecosystem Building . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Developer Community . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . A Comparison of Three Internet of Things Operating Systems . . . . . . A Brief History of IoT OSes . . . . . . . . . . . . . . . . . . . . . . . . . . . Technical Characteristics of IoT OSes . . . . . . . . . . . . . . . . . . . . Hands-On Analysis of Three IoT OSes . . . . . . . . . . . . . . . . . . . Huawei LiteOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Amazon FreeRTOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RT-Thread . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Technical Comparison of Three IoT OSes . . . . . . . . . . . . . . . . . Trends of IoT OS Development . . . . . . . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

174 174 175 176 176 177 177 177 178 178 179 180 180 180 181 183 184 185 185 188 189 190 191 191 192 193 193 194 194 194 195 195 195 198 201 204 205 205

Chapter 15 – Embedded Technology and the Internet of Things . . . . . . . . . . . . . . . 206 The Internet of Things Propels the Growth of Microcontroller What is a Microcontroller Unit (MCU)? . . . . . . . . . . . . . MCU Powers the Development of IoT . . . . . . . . . . . . . . The Status Quo of MCU in China . . . . . . . . . . . . . . . . . How Can Chinese MCU Charge Forward . . . . . . . . . . . .

● 10

Unit . . . . . . . . . . . . . . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

. . . . .

206 206 206 207 207


Table of Contents Review and Outlook of Embedded Technology and the Internet of Things . . . . . . . . . Acquisitions within the Semiconductor Industry . . . . . . . . . . . . . . . . . . . . . . . . Edge Computing in IoT . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IoT Cloud Platform . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IoT OS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IoT Communication Technology . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . IoT Safety and Security . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . RISC-V – Embedded System Design Technology of the New Smart Intelligent World . . What is RISC-V? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . How is the RISC-V Project Managed? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . What are the Advantages of RISC-V? . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Ecosystem Building is the Key . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Standardization and Diversification . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

208 208 209 210 210 210 211 211 212 212 213 213 213 214 215

Epilogue - My 20 Years of Career in Embedded System . . . . . . . . . . . . . . . . . . . . . . 216 Intel Led Me Into the Embedded System Industry . . . . . . . . . . . Get to Know Embedded Operating System with VRTX . . . . . . . . ARM, Open-Source Software and The Push of Embedded System Conclusions . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . .

. . . . . . . . . . . . . . . . . . . . . . Standardization . . . . . . . . . . .

. . . .

. . . .

. . . .

216 217 220 221

In Memory of Jim Ready . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 First in Commercial RTOS . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 222 Pioneer of Embedded Linux . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223 A Mentor and a Friend . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . . 223

● 11


Foreword

Foreword There is a generally recognized problem in the computer technology world that we’re not preserving any history of what is arguably the most profound development in the history of mankind. Even with the hardware, which is physical, there is a problem with significant hardware systems being scrapped and forever lost for future generations to study. In fact, the Computer Museum in Mountain View California has been established precisely to preserve as much of the legacy of computer technology as possible. With software the problem is greatly exacerbated since there is really no direct physical manifestation of the software, only perhaps some manuals or maybe a source listing or tape. In response, Allan He has undertaken this much need task of preserving software history with the writing of his book Embedded Operating Systems – History and Future. By the very nature of embedded systems, systems hidden within a larger application such as those found in aerospace, transportation and communications, their invisibility to the outside world (except of course if they fail) means that only a few insiders know anything about them. Yet their reliable and safe operation 24x7 is critical to the overall success of the application. Intel faced this invisibility problem with its processors in the early days of the PC market, which lead to Intel’s very successful “Intel Inside” program. The problem for embedded operating systems makers is that there is no Intel to support the “Embedded OS Inside” campaign. For embedded operating systems, the good news is that there may not be an Intel, but there is Allan He. Allan He is in a unique position to document the history of embedded operating systems, since he is in fact one of the pioneers of the technology and business. Starting in the early 1990’s in China as a very very early entrepreneur in the embedded software market, first with Ready Systems China and later BMR, Allan He drove the adoption of RTOS technology and later embedded Linux over 3 decades of technology and business leadership. By the way, in 1992 or so, Allan He was likely one of the first Linux and Internet users in China as he joined the worldwide community of embedded system developers. (Remember Linux was first released in 1991!) Allan didn’t just talk the talk, Allan walked the walk. (This phrase is a compliment of high praise in Silicon Valley) The heart of preserving the software history is what is perfectly captured in Allan’s book, as told only as a real experienced insider could do. Hats off to Allan for taking the time and effort to write this important book. Jim Ready Cupertino, CA USA

●3


Embedded Operating System ● History and Future in the Internet of Things

Preface In 1994, I entered the embedded system industry. In the decade leading to it, although I have taken part in industrial automation and communication device projects, I have not been exposed to real embedded operating systems. In other words, while I managed to know a few things about real-time multi-tasking OSes before 1994, I did not know anything about embedded OSes. Over the next quarter of a century to today, embedded system and embedded have been an integral part of my career. The Start of This Book

I often browse for embedded OS books on Amazon. Occasionally, I recommend books for translation to publishing houses in China. Among them, close to ten translated books have been published; I participated in the translation and review works of 3 of them. I observe that there are many books about embedded OS, especially in embedded Linux and RTOS, but rarely any about the history of embedded OS; the area of Internet of Things OS also lacks dedicated publications. Throughout my career, I have witnessed the start of embedded OS in the 1980s, the growth of embedded OS in the 1990s, the rise of embedded in the 2000s, the boost of Android in the 2010s, and the wave of IoT OS after 2015. I am excited by the idea of presenting the 30+ years of history of embedded OS in English. What a great thing can it be! Lingyuan and I spent a lot of our free time in writing and completed this book. What is in This Book?

With 15 chapters, this book covers history, technology, application, business model and future development of embedded OS. In these chapters, I review the development of embedded OS, as well as technical characteristics, history, business stories and future developments of mainstream embedded OSes. Using time as the clue, I look into the evolution from RTOS to open-source embedded OS, and IoT OSes. From a technical standpoint, I analyze technologies around real-time, security, and cloud computing. I also cover the application of embedded OS by sampling markets of smartphone, communication, automobile, and wearable devices. Last but not the business, I examine the intellectual property issue in embedded OS and expose problems in business models. Embedded OS originated in North America where most of the innovation around the technology had occurred. However, Europe and Asia have become increasingly active in recent years. This book devotes a fair amount of attention to the European and Asian markets. Acknowledgments

Before the microprocessor, it was absurd to consider adding a computer to a product; now, in general, only the quirky build anything electronic without embedded intelligence.1 These were words from Jack Ganssle’s book, and I have witnessed the exact transformation. In 1988, as I was pursuing my Computer Science Master’s degree in Beihang University, my faculty advisors Zijun Tian and Zixin Zhuang offered me tremendous help with microprocessor and its applications. Thanks to them, I laid a solid foundation for my career in embedded system. 1 Ganssle, Jack. “Microprocessors Change the World” Embedded. https://www.embedded.com/electronics-blogs/break-points/4231029/Microprocessors-change-the-world. 2011.

●4


Preface

The true mentors of my career were Jim Ready and Andre Kobel. Jim was a technology guru who set the direction, and Andre was the sales and marketing expert who offered me direct and effective help. Leveraging products from Ready System and Microtec Research (Jim founded Ready System, which later merged into Microtec Research), I embarked on my career in embedded system. Since 2009, I have had the privilege to work with Professor Limin He in Microcontroller and Embedded System Application journal. He was one of the earliest pioneers of microcontroller in China; I have benefitted a lot from his swift thinking, openness, and rigorous attitude. I have also met many senior academicians and entrepreneur in Embedded System Beijing Forum (www.esbf.org) which started by Prof. He and I, among others . Besides, I have personally participated in embedded system education in Chinese higher education institutions. These experiences help me understand embedded system from a different angle. In the past 20 plus years, while I practice embedded systems, many professors, entrepreneurs, and friends in media have supported me. I cannot name all of you here, but please allow me to express my gratitude. I could not have written this book without contributions from many friends: Jim Ready2, who provided me with many historical materials and kindly agreed to write the foreword. Bill Weinberg, who has worked in MontaVista, Black Duck Software, OSDL, and now works in Open Source Sense. Dr. Jun Sun, who has been a senior engineer in MontaVista, Google, and Spreadtrum, and has been very active in the Linux community. Jean Labrosse and Christian Legare in Micrium (now a part of Silicon Labs). Jean is perhaps the person I discuss embedded OS with the most, Jean has long been active in the RTOS field; his µC/ OS series of books are renowned in China, and I have personally helped translated two of them. My colleague, Aihua Zhang in BMR; she and I teach about RTOS. Dr. Shaopu Li, Dr. Wuling Huang, and Mrs. Xia Wang who once interned or worked in BMR. Associate Professor Zhongmei Ma from Beijing Institute of Technology. Weidong Zhong, principal engineer of ZTE Chengdu Research Center. Dr. Yuliang Gu from CASS Software. Haifeng Li from Huawei LiteOS project. Beijing AcoInfo’s Hui Han. RT-Thread founder Mr. Puxiang Xiong. Dr. Wei Ren from Synopsys Wuhan Research Center. And most importantly, I would like to thank my family for their continuous support for this book. My wife Liping spent countless hours on the contents. My son Lingyuan, co-author of this book, diligently gathered reference material and precisely conveyed my ideas in English. He spent his free time out of his work in a software company in Silicon Valley to help to complete the book. Without him, this book could not have come into being. My family’s understanding and support have allowed me to work on what I love.

2 This book includes an article that I wrote in remembrance of Jim Ready, the late technologist and businessman.

●5


Embedded Operating System â—? History and Future in the Internet of Things

Embedded Operating System is a complex engineering domain that integrates hardware and software. With the current wave of IoT and artificial intelligence developments, embedded OS is again gaining popularity and importance. On my personal website3, I categorize articles, course materials, keynotes, and other resources that I have authored or gathered over the past 20 years. I welcome any comments and questions from all of you on the subject. Thank you for your support of my work! Allan He July 2019 Haidian, Beijing, China

3

http://hexiaoqing.net

â—?6


Chapter 1 ● Introduction to Embedded Operating System

Chapter 1 - Introduction to Embedded Operating System Operating System and the Internet of Things are among the most familiar technical terms even for people that are not tech-savvy. The green little droid – Android on the smartphones; Windows on desktops; highway tolls that are paid through ETC; fitness trackers that report activities and post them on your social networks; these are all familiar to us. However, if we go one step further, there are diverse views on embedded system and embedded OS. What is an Embedded System?

What exactly is an embedded system? What is an embedded OS? Even professionals may not agree on the details. There are two key points to the definition. First, an embedded system is a dedicated computer system; usually, it is based on customizable hardware/ software and places strict requirements on reliability, cost, physical size, and energy consumption. Second, an embedded system has both hardware and software components. Embedded Systems Dictionary from CMP Books offers the most classic definition: A combination of computer hardware and software, and perhaps additional mechanical or other parts, designed to perform a dedicated function. In some cases, embedded systems are part of a larger system or product, as in the case of an antilock braking system in a car.4 A different version from IEEE: An Embedded Computer System: A computer system that is part of a larger system and performs some of the requirements of that system; for example, a computer system used in an aircraft or rapid transit system.5 As we can see, hardware/software combination and computational functionalities are two important features. In recent years, the notion “intelligent system” has also become widespread, which summarizes many embedded systems from a different angle. Today, embedded systems can be found in every corner of our lives, from refrigerators, smartphones, fitness trackers, and smartwatches that we use every day, cars, trains and planes that we take to get around, to routers, switches, and gateways that keep the Internet running, they are all embedded systems. What is an Embedded Operating System?

Every embedded system has at least one embedded processor (or microcontroller, or Digital Signal Processor – DSP). The software running in these processors are embedded software, also known as firmware. Initially, this kind of software was far from complex. But as embedded processors evolved from 8 bit to 16 and 32 bit, embedded computer systems have become increasingly complicated, requiring an operating system to provide management functionalities and Application Programming Interfaces (API). As a result, in the 1970s, real-time kernel became prevalent. And then, in the 80s, real-time OS (RTOS) started to take shape. RTOS integrates networking and filesystem functionalities and provides development and debugging environments. As embedded processor technology, especially ARM 7/8 matured in the next decade, general-purpose OSes began to play a role in embedded systems; examples include many Linux distributions that are resource-friendly (commonly referred to as embedded Linux). Since the 2000s, OSes on hand-held interactive devices (like Android) and in the IoT have gained popularity. 4 Ganssle, Jack G., and Michael Barr. Embedded systems dictionary. San Francisco: CMP Books, 2003. 5 IEEE, 610.10: IEEE Standard Glossary of Computer Hardware Terminology.

●7


Embedded Operating System ● History and Future in the Internet of Things

Any OS that can be used in an embedded system can be called an embedded OS. Inheriting the characteristics of a typical OS, an embedded OS provides core kernel functionalities and other services like task/process management and scheduling, inter-process communication, memory management, filesystem, networking, device management etc. Many embedded OSes also provide multi-core, virtualization and security mechanisms, and even development environment and ecosystem support. There are many special requirements for some embedded OSes, for instance, real-time, reliability, and customizability. Quoting Embedded Software6, “while embedded OSes vary in what components they possess, all OSes have a kernel at the very least. The kernel is a component that contains the main functionality of the OS.” Embedded OS execute on CPUs, with support from device drivers or board support packages (BSP). Commercial embedded OS products first appeared in the late 1970s, at peak, there were hundreds of them in the 90s. Today, there are still a handful of choices; only a few of them have truly thrived. Just to name some of them: eCos, µC/OS-II and III, VxWorks, pSOS, Nucleus, ThreadX, Rtems, QNX, INTEGRITY, OSE, C Executive, CMX, SMX, emOS, Chrous, VRTX, RTX, FreeRTOS, LynxOS, ITRON, Symbian, RT-Thread, Linux variations like µClinux, Android and Meego, as well as WinCE, Windows Phone OS and Windows Embedded from Microsoft. >any products already disappeared due to mergers and companies shutting their doors, like pSOS, VRTX and Chrous, while many open source solutions went unmaintained and were abandoned, for instance, eCos and Meego. We will dive into this period of history in the following chapters. Categories of Embedded Operating System

Traditionally, operating systems are categories into desktop and server versions. With the rise of smart devices (smartphones and tablet), mobile OS adds another major category. Almost in the meantime, cloud OSes, which run in a browser, joins the list as the newest player. For embedded OS, categorization is an even harder task. Depending on real-time type, we can categorize OSes into hard and soft real-time, two typical examples are RTOS and Linux; from the perspective of the business model, open source and closed source (proprietary); application level, general-purpose and special-purpose. VxWorks is a hard real-time proprietary special-purpose OS; embedded Linux is a soft real-time, open source and general-purpose OS. Android, widely used in smartphones and tablets, is not a conventional embedded OS. But as it is increasingly being used in consumer electronics like smart TV, smartphone and even industrial applications, it has gained many features of an embedded OS. There are three kernel organization models of an OS: monolithic, layered and microkernel. A monolithic kernel is a composition of drivers, middleware and kernel functionalities; this makes it hard to customize and debug. Consequently, modular designs became mainstream, which eases the problem. Typical monolithic kernels can be found in µC/OS-II, Linux etc. Layered architecture, as the name suggests, provides services (APIs) in layers; each layer depends on functionalities provided by lower layers. While a layered kernel is friendly to development and maintenance, the very same structure increases the size and overhead of the OS overall. VRTX 32 is a classic example of such a model. A microkernel 6 Labrosse, Jean J. Embedded Software. Amsterdam/Boston: Elsevier/Newnes, 2008.

●8


Chapter 1 ● Introduction to Embedded Operating System

is a minimum form of a kernel with only storage management, process management, and essential device drivers. As modules are dynamically loaded when needed, a microkernel offers excellent extensibility and maintainability. Isolation of modules also makes the system more secure and easier to be ported between different processors. However, the trade-offs are higher overhead and lower efficiency. Most commercial embedded OSes use microkernel design, for example, CMX-RTX, VxWorks, Nucleus plus, QNX and VRTXsa. Applications of Embedded Operating System

Embedded system applications are everywhere, but not all of them are accompanied by an embedded OS. Various factors may be considered by a developer: an OS would require a certain amount of hardware resources; a commercial OS requires licensing; open-source counterparts need training and customizations (or paid add-on services). The following are the common applications where an embedded OS would thrive: • Wireless communication. Smartphones, base stations, and wireless switches widely adopt embedded OSes and middleware (e.g. for communication protocols). • Networking. Routers, switches, access points, and information security devices commonly use RTOS and open-source Linux. • Home appliances. Smart TV, cable converter boxes, smart refrigerators regularly come with Android and other embedded OSes. • Aviation, aerospace, and military. Systems on aircraft, spacecraft, vessels, and weapons are usually certified RTOSes. This is one of the early frontiers of embedded OSes. • Automobile. Modern cars and transportation vehicles come heavily equipped with embedded processors. Today, private RTOS applications in the field are moving towards standardized RTOS and general-purpose embedded OS technologies. We can foresee that in this era of intelligent traffic management and the Internet of Cars, automotive electronics can push the development of embedded OS further. • Internet of Things. Internet of Things and cloud computing are two major boosters of the advancement of IT today. For embedded system and embedded OS, IoT is a major influencer. Embedded OSes are evolving to cater to the new requirements of low-energy wireless communication, IoT gateways, IoT security, and dynamic overthe-air (OTA) update.

●9


Embedded Operating System ● History and Future in the Internet of Things

Chapter 2 - History of Embedded Operating System In the late 1970s, commercial embedded OSes debuted in North America. The 1990s saw a peak of embedded OS, with hundreds of products available in the market. Today, after 4 decades of development and competition, there are still dozens of choices. In the early days, embedded OSes were RTOS kernels on 8/16-bits processes with the support of programming languages like assembly and P/LM (later C and Ada). In this chapter, we will look at stories of a couple of important RTOSes throughout history. VRTX - the Early Pioneer

Versatile Real-Time Executive (VRTX) was no doubt one of the first commercial embedded OSes. As an early leader, this innovative product gained wide adoption by users and embedded system companies. A Brief History of VRTX

VRTX was original a product of Hunter & Ready, founded by James (Jim) Ready and Colin Hunter in 1980. Hunter & Ready would later rename to Ready System. VRTX initially supported 16-bits microprocessors, for example, Z8002, 8086, 8088 and 68000; but in principle, it can run on any microprocessor. VRTX offers APIs in C, and does not require the customer to purchase the source code; these were very visionary at the time. AMD’s AMZ8000/8002 (Zilog Z8000/8002) was one of the first major platforms that VRTX could run on. VRTX/8002 is an extensible, event-driven compact multi-tasking real-time kernel; these characteristics pretty much defined what an RTOS is for years to come. VRTX claimed several firsts in the industry. In 1987 it became the first RTOS to have a deterministic kernel; in 1989, the first RTOS emulator VRTXdesigner was published; in 1990, MD-11, which has VRTX in its Honeywell flight control system, was certified by FAA for commercial passenger flights. In 1991, Ready System published VRTX Velocity that intergrades VRTX and UNIX OS development environment. VRTX Velocity supports Ethernet download/debugging, provides an interactive source code debugger, and is compatible with UNIX I/O and networking. UNIX OS was the most widely adopted standard OS in the 80s and 90s. In 1993, Ready System merged into Microtec Research, one of the most well-known embedded software companies in the Silicon Valley. Based on VRTX32, which was the golden standard of RTOS, VRTXmc and VRTXsa were developed. An integrated development environment (IDE) product Spectra (which includes Microtec’s debugger XRAY) was also developed. It wasn’t long before Mentor Graphics (an Electronic Design Automation - EDA company) acquired Microtec Research in 1995. VRTX would continue to evolve over the next 7-8 years; for example, it gained the support of integrated SoC software/hardware development, which was an insightful move. In 2002, Mentor Graphics bought another embedded OS company Accelerated Technology; subsequently, resources were redirected to the open-source OS Nucleus. VRTX lost much of its market share during these years, and founder Jim Ready also left Mentor Graphics in 1999 and founded MontaVista Software that develops embedded Linux.

● 10


Chapter 2 ● History of Embedded Operating System

The VRTX Family

VRTX 1.0 dates all the way back to 1981. After version 2.0 and 3.0, in 1987, the first deterministic RTOS – VRTX32 was released. VRTX32 was initially designed for 68k and 80x86 CPUs. It was one of the most widely used RTOS kernels with the least errors reported; it even found its way into avionics and was certified by the FAA. In 1992, Spectra IDE and VRTXsa were released. VRTXsa (sa stands for scalable architecture) is a Nanokernel with support for large-scale embedded systems. VRTXmc (mc – microcontroller) was released in 1994, offering very small footprints on RAM/ROM. VRTXmc supports Motorola M.CORE and ARM SoC in addition to 68k series CPU. VRTXmc offers license based on product series, which makes it ideal for consumer electronics. Applications of VRTX

VRTX was one of the earliest commercial embedded OS with numerous success stories. It can be found in avionics (Grumman F14, McDonnell Douglas MD-11, Airbus A320/330/340 etc.), TGV high-speed train, Motorola mobile phones, Samsung telephone switching system, medical monitoring devices, cable signal converter etc. There were as many as 50k VRTX customers in 1999. VRTX in China

VRTX entered the Chinese market in 1993, earlier than many other RTOSes. Its competitors Integrated System (pSOS/pSOS+) and Wind River (VxWorks) would later follow suit in 1997 and 1998 respectively. VRTX contributed considerably to embedded OS research and education. Microtec, in cooperation with the University of Electronic Science and Technology of China, established the Center of Embedded System Design in China in 1996, whose purpose is to provide education and training to users in China. Microtec and Intel contributed their development tools including the 386EX development environment to the joint effort. Microtec later established a similar partnership with Tsinghua University together with Motorola. VRTX gained confidence quickly in China due to the proven records in aviation and industrial control. Prominent customers include Huawei (communication), Mitsubishi Elevator, Nari, XJ Electric, Huakong etc. A number of avionic research centers in Chengdu, Shanghai, and Xi’an have also used VRTX. Despite heavy competition from pSOS in the communication field, VRTX managed to gain the upper hand with various well-known companies like Shanghai Bell (Nokia Shanghai Bell), Huaguang, Grand Dragon, Jinpeng, Datang, Chongqing Posts and Telecommunication Manufacturing corporation and Beijing Posts and Telecommunication Taikang. VRTX was widely used in private branch exchange switches, SDH (Synchronous Digital Hierarchy) transport devices, and next-gen broadband access products. In 2013, while talking with Mr. Luo of Shenzhen Nari on DJY (Dujiangyan) embedded OS, he can still recall his involvement with VRTX. This makes me believe that VRTX truly has a place in the heart of our veteran engineers. VRTX has disappeared as a development platform, but for a period of time it will still live on in some electronic components. VRTX created a great deal of influence on embedded software and other OSes, including VxWorks and Delta OS (led by the University of Electronic Science and Technology of China).

● 11


Embedded Operating System ● History and Future in the Internet of Things

The Motorola Force

Motorola is a highly respected name in the embedded system industry; its microprocessors, microcontrollers and computer systems were all once the golden standards. Many embedded OSes have roots traced back to Motorola’s products. Motorola, a renowned telecommunication company and semiconductor manufacturer, was founded in the US in 1928. Undoubtedly a giant in the field, Motorola has witnessed the entire history of mobile phones. However, there are fewer people who know the semiconductor and computer group within Motorola – MCG. Moto’s semiconductor sector later became Freescale in 2003, which continued to invest in the business of telecommunication, automotive electronic, embedded processor and MCU design. Freescale merged into NXP in 2015. MSG was sold to Emerson in 2007 for $350 million. The core mobile phone business of Motorola was acquired by Google for $12.5 billion in 2012, and changed ownership again to Lenovo in 20147. In this section, we have some interesting embedded OS stories related to Motorola. OS-9: Grow with Motorola

In the 70s, MC6800-8 (1974) and MC68000 (68k, 1979) 16/32-bit CPUs quickly became mainstream as they can be used in both computers and embedded systems. Many embedded OSes came into being thanks to Motorola’s processors, including VRTX, pSOS (by Integrated Systems, later acquired by Wind River), LynxOS and the featured OS in this section, OS-9 (made by Microware). OS-9 is a real-time, process-oriented multi-task/multi-user OS. In many ways, it closely assembles a real-time version of UNIX (similarly, LynxOS and QNX). Developed in a project called BASIC098, the first versions of OS-9 in the early 1980s support MC6809 microprocessor. As the ROM on MC6809 grew to 2MB from 64KB, OS-9 also gained many additional components like a GUI; this allows OS-9 to be used on Motorola pagers and early personal computers (e.g. TRS-80 Color Computer, a.k.a. CoCo).

Figure 2-1 A Motorola Pager 7 Wikipedia contributors. “Motorola.” Wikipedia, The Free Encyclopedia. https://en.wikipedia.org/w/index.php?title=Motorola&oldid=903447636. 8 Wikipedia contributors. “OS-9” Wikipedia, The Free Encyclopedia. https://en.wikipedia.org/w/index.php?title=OS-9&oldid=888125571.

● 12

Figure 2-2 CoCo


Chapter 2 ● History of Embedded Operating System

68k was soon added to the list of supported processors. And a refactor of the OS in the late 80s (moved to C) made broad architecture support possible (x86, PowerPC, 68k, MIPS and ARM). OS-9 kernel has a unique structure. Mostly it is a microkernel but with very high efficiency; yet it is not monolithic. OS-9 utilizes individual modules for the kernel, file system, driver and application, with each having its own header, data/code, and CRC; these modules are highly dynamic and are easy to maintain. OS-9 implements POSIX API and threads. OS-9’s real-time characteristics and compatibility of UNIX applications help it to become successful in industrial computing where VMEbus or CompactPCI bus is present. In 2001, Radisys bought Microware. The efforts of Radisys to provide a full range of solutions (one example is the IPX1200 network processor solution in cooperation with Intel) fell short and caused the development and services of OS-9 to grind to a halt. In 2013, three Microware resellers bought OS-9 and formed Microware LP, which continues to provide support and services for OS-9 customers. Freescale: A Full-Range Solution Provider

Since Freescale became independent from Motorola in 2003, it has been striving to provide a complete selection of solutions. Freescale not only partner with embedded software providers like MontaVista (embedded Linux) and Wind River (VxWorks RTOS), but also invest in its own software R&D for porting and optimizing embedded Linux for PowerPC. In 2004, Freescale published SmartDSP OS suite with CodeWarrior IDE (later acquired by Freescale) for StarCore DSP chips that are commonly used in communication base stations9. Many users have seen MQX RTOS when using a Freescale MCU. Initially released by Precise Software Technologies in 198910, MQX is a microkernel with preemptive scheduling. MQX is highly customizable (it can fit a ROM as small as 6KB) with file system, TCP/IP and USB support in addition to the kernel. MQX runs on various CPU like 68k, ColdFire, PowerPC, ARM etc., and is one of the first to adopt an open-source business model. MQX was bought by ARC (a configurable processor core company) in 2000 and was later acquired by Freescale in 2009. Freescale made MQX open-source and royalty-free, and optimized it for Freescale MCU. With a Freescale MCU development board, users will get MQX RTOS and CodeWarrior IDE for free; this helps to reduce cost and to shorten the development time. The µC/OS Story

µC/OS, a.k.a. MicroC/OS is among the most influential RTOSes. In China, the translated version of the µC/OS books (by Jean Labrosse) sell quite well, which certainly contributed to its reputation. µC/OS is open-source and free for non-commercial users. µC/OS is one of the most popular embedded operating systems in embedded system courses offered in China; a few dozens of books and hundreds of papers have been published around µC/OS in China.

9 Oshana, Robert. DSP for embedded and real-time systems. Oxford Waltham, MA: Newnes, 2012. 10 Wikipedia contributors. “MQX” Wikipedia, The Free Encyclopedia. https://en.wikipedia.org/w/index.php?title=MQX&oldid=889002275.

● 13


Embedded Operating System ● History and Future in the Internet of Things

Celebrating 25 years of μC/OS11

In some ways, it’s hard for me to believe that the µC/OS kernel is 25 years old; perhaps mostly because I don’t want to believe it! The kernel has an interesting history, largely because it didn’t start as a commercial project, and yet 25 years on, I find myself still hard at work on µC/OS products. Now seems like a good time for a look back at the software’s origins, as many of the challenges that existed then are still experienced by developers today. The difference is that now the proven, certifiable real-time operating system (RTOS) µC/OS-II® and µC/OS-III® kernels are commercially available. The μC/OS story started in 1989, when I joined Dynalco Controls in Fort Lauderdale, Florida, and began working on the design of a new microprocessor-based ignition control system for a large industrial reciprocating engine. I was convinced that an RTOS kernel would benefit this project. Initially I wanted to use a kernel I had experience with, but budget requirements drove the selection of a less costly alternative. It quickly became apparent that I was paying for the seemingly cheaper RTOS with my time. I spent the next two months in contact with technical support, trying to determine why even the simplest applications would not run. It turned out I was one of the first customers for the kernel, meaning I ended up as an unintended beta tester. At a dead end, I returned to the more expensive product I was familiar with, and was quickly running simple applications. It wasn’t long until I found myself at another impasse, as the new operating system seemed to contain a bug. Upon reporting it, I was notified that the 90-day warranty had expired, so I had to purchase a maintenance contract. Even with a contract in place, the vendor took six months to remove the bug. All told, I completed my ignition system a year after purchasing the software. While all this was happening, I began to develop my own kernel. At the time, I naively believed that all a kernel really did was to save and restore CPU registers, so writing one should not be especially challenging. Asking myself, “How hard can it be?,” I worked on the kernel at night and on weekends. Although I shouldn’t have been surprised, it proved to be much more difficult than I anticipated. Approximately a year after starting the project, my first RTOS was complete. I picked the name μC/OS, which meant “microcontroller operating system,” using the Greek letter “mu” to mean micro. μC/OS was designed according to the stringent standards that I created and promulgated at Dynalco. The operating system’s source code featured liberal spacing, carefully worded comments and consistent naming. Offering further evidence of the prudent coding techniques, the kernel was also highly portable. Although μC/OS, like its kernel peers, featured a small number of processor-specific functions, these routines were clearly separated from other portions of the operating system. This meant that engineers could easily adapt μC/ OS to new CPU architectures. The coding standards implemented for uC/OS have remained in place to this day. As is often true with new products, I was the only one aware of the virtues of μC/OS. Eager to describe my new software to others, I wrote a paper explaining the inner workings of μC/OS, which was published in Embedded Systems Programming magazine in the May and June 1992 issues. Engineers were grateful that the inner workings of a high-quality kernel were revealed, and they downloaded the μC/OS source code in droves. Soon thereafter, 11 “Celebrating 25 years of μC/OS!”. Originally published on https://www.micrium.com/celebrating-25-years-of-ucos/ by Jean Labrosse. © Silicon Laboratories Inc. 2017. Reprinted with permission.

● 14


Chapter 2 ● History of Embedded Operating System

R&D Publications, publisher of C Users Journal, expressed interest in publishing an entire μC/OS book. In late 1992, the full book, aptly titled “μC/OS: The Real-Time Kernel,” was released, and eventually went on to sell more than 15,000 copies.

Figure 2-3 The Original uC/OS: The Real-Time Kernel Book and Version 1.1 Floppy Disk

For several years, only minor changes were made to μC/OS, since stability is always key for a kernel. However, there were new features that needed to be added, so I decided that a substantial update of the operating system (and the book) was warranted. This updated operating system became μC/OS-II, which offered many features that its predecessor lacked, including stack-checking capabilities, hook functions and a safe means to dynamically allocate memory. In 1998, the new edition was released under the title “MicroC/OS-II: The Real-Time Kernel.”12 A little known fact is that the title changed from “mu” to “micro” because of the publisher’s requirements. At nearly double the length of the first book, the new text was accompanied by the source code, meaning thousands of developers were able to test the kernel and provide valuable feedback. Soon after the book’s release I founded Micrium to commercialize the kernel. On the one hand, the book drove development of a number of university courses around the source code. On the other, an increasing number of engineers were using μC/OS-II commercially, notably because of its reliability. Definitive proof of this came in July 2000, when DO-178B Level A certification was conferred on an avionics product incorporating μC/OS-II. This certification, recognized by the Federal Aviation Administration, is awarded to software deemed safe enough to be used in aircraft. Additional certifications for μC/OS-II followed, including Food and Drug Administration premarket notification (510(k)), premarket ap12 The Chinese version of the book, transalated by Prof. Beibei Shao of Tsinghua Univeristy and published in 2001, was one the first book in China about embedded OS.

● 15


Embedded Operating System ● History and Future in the Internet of Things

proval for medical devices and IEC-61508 for industrial controls. To this day, there are few operating systems that have successfully completed the rigorous testing that certified software must undergo. In 2008, 10 years after the introduction of μC/OS-II, a third iteration of the μC/OS family was added: μC/OS-III. Once again, the RTOS was accompanied by a new book, designed to be even more useful by including the kernel description, examples targeting specific MCUs and manufacturers, as well as leveraging a low-cost evaluation board to accompany the examples as well as a toolchain (compiler, assembler, linker) that could be obtained for free. This meant that, not only could readers learn about the inner workings of an RTOS, they could also try one on real hardware. Based on feedback from μC/OS-II users, the μC/ OS-III RTOS contained significant improvements and features. For example, it supports multiple tasks at the same priority, true-priority inheritance mutexes, the ability to directly signal a task, send messages to a task and much more. In May 2015, Validated Software announced the availability of certification artifacts for μC/OS-III, demonstrating that it too can be used in safety-critical applications. In October 2016, Silicon Labs acquired Micrium13, starting another new chapter in the Micrium story. Together, we remain committed to supporting all μC/OS-II and μC/OS-III customers, irrespective of the MCU or CPU manufacturer they use. Twenty-five years ago, I couldn’t have imagined where my “spare time” project would lead, but I wouldn’t trade it for anything. I’m honored to have written a kernel that has contributed to educating so many engineers within the industry, and I look forward to continuing to educate the industry on coding best practices and the benefits of using RTOS kernels. Author’s Remarks

In February 2016, I was able to meet Jean and Christian face-to-face in the Nuremberg Embedded World conference. I learned the μC/OS for Maker program that permits free usage of μC/OS-III kernel, TCP/IP, USB Device, File System and Modbus for hobbyists, education institutions and startups14. A few Chinese companies have signed up for the program.

13 “Silicon Labs Acquires Leading RTOS Company Micrium” Micrium. https://www.micrium.com/silicon-labs-acquires-leading-rtos-company-micrium/. 2016. 14 For up-to-date information please visit https://www.micrium.com/makers/about/.

● 16


Chapter 2 ● History of Embedded Operating System

Figure 2-4 The Author, Jean and Christian at Micrium’s Booth (2016)

During the 2019 Nuremberg Embedded World conference, I met Jean again at Silicon Labs’ exhibition, where he demonstrated RTOS debugging/design and explained ARM Cortex-M’s MPU internals. Jean is keen in RTOS education; he has organized several RTOS training sessions worldwide. IN March, Jean continued to lecture in institutions in Italy. Jean’s efforts have inspired me to arrange RTOS courses in China and take part in teaching. I also led in the efforts to translate the µC/OS-III publications to Chinese and personally participated in the translation of two volumes; these books became training materials.

Figure 2-5 Jean Teaching a μC/OS-III Class

● 17


Embedded Operating System ● History and Future in the Internet of Things

Figure 2-6 The Author Teaching a Class Wind River - The Evergreen of Embedded Operating System

In the past 3 decades, Wind River’s VxWorks has maintained its leading position in the field of embedded operating system. With a wide presence in a handful of markets, including aviation & aerospace, communication, and industrial control, VxWorks is highly regarded as the evergreens in the embedded system industry. Wind River Systems is an embedded software development, service and solution company. Wind River was founded by Jerry Fiddle and David Wilner in California in 198115. VxWorks is Wind River’s RTOS product. History of VxWorks

At first, VxWorks was not a brand new product; it was the VRTX kernel with added functionalities. VRTX lacks file system support and an IDE, and VxWorks made VRTX a more complete offering. David Wilner once mentioned that VxWorks has another meaning “VRTX Works”. Wind River was an authorized reseller of VRTX, however, they feared that the contract could be ended. As such, Wind River started to develop its own kernel in 198716. The main author, John Fogelin, was then a 17 years old University of California Berkley student. Trusting Moore’s rule, Wilner believed that C would not be much worse than assembly after an acceptable period of time, and therefore directed to write the kernel C; this decision was proven to be right. The kernel came with very good portability, a standard C library, and compatible APIs; it made its way into the new VxWorks, released in 1989. Wind River’s Product Lineup

Wind River offers two embedded OS platforms, VxWorks and Linux; Eclipse-based Workbench development platform, debugging/management tools, engineering services and a 15 https://www.windriver.com/company/ 16 Wikipedia contributors. “VxWorks” Wikipedia, The Free Encyclopedia. https://en.wikipedia.org/w/index.php?title=VxWorks&oldid=895318479.

● 18


Chapter 2 ● History of Embedded Operating System

range of other products. It used to sell standalone on-chip debugging tools (JTAG emulator), which was discontinued in 2015. VxWorks supports multi-core 32/64-bit embedded processors and offers various functionalities like memory management (VxWorks 5.0 and 6.0), connectivity (USB, IPv4/v6), file system, networking management and multimedia support. VxWorks also provide products that are specific to industrial, networking, healthcare, consumer electronics and other industries. Among them, the Wind River networking device platform is one of the most popular products. In 1995, VxWorks 5.0 was released with the Tornado development environment. For many, Tornado is what VxWorks looks like, as it is where engineers complete their development works (similar to Keil of IAR EW for MCU). Most likely, Ethernet is used to connect the host and the target (PowerPC, MIPS, ARM, x86 etc.), which is similar to embedded Linux. Tornado was once one of the most powerful IDEs at the time. Since VxWorks 6.0, Workbench gradually replaced Tornado as the universal IDE for Wind River Linux, VxWorks, and on-chip debugging.

Figure 2-7 Wind River’s Networking Device Platform (source: Wind River) Applications of VxWorks

VxWorks is renowned for its high dependency and excellent real-time characteristics. Widely adopted in communication, military, aviation/aerospace, and industrial control, VxWorks can be found in military jets (F-16, F/A-18, B-2), weapons (Patriot anti-missile system), and robotic spacecraft/space rover like Phoenix (landed on Mars in May 2008) and Curiosity17 (landed on Mars in August 2012). 17 https://www.windriver.com/announces/curiosity/

● 19


Embedded Operating System ● History and Future in the Internet of Things

Figure 2-8 Guides for VxWorks and Tornado

Figure 2-9 The “Curiosity” Space Rover (source: Wind River)

Mergers and Acquisitions

Wind River is an embedded software company with a long history, a complete product portfolio, and ample resources. The company went public in 1993 and has a revenue of $328.6 million in 2008 (a 15% increase compared to 2007). In addition to its technology, products, and services, several key mergers also helped Wind River to stand out in the industry. During the period from 2000 to 2008, there have been 10 acquisitions, most of them added new offerings to Wind River’s portfolio. In March 2000, Wind River bought Embedded Support Tools (EST), a Massachusetts-based embedded development tools company famous for Vision Probe/ICE JTAG emulators and PowerPC development boards. This helps Wind River to expand its on-chip debugger offering. October 2008, Wind River acquired MIZI Research18; founded in 1999, MIZI is a Korean embedded Linux company with extensive experience in smartphones, automotive telematics and video conferencing. On the other hand, the purchase of Integrated Systems (ISI) in 2000 was more of a marketing move. As a reputable embedded OS company, ISI’s pSOS had been a long-term rival of VxWorks. The media did suspect the true motive of the acquisition and questioned the fate of pSOS. In fact, 5 months after the deal went through, Wind River CEO Jerry Fiddler acknowledged the intention to phase out the well-known pSOS in Chicago Embedded Systems Conference: “At the end of the day, you’ve got to have one platform, otherwise you’re not running the company properly.”19 Conclusions

Intel acquired Wind River in 2009, pushing it once again to the headline. Wind River made the statement: “As an Intel subsidiary, Wind River will continue to develop innovative, commercial-grade software platforms that support multiple hardware architectures that are 18 “Wind River to Acquire MIZI Research” WindRiver. https://www.windriver.com/news/press/pr.html?ID=6241. 2008. 19 “pSOS falls as Wind River consolidates OSes” WindRiver. https://www.eetimes.com/document.asp?doc_id=1141412. 2000.

● 20


Chapter 2 ● History of Embedded Operating System

optimized for the needs of its many embedded and mobile customers.”20 The industry was once worried that Wind River’s products that target non-Intel chips (ARM, MIPS, PowerPC etc.) would be marginalized. However, the years after the acquisition did prove the concern wrong. Wind River brought new resources to Intel, especially an experienced embedded OS R&D and service team, but we are yet to see other benefits. One thing obvious is that Wind River has continued to grow steadily in the area of embedded OS. Wind River usually have good judgments on the market’s movements. Even though it entered the embedded Linux market a bit later than the competitors, it managed to find a way to become one of the top contenders. With IoT OS, Wind River also showed up at the party fashionably late. October 2015, Wind River released Rocket, an IoT OS. Similar to ARM mbed, Rocket is a free OS with MCU support. Bundled with Helix App Cloud, Rocket offers a complete solution. We can expect Wind River, the evergreens in the embedded OS industry, to continue its success into the IoT era. Author’s Remarks

In June 2016, TPG Capital Completes acquitted IoT software provider Wind River from Intel. TPG has a history of partnering with dynamic companies that are changing and enhancing different markets through innovative technology. “Wind River is leveraging the power of IoT, intelligent devices, and edge computing to fundamentally transform critical infrastructure sectors,” said Raj, partner and head of technology investment of TPG, “This acquisition provides the company with the additional resources and focus needed to further differentiate itself as a market-leading provider of software for Industrial IoT.”21 The Smaller Rivals

While there are certainly big names in the field, like Microsoft and Wind River, many more competitors of embedded OS are smaller players. They bring a lot of competitions and energies to the play. The Earliest RTOS Company

Famously, most of embedded RTOS companies were founded in the Silicon Valley, noticeably Wind River (VxWorks), ISI (pSOS) and Ready Systems (VRTX). In May 2015, I met with Bernard Mushinsky, one of the early pioneers of embedded system; I learned that the earliest RTOS company in the US was not in Silicon Valley. Bernard founded Industrial Programming Inc. in 1969 in New York. In 1976, IPI released the world’s first RTOSes made by an independent software company: MTOS-68, and MTOS80. According to Bernard, they can still be found running in certain devices today. The second generation MTOS-68k and MTOS-86 were released in 1979 and 1981 respectively. In the late 1980s, MTOS started to support 32-bit Intel processors including 386/860. MTOS covered a wide range of application, from computer peripherals, communication to industrial control. With more than 1000 customers, MTOS accomplished quite a feast in its time.

20 “Intel to Acquire Wind River Systems for Approximately $884 Million” WindRiver. https://www.windriver.com/news/press/pr.html?ID=6921. 2009. 21 “TPG Capital Completes Acquisition IoT Software Provider Wind River” http://www.wrs.com/news/press/pr.html?ID=21412. 2016.

● 21


Embedded Operating System ● History and Future in the Internet of Things

Figure 2-10 Author and Bernard Mushinsky in New York, Year 2015

MTOS offers a number of unique features. The first generation MTOS products implement symmetrical multi-CPU (up to 16) multi-tasking, shared memory pool, I/O driver, inbox events and asynchronous interrupt. In a symmetrical processor architecture, a CPU core is not assigned a role as master or slave. Tasks running on MTOS do not have knowledge of which core it is running on; this creates an impression of a virtual core. Three decades ago, semiconductor technology was much less sophisticated. There was no multi-core CPU and multi-core was realized by equipping many CPUs on a board or combining single core systems by a bus (Motorola’s VME bus computer system was a great example). On peripherals, MTOS is compatible with I/O devices on different boards. Tasks on MTOS can be defined as local (executing on one CPU) or global (running on all CPUs); applications can be divided in a similar way using the Invariant Execution technology. The multi-processor technologies employed by MTOS shares similarities with Linux’s symmetric multiprocessing (SMP), an indicator that MTOS was quite ahead of its time. It was my first time meeting Bernard in 2015. But after we shared our experiences, especially our partnerships with Jim Ready, we broke the ice between us. Bernard said that he has great respects of VRTX and Jim’s work in it, and mentioned that he met with Jim in the embedded system conference in 2014. Bernard was also glad when he heard I wanted to learn more about MTOS. He recommended the book An Implementation Guide to Real-Time Programming (Yourdon Press computing series) to me. Bernard was still working for HCC Embedded when we met and was living in New York. The Budapest-based company HCC, founded by Dave Hughes in 2000, is known for being the first to implement an embedded DICOM protocol stack for portable medical devices. HCC also develops fail-safe file system software and USB protocol stack. Bernard and I would really want to meet in an authentic Chinese restaurant next time when I come to New York; but that never happened. A couple of months later, in August, I heard the saddening news in Beijing that Bernard has passed away. It is truly a tragedy as we have lost a good pioneer.

● 22


Chapter 2 ● History of Embedded Operating System

SMX - A Pioneer of Embedded OS

Micro Digital was founded in 197522, its product Simple Multitasking Executive (SMX) is an embedded RTOS. The company started by developing applications and providing services in the embedded system industry. The first version of SMX was released in 1989. SMX has been constantly improving over the years and it is now a complete solution with kernel, file system, networking, GUI, USB, and WiFi support. Micro Digital’s founder Ralph Moore is an early pioneer in the field. He worked in mainframe design and research in the early years of his career and late became a self-taught microprocessor programmer. After developed SMX, Ralph had been managing the company’s R&D and marketing. Ralph also devoted a lot of efforts to the new multi-tasking kernel SMXv4, which was released in January 2014. I visited Micro Digital back in 2000. Located in Costa Mesa in California, the company is within the Orange County and is close to the University of California Irvine. I met Ralph, his son David and the company’s administrative assistant Betty. It marked the start of our partnership. One company in Kunming, China bought SMX RTOS for their production line automation control system. But other than this sale, SMX never landed another significant contract in China. The GUI product PEG, however, manages to gain more customers. PEG can run independently or on an RTOS other than SMX. We ported PEG on VRTX and PPC823, and added a Chinese character set; these made marketing and sales of the product easier. With decades of history and many hundreds of successful applications, SMX continues to improve one performance, ROM usage, security and reliability in its 4.2 release. SMX never become a famous RTOS. SMX cannot compete with QNX and Windows CE on completeness, or μC/OS on versatility and footprint; but it seats neatly between these solutions to fill a unique position. Most importantly, the SMX team has been extremely persistent in their endeavors to make SMX a successful product. Micro Digital is believed to be the embedded software company with the longest history; Ralph founded the company in 1975 and SMX kernel was released in 1978. It is also one of the few independent embedded software companies. ThreadX - The Rigorous Hard-Worker

ThreadX was founded by Edward L. Lamie, a former professor of California State University, Stanislaus. Edward authored several academic publications, such as Real-Time Embedded Multithreading: Using ThreadX and ARM (which has been translated into several languages), Pascal Programming and PL/1 Programming: A Structured, Disciplined Approach. Lamie was one of the founders of Nucleus RTOS (Accelerated Technology). When Mentor Graphics bought Nucleus RTOS at version 1.3, Lamie founded Express Logic and developed ThreadX (initial version 3.0, now at 5.x). ThreadX shares similarities with Nucleus in architecture and mechanisms, but with quite some differences. ThreadX is reportedly deployed on more than 6 billion devices23, compared to 1.5 billion in 2007; many of them are consumer electronic devices (HP printers, mobile phone chips etc.), but the percentage of IoT device has been on the rise in recent years. ThreadX has a one-time licensing scheme which provides source code access. From the 22 http://www.smxrtos.com/about.html 23 Murdock, Roy; Hoffenberg, Steve; and Rommel, Chris. “The Global Market for IoT & Embedded Operating Systems: Automotive Industry Drives Revenue, ECUs Drive Developer Mindshare” VDC Research. 2017.

● 23


Embedded Operating System ● History and Future in the Internet of Things

technical perspective, ThreadX is not groundbreaking; it offers middleware (like FILEX, GUIX, NETX, USBX etc.) and two development tools (TraceX and StackX) in addition to the kernel. For any additional tools that are more sophisticated, one has to find them somewhere else, like IAR and ARM Keil. Express Logic is a low-key company with 38 employees; it was founded in 1996 and is based in San Diego, California. You can find the count of total devices deployed with ThreadX on their website and almost all of their marketing materials; this practice probably has a root in Dr. Lamie’s rigorous academic style. Express Logic headquarters in San Diego, California, where Qualcomm and many companies’ (incl. Texas Instruments, Samsung, Intel, Motorola and Panasonic) communication R&D department are located. Consequently, ThreadX is commonly present in communication applications. When I attended CES 2014, I found Qualcomm’s smartwatch Toq that has ThreadX installed, as shown in Figure 2-11.

Figure 2-11 Qualcomm’s Toq Smartwatch

On April 18th, 2019, Microsoft announced the acquisition of Express Logic24. Sam George, Director of Azure IoT, indicated that the goal is to make ThreadX a new real-time processing option on Azure Sphere devices. Azure Sphere consists of three components: customized microcontroller chip, the Azure Sphere Security service that connects and secures IoT devices, and Azure Sphere OS (usually a version of customized Linux). A combination of ThreadX RTOS and Azure Sphere OS can help achieve higher real-time performance on smaller microcontrollers. When an IoT solution requires edge computing capacities, devices that support ThreadX can be connected to Azure IoT Edge. The acquisition is part of Microsoft’s 5-billion-dollar plan to invest in IoT, which was announced in April 2018. Microsoft’s Azure IoT platform includes Azure Sphere, Azure Digital Twins, Azure IoT Edge, Azure Maps, and Azure IoT Central. 24 https://blogs.microsoft.com/blog/2019/04/18/microsoft-acquires-express-logic-accelerating-iot-development-forbillions-of-devices-at-scale/

● 24


Index

Index 68k 11,12,217 .NET Micro Framework 42,45

A Accelerated Technology 23 Amazon FreeRTOS 116,197 Android 127,133 Android Things 184,193 Android Wear 136,171 Apple Watch OS 172 ARM 49 ARM cortex 17,50,168 ARM mbed OS 54,172,178 Azure Sphere OS 24 AUTOSAR 149

B BDI2000 39,148 BKL (Big Kernel Lock) 98 Bluetooth 5.0 209 Board Support Package 8,44 BrilloOS 58 BTRON 68

C ColdFire CGL (Carrier Grade Linux) 38 CMSIS 52 CoAP (Constrained Application Protocol) 125 Contiki 186,193 C-Sky 206

D Deep Learning 207,218 DPM (Dynamic Power Management) 103 DSP (Digital Signal Processing) 7,61 Dual-Kernel Architecture 97

E eCos 26 Edge Computing 193,204,208 embedded AI 208 Embedded Computer System 7 Embedded Linux 96,101,140

Embedded Operating System 7 Embedded System 7 Embedded System Safety 110 embedded system security 69,110,210 Eclipse foundation 39 Enea 61 ESBF (Embedded System Beijing Forum) 12,69

F Freescale 12,13,207 FreeRTOS 64,159,182

G GENIVI 149

H Hard Hat Linux 25,142,222 HCC Embedded 22 HTTP (Hypertext Transfer Protocol) 124 Hunter & Ready 10

I Intellectual Property 146,153 Internet of Things Operating System 168,173,179 IoT Cloud Platform 117, 177, 209 IoT OS 179,186,187 IoT Oses 193 IoT Protocols 124 IoT Security 116,176 ISA (Instruction Set Architecture) 145,211 ISR (Interrupt Service Routine) 84,140

J Jim Ready

10,221

K Kernel Time Delay 96 KURT-Linux 101

L Linaro 52 Linux 25 Linux-SRT 102

â—? 225


Embedded Operating System ● History and Future in the Internet of Things

LiteOS (Huawei)

190

M MCU (Microcontroller Unit) 205 MiCO OS 179,193 Micrium 13,174 Micrium Spectrum 176,182 Microkernel 8 MID (Mobile Internet Device) 132 MISRA 112 Moblin 29 Monolithic Kernel 8 MontaVista 36,142,222 motorola 13,39,129 MontaVista Linux 142 MPU (Micro Processor Unit) 51 MQTT (MQ Telemetry Transport) 125 MQX 13 MTOS 21 MxChip 179,193

N NB-IoT 210 Nucleus RTOS 23 NGN (Next-Generation Network) 141

O OceanConnect 209 Open Embedded Software Foundation (OESF) 28 OpenRTOS 62,160 OS-9 12 OSE 61 OSEK 149 OTA (Over-the-air) 9,115

P PowerPC 13,19,96,144 Percepio 160 Preemption 96 pSOS 21,184

Q Qualcomm 24,127 QNX 149

● 226

R Ready System 10 Real-Time Preempt Kernel 87 RedHat 26 RIOT 173 RISC-V 212 “RTEMS Real-Time Executive for Multiprocessor Systems” 27 RTHAL (Real-Time Hardware Abstraction Layer) 97 RT-Linux 102 RTOS (Real-Time Operating System) 7 RT-Thread 87,200

S SafeG 76 SafeRTOS 62 Secure Boot 115 Secure Communication 115 secure OTA update 116 SMX 23 SylixOS 92 Symbian 128

T TECS (TOPPERS Embedded Component System) 79 T-Engine 71 ThreadX 23 TI OMAP 44,108,168 TINET 75 Timesys 33 TinyOS 179,186 Tizen 133 TLS (Transport Layer Security) 176,204 Tornado 5 TOPPERS 68 TSC (Time Stamp Counter) 101 TTSP (TOPPERS Test Suite Package) 79

V VRTX 10 VxWorks 18


Index

W Wearable Devices 163 Wearable Operating Systems 166 WebSocket 125 WHIS (WITTENSTEIN High Integrity Systems) 64,161 WinCE 42 Wind River 18 Windows 10 IoT Core 42,180,186 Windows Embedded XP 42 WSN (Wireless Sensor Network) 174

X XMPP (Extensive Messaging and Presence Protocol)

125

Z Zephyr 53,184

μ μC/OS (microC/OS) 13 μC/OS-II 15 μC/OS-III 14 μITRON 68

● 227



History and Future in the Internet of Things Allan He

Allan holds a Master’s degree in Computer Science and has more than 30 years of experience in the embedded system. He is a founder of an embedded software company. He served as deputy director of the editorial board of Microcontroller and Embedded System journal. He is the author of five Chinese books and has published 80+ papers. He frequently speaks in conferences and teaches embedded Operating System and IoT course at universities and corporations.

Lingyuan He

Lingyuan lives in the San Francisco bay area in California, USA. He holds a Master’s degree in Computer Science, and currently works as a senior member of technical staff in a major cloud computing and virtualization company.

This book thoroughly reviews the history of the development of embedded Operating Systems, covers the technical characteristics, historic facts, as well as background business stories of mainstream embedded Operating Systems, and analyzes the technical evolution, market development, and new opportunities of embedded Operating Systems in the age of the Internet of Things. From the perspective of time, the book examines the evolution of critical technical aspects, including real-time and Power Management of embedded Operating Systems and Linux, Internet of Things security, communication, and cloud computing. The book looks into applications of embedded Operating Systems with important markets of mobile phones, communication equipment, automobile, and wearable devices, and also discusses business model and the issue of intellectual property of embedded Operating Systems. In addition, the book walks through the status quo, technical features, product evaluation and background of the Internet of Things Operating Systems in the second half of the book.

Embedded Operating System • Allan He & Lingyuan He

Embedded Operating System

Embedded Operating System History and Future in the Internet of Things

ISBN 978-1-907920-86-8

Elektor International Media BV www.elektor.com

lektor

lektor

Allan He & Lingyuan He


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.