08 May 2012

Extensions to FreeRTOS bring productivity gains to embedded design engineers

Operating systems can be a major source of stress for embedded design engineers. Factors such as size, cost and support all contribute to make the development process more complex. The process can become even more fraught when engineers look to develop products with real time operating systems. An off the shelf operating system can play an important role in keeping costs and development time as low as possible.

So it will not come as a surprise to find that a free rtos with a minimal footprint has proved very popular in the nine years since its launch. FreeRTOS is a scalable real time kernel designed specifically for use in small embedded systems. According to Richard Barry, chief technical officer of Real Time Engineers and FreeRTOS' creator, it's doing well. "It's hard to put absolute numbers against progress, but an important indicator is the number of unique visitors to the website. Compared to the same time last year, the number of visitors is up by a third – and last year was a good year."

One of the reasons why Barry believes FreeRTOS is doing so well is that it's 'of its time'. "There has been a huge growth in the number of suitable microcontrollers for it to run on as people move from 8 and 16bit applications into the low end of the 32bit sector. The types of application they are writing, their communication needs and the number of peripherals means a kernel is more applicable. It's a compelling argument."

FreeRTOS is made available under a modified GNU General Public License; a move which overcomes some understandable reluctance to follow the open source route. Essentially, the exception allows applications built on FreeRTOS to remain proprietary; only modifications to the kernel itself have to be shared.

More than 77,000 downloads of the OS are made a year and support is available for a range of architectures and tool chains; at the last count, 31 architectures and 18 tool chains. "It's a win-win," he claimed. "You can download the operating system and use it free of charge, but there is commercial support available if you want it."

Since the launch of FreeRTOS, the operating system has been made available in two other versions: OpenRTOS is a commercially licensed and supported version of the OS that brings what Barry calls 'professional grade' elements; and SafeRTOS, a SIL3 version certified by TUV for use in safety critical applications.

Barry has recently expanded FreeRTOS' capabilities with the launch of the FreeRTOS+ ecosystem. "It's not a new version of FreeRTOS," he emphasised. "A large ecosystem has developed around FreeRTOS and I wanted to bring it together to show users and potential users that it exists; it's beneficial to show that FreeRTOS is more than a kernel."

Six areas in the portfolio
The FreeRTOS+ portfolio comprises six areas: IO; command line interface (CLI); safety and certification; trace; Nabto; and TCP/IP.
FreeRTOS+ IO provides an interface to peripheral driver libraries similar to that found in Linux and Posix based systems. "Most vendors provide their own driver library," Barry admitted, "but there is no standard interface. And there is a lot of naivety about how to write something which is stable for use in a multitasking environment."

FreeRTOS+IO (see fig 1) abstracts away the peripheral interface details, including the implementation of any interrupt service routines that may be required. Various different data transfer modes are catered for, using different techniques to both read and write data, making FreeRTOS+IO applicable to a range of applications. According to Barry: "Interrupt service routines are abstracted and users are left with four core functions, rather than having to define one for each peripheral in their system."

FreeRTOS+IO supports four read modes: polled, interrupt driven circular buffer, interrupt drive zero copy and interrupt driven character queue transfer modes, with the polled and interrupt driven character queue modes supporting read and write modes.

"The polled mode will prevent other tasks from running," said Barry, "while the interrupt driven mode will allow developers to say 'write so many bytes to the spi port, then carry on'. They don't have to wait for that data to be clocked out."

The FreeRTOS+IO module was developed on an NXP platform and the company has since decided to license it. "It uses an NXP driver library when it can," Barry continued.

The CLI module has been written by Barry himself. "It features 10 Posix like interfaces which can be used to write a uniform interface to peripherals. It's a way of getting characters into and out of the system and the only command you get by default is the help function, which runs through the available options."

The Nabto module (see fig 2) has been developed by the Danish company of the same name. "It's interesting," said Barry, "and I'm very enthusiastic about it. It provides a platform for innovative networking solutions and will be of big benefit to those working at the low end of the 32bit market."

