Version 7.0 of the open-source real-time operating system FreeRTOS has been released, adding a software timer, a port to the MSP430X microcontroller, and two additional ‘demos’, writes Technology Editor Steve Bush.
The timer is the first time FreeRTOS has used a ‘daemon task’ – a task which is providing services to applications – as until now every thing has been built into the kernel.
“The major difference in 7.0 is the introduction of a new software timer implementation,” FreeRTOS creator Richard Barry told Electronics Weekly. FreeRTOS tries to do things in an efficient way and this timer I am very happy with from an efficiency point of view. It doesn’t use any CPU time unless there is actual processing to be done.”
Rather than polling the timers or checking them in an interrupt, he explained, the timer enters the blocked state using standard kernel features until a timer actually expires.
“This allows timer call-backs to be executed in a task context, rather than an interrupt context, and does not consume any processing time or generate any run time overhead unless a timer has actually expired,” said Real Time Engineers, the firm that owns the FreeRTOS brand.
When FreeRTOS is ported, it is ported to a particular processor plus a particular compiler within a tool chain, and a ‘demo’ is produced alongside the combination.
Demos in this case are “a pre-configured project that you can just open which targets a particular tool and target board so you have an already-running example”, said Barry.
The new port is for Texas Instruments’ 20bit MSP430X with TI’s Code Composer Studio tools including their Eclipse-based integrated development environment (IDE).
Of the two new demos, one is for the MSP430X/Code Composer combination, and the other is for STMicroelectronics’ ARM Cortex-M3-based STM32 microcontrollers with Atollic’s TrueStudio tools.
FreeRTOS is in its eighth year, and has a reasonable claim to being a, if not the, de-facto standard cross-platform RTOS – it was downloaded 80,000 times last year and at the last count is has been ported to over 50 combinations of 27 processor families and 17 tool chains.
Small footprint was always the main design goal of FreeRTOS, which is aimed at low-cost 32bit microcontrollers – Cortex-M3, Renesas RX, microchip PIC32, and ColdFire, for example.
“Not at Pentium and that sort of thing, although it will actually run on a Pentium in 16bit mode,” said Barry.
As a rough guide, it suits 32bit processors with 32kbyte to around 1Mbyte of flash.
“When you get into systems with a lot more flash and a lot more RAM, and you want a free system, you are into Linux,” said Barry.
The final size depends on the microcontroller architecture, the efficiency of the compiler, and RTOS options selected.