EMBEDDED DESIGN OPERATING SYSTEMS

lthough the concept of the IoT was Ioated around the turn of the Millennium, it is A only recently that the approach has gathered significant momentum. But, because it is a blanket term, IoT is not only being applied to large and small applications alike, it is also being applied in a wide range of end markets. With such a spread, it will come as no surprise to discover that one size does not fit all when it comes to operating systems. At the high end of the market, companies like Intel are vying to provide a complete solution. Alongside its processor technology, Intel can integrate Wind River’s VxWorks and McAfee security to create a system capable of handling high levels of complexity. But those developing wearable devices, for example, may not want to take advantage of such a system; they may well be looking for an OS that runs in a very small footprint but, nonetheless, offers a range of Operating in a new necessary features while consuming minimal amounts of power. ARM has had its eyes on the sector for some time and, last year, rolled out environment a significant extension to its mbed programme. Previously, mbed was an embedded development community The Internet of Things is posing challenges to OS developers. with ambitions similar to those of and Raspberry Pi. But mbed How are they responding? By Graham Pitcher. now has a much bigger vision – the IoT. As part of this approach, it is creating mbed OS (see fig 1). ARM environment with a focus on problems. The OS comes with a range of says this is a full stack OS designed “Part of this effort is on security features – including the specifically for use with MCUs based components which solve bigger Datagram on its Cortex-M core. It says the OS will problems; solutions that cut across (DTLS) and Transport Layer Security be optimised for energy efficiency, market segments and which have a (TLS) – plus cryptographic capabilities. connectivity and security and will lot of commonality.” ARM says this brings ‘banking class, feature reusable software components. Flautner says mbed OS is ‘efHcient’, end to end security’. But mbed OS is still in the with provisioning management. “It’s In terms of connectivity, the OS development process. According to the about the ease of use of software supports LE, Wi-Fi, 6LoWPAN mbed website, the OS is currently at components, as well as their ease of and . Also supported are 2G and release alpha 2 and about a year away reuse. It’s an event based system that 3G cellular comms, plus ZigBee and from a stable version that will be wakes up when needed. It has built in Ethernet. “Connectivity has been done generally available. security and support for important in a serious way,” Flautner asserted. Krisztian Flautner is general connectivity standards.” “It’s about the internet protocols manager of ARM’s IoT business unit. He admits it took some time to get designed to support these devices.” He explained the thinking behind the the components together, even in However, the OS is currently being mbed approach. “Everybody is talking advance of mbedOS’ launch in October targeted at MCUs based on ARM’s about the IoT, but it’s difHcult to do 2014. “The starting point was to see Cortex-M cores. Flautner explained the well. We want to accelerate how difHcult it was to do things right. thinking: “We see an OS for Cortex-M deployment and provide a productive Because of this, it has taken time.” based MCUs as being the greatest

www.newelectronics.co.uk 12 May 2015 25 EMBEDDED DESIGN OPERATING SYSTEMS

Fig 1: The mbed OS corporate angle, others are developing solutions using a community based approach. Included amongst these are Applications Community libraries Riot and TinyOS. Riot, which has its roots in an OS ++ APIs developed in 2008 for use with wireless sensor networks, describes Event framework Communication management itself as ‘the friendly OS for the IoT’ – its website (riot-os.org) says it is Tasks CoaP, HTTP, MQTT, LWM2M developer friendly, resource friendly and IoT friendly. A TLS, DTLS architecture provides robustness, real Device management: bootstrap, security, frmware time capabilities and energy efHciency. over the air IPv4, IPv6 6LoWPAN The OS (see Hg 2) is said by its developers to have a low memory Crypto and device security footprint and to allow programmers to develop applications on typical IoT CMSIS Drivers devices, so long as they have some POSIX and experience. Once Cortex-M based MCU Sensors Radio written, the code can run on a range of MCUs. Amongst features claimed for the OS are support for C and C++, need because, if you build a system According to the company, whilst “ThreadX RTOS multithreading, the ability to run around an M class MCU, you usually mbed OS includes a basic non complements without the need for a memory don’t need DRAM.” preemptive scheduler with limited the mbed management unit and modularity. The conHgurable OS will be made synchronisation and communication OS platform by Real time capabilities are claimed available free of charge and should primitives, ThreadX provides a route because the OS has a latency of less adding RTOS appear early in 2016. When it does, for developers who need fully than 50 clock cycles, as well as multitasking it’s likely to require a footprint of less preemptive scheduling priority based scheduling. than 128kbyte. “If you don’t need a “ThreadX RTOS complements the and services The OS has been developed as particular feature,” said Flautner, “you mbed OS platform by adding full RTOS for real time open source software and is can take it out. The OS is built around multitasking and services for real applications.” distributed under the terms of the GNU event driven low power operation with time applications,” said Bill Lamie, the Bill Lamie Lesser General Public License. security.” company’s president. “IoT devices, by TinyOS, meanwhile, is another open Express Logic is taking an interest their very nature, have complex source operating system designed for in the mbed OS. It claims its ThreadX networking requirements [and] low power wireless devices. Said to be RTOS and the NetX Duo IPv6 network ThreadX is already used by developers suited to applications such as sensor stack will complement mbed OS, of ARM based IoT systems. We are networks, personal area networks, bringing what it says will be ‘full RTOS excited to extend these already proven smart buildings and smart meters, capabilities and advanced networking IoT solutions to the mbed OS TinyOS provides software abstractions to applications seeking robust RTOS development community.” of the underlying device hardware. functionality’. Importantly, it also claims While ARM and Express Logic come TinyOS supports a number of MCU the OS will ‘future proof’ designs. at the IoT OS challenge from a families and radio chips and there is said to be a signiHcant body of robust Fig 2: The Riot operating system and efHcient code. However, at the Embedded IP stack Traditional IP stack Content centric stack moment, the OS does not support Cortex-M3 based MCUs, although work Wiselib Applications COAP Application layer http Application is said to be underway to remedy this. UDP Transport layer TCP UDP But the OS is said to be useful for MCUs with very small memories. System Network RPL OLSR or OSPF libraries stack CCN Lite Flautner concluded: “We have been IPv6 ICMP Network layer IPv6 ICMP thinking about the IoT, researching the Kernel 6LoWPAN technology and making acquisitions. Everyone has been talking about the Hardware abstraction IEEE802.15.4 MAC Link layer IEEE802.3 or IEEE802.11 IEEE802.3, IoT, but it has proved difHcult to do IEEE802.15.4 Hardware platform Radio transmission Physical layer well. We want to accelerate Fully supported Partially supported deployment of the IoT by providing a productive environment.”

26 12 May 2015 www.newelectronics.co.uk