Nabto uses a peer to peer communication approach similar to that of Skype. "If you have a piece of equipment in a factory, but it's behind a firewall, Nabto uses UDP hole punching to provide access. The value is that the embedded device only needs to have UDP installed." According to Nabto, an embedded web server can be implemented in only 1k of memory.

Through the use of a web browser plug in, Nabto seamlessly offloads address resolution, TCP/IP processing, static content storage, security and encryption and data throughput processing requirements from the embedded device. A separate non embedded cloud server provides all the static content, leaving the embedded device with nothing left to do except use the lightweight UDP protocol to supply dynamic data values when requested.

"If you want a feature rich web server," Barry said, "you can have all the Java and jpgs on a standard server on the internet. When you access the embedded device, it looks like it's serving, but the only thing coming out of the device is data; you've removed the need for everything else."

Also available in the FreeRTOS+ ecosystem is a run time diagnostic tool developed by Percepio. FreeRTOS+ Trace captures dynamic behaviour, which can then be displayed offline in a range of graphically interconnected views.

"It offers a primary trace view of which tasks are running and which calls are being made," he said, "but it also has some nice features, like looking at a queue history," said Barry. "You can see how many items are in a queue at any time. If the queue gets too full, you can open a trace view and analyse what happened; for example, did a task take too long to execute."

One potential use is to create a circular buffer in a product – even one deployed in the field. When or if something goes wrong, the user can see a trace of activity within the embedded system.

Concluding, Barry said: "We're bringing together a select group of FreeRTOS extensions that offer significant productivity gains while extending the kernel's capabilities through simple interfaces."

Graham Pitcher

Supporting Information



This material is protected by Findlay Media copyright
See Terms and Conditions.
One-off usage is permitted but bulk copying is not.
For multiple copies contact the sales team.

Do you have any comments about this article?

Add your comments


Your comments/feedback may be edited prior to publishing. Not all entries will be published.
Please view our Terms and Conditions before leaving a comment.

Related Articles

Green light for FinFET flow

EDA software vendor Synopsys has announced that its Galaxy design flow has been ...

Four IDEs for Kinetis support

Freescale has named four tools as featured integrated development environments ...

ARM Compilers based on LLVM

ARM's future compilers will be built on the LLVM open source framework, the ...

Software tools: Cost vs. value

Depending upon who you talk to and the scale of the design, software ...

ECAD and MCAD crossover

At an industry event late in 2013, the speaker asked all mechanical engineers ...

Safe start to software test

Embedded software testing is a discipline that is both easier and more ...

KeyStone software

This whitepaper explores how Texas Instruments' KeyStone multicore SoCs offload ...

Using Linux in medical devices

This whitepaper explores the issues that software developers and medical device ...

High speed board design

Istvan Nagy, electronics design engineer at Blue Chip Technology, a leading UK ...

Embedded software solution

Digia announced a major upgrade to its Qt Enterprise Embedded solution at ...

C-RUN analysis tool

IAR Systems used Embedded World to launch C-RUN - its fully integrated runtime ...

OpenCL development kit

Altera has announced a new software development kit for OpenCL, a move which ...

Device Developers' Conference

20th May 2014, Holiday Inn, Bristol

Device Developers' Conference

22nd May 2014, Menzies Hotel, Cambridge

Device Developers' Conference

3rd June 2014, Cheadle House, Manchester

LightCrafter software upgrade

This video explains the steps needed to perform an upgrade of the LightCrafter ...

Altium design secret 19

Output Job Files enable repeatable, pre-configured generation of fabrication, ...

WEBENCH Filter Designer

Bonnie demonstrates how to design, optimise and simulate active filter ...

The Heartbleed glitch

Last week we were awakened to the news of a new software 'glitch' called ...

Embedded engineering needs

Software is a fundamental part of developing today's electronic devices. It's ...

The eco cloudy system thing...

One of the bothersome aspects of coming to grips with new, popular shifts in ...

Andreas Pabinger, Wind River

Three years ago, Wind River Systems – developer of the VxWorks real time ...

Cyrille Comar, AdaCore Europe

Cyrille Comar, co founder and managing director of AdaCore Europe, speaks to ...

Martin Harris, Altium

Chris Shaw asks Martin Harris about the latest developments at Altium