ChibiOS/RT – A compact and fast real-time operating system
ChibiOS/RT is a compact and fast real-time operating system supporting multiple architectures and released under the GPL3 license. It is the high performance RTOS part of the ChibiOS/RT embedded collection. RT has been designed with the idea of creating a very feature-complete RTOS that could excel in performance and code size. It is developed by Giovanni Di Sirio.
One of the most strong points of the RT kernel is the extremely high performance in realtime-related parameters like context switch time and ISR latency. The performance is not just matter of well written code, a series of design solutions make RT the fastest RTOS for deeply embedded applications.
ChibiOS/RT Key Points
=> RT uses efficient double linked circular lists for most of its internal data structures like:
Queues of Threads.
Linked lists are dynamic structures but in RT all list elements are statically allocated, nowhere memory is allocated or freed, all memory addresses are finalized at link time.
=> In RT the context switch operation is performed sycnhronously with a single function call, there are no interrupts/exceptions/tricks involved.
=>In architectures capable of nested interrupts the context switch is only, optionally, performed at the exit of the last ISR, the operation is automatic and transparent. OS functions called from ISR do not perform a context switch but only handle thread states very quickly, the context switch is done once regardless of how many OS functions have been called.
=> In RT critical zones are never nested, this means that there is no need to have a nesting counter or to save the current context. This makes the API very efficient, OS code paths minimize load/store operations and conditional branches. Critical zones are entered/left only from the outer function.
Read this: IoT Operating Systems
RT is the advanced kernel of ChibiOS, it is designed to be a state of the art RTOS for deeply embedded applications. The design guidelines have been:
No compromises in performance, it has to be the fastest performing RTOS available.
Scalable from 8 bits architectures upward.
Functionally complete API. All common RTOS features have to be supported.
Fully Static Architecture.
Clean and elegant code base.
Predictable and Deterministic.
Fully compliant with HAL OSAL.
MISRA 2012 compliance.
In addition to the common RTOS features RT implements a set of unique features that make it one of the most advanced RTOS available:
|Real Tick-less Mode||The kernel does not require a system tick, interrupts are generated only at the scheduled time. This is optimal for implementing advanced power management modes.|
|High Resolution Time||The time resolution can reach sub-microseconds values. It is possible to use very small delays in tasks.|
|Full Thread Paradigm||Not just “tasks”, the threads paradigm is fully implemented: Create, Exit, Join operations are available.|
|Cycle-Accurate Statistics||Critical zones, ISRs, tasks execution times are measured with a clock-accurate resolution, best/last/worst execution time is reported for all critical code paths.|
|System State Checker||The API call protocol is checked vs the current system state, invalid calls are detected and reported. This resolves at development time one of the most insidious errors in RTOS usage. Potentially saving, by design, from intermittent and hard to debug problems.|
|Safety Features||The RTOS implements a number of safety-related features like: Runtime integrity check API, stacks overflow detection, static design, RTOS global data structures encapsulation.|
CMSIS RTOS Compatibility
The Cortex-M RT port also offers a compatibility layer with the CMSIS RTOS specification. The CMSIS RTOS API is mapped almost 1 to 1 on the RT native API, there is close to no overhead caused by the layer.
The implemented CMSIS RTOS features are:
Threads, mapped on RT threads management.
Timers, mapped on RT virtual timers.
Signals, mapped on RT events.
Semaphores, mapped on RT counting semaphores.
Mutexes, mapped on RT mutexes.
Pools, mapped on RT memory pools.
Messages, mapped on RT mailboxes.
Most CMSIS data types are mapped directly on the equivalent RT types.
The ChibiOS/RT own API is a superset of the features specified by the CMSIS specification.
Unfortunately CMSIS does not specify many features typical of an RTOS, for example and not limited to:
Critical Zones handling and requirements.
The equivalent RT API is available to fill this kind of gaps. The RT API is available even when using the CMSIS RTOS compatibility layer, mixed use is permitted.
When an exact behavior is not specified by CMSIS RTOS the equivalent RT behavior is to be expected.
Community and Support
ChibiOS/RT available in GPL Version, Free Commercial Version, Free Commercial Version. You can Download from http://www.chibios.org/.
You may like also:
- Best OS for Raspberry Pi
- Setting up a Raspberry Pi headless
- How to Send e-mail using NodeJS
- IoT Operating Systems
- Best Portable Operating Systems
- Slax OS – Your pocket operating system
6 thoughts on “ChibiOS/RT – A compact and fast real-time operating system”
Pingback: ChibiOS/RT – A compact and fast real-time operating system — IoTbyHVM – Explore TechBytes – hashstacks
Pingback: IoT OS and RTOS for Internet of Things devices - IoTbyHVM
Pingback: IoT OS and RTOS for Internet of Things Devices - CompileIoT
Pingback: Top IoT Operating Systems in 2020 | IoT OS and RTOS
Pingback: OS and RTOS for IoT (Internet of Things) Devices - OnionLinux
Pingback: IoT OS and RTOS for Internet of Things Devices - CoolDigiBytes