ChibiOS/RT logo












Project history

This RTOS is something I wrote back in 1990 for use on boards equipped with M68K processors, the development was made on an Atari ST. The OS worked well for its intended purpose, Internet was not widespread at that time so the system had limited visibility.

Recently I decided to release this system, formerly known as mkRTOS, as Free Software. I cleaned up the code, improved the documentation, ported it to more modern architectures and it is finally ready with the new name ChibiOS/RT.

Brief Description

ChibiOS/RT is designed for deeply embedded real time applications where execution efficiency and tiny code size are desiderable features.

The system is implemented as a library to be linked with the application code, the OS and the application code together form the image to be loaded on the target device.

Features

The kernel provides a rich features set, it offers: preemptive multithreading, 128 priority levels, optional round-robin support, unified interrupts handling, support for preemptable interrupt handlers, virtual timers, semaphores, mutexes, condition variables, synchronous messages, mailboxes, event flags, Abstract Channels, I/O queues, heap and memory pools allocators.

Of course, the above mechanisms are not always required in most applications, it is possible to selectively exclude the unused subsystems reducing the total code size.

Size

The kernel is very compact, on a reference Cortex-M3 (STM32) platform the kernel size ranges from 1.3KiB minimum up to 5.3KiB maximum size. Size metrics are available for all platforms, as test reports, into the source distribution.

Performance

On a reference STM32 platform clocked at 72MHz the kernel is capable of context switching in 1.41 microseconds, taking/releasing a semaphore takes 1.21 microseconds, spawning a thread (the whole create-execute-terminate cycle) takes 4.64 microseconds.

The timings are measured using the internal test suite, it is possible to inspect the benchmarking methodology and replicate the results by simply running the included demos. Performance metrics are available for all platforms, as test reports, into the source distribution.

Reliability

The kernel is entirely static and has no internal tables that can overflow at runtime, the API is designed to not have error conditions. The memory allocators are just services for the application code and are not used internally. Please refer to the documentation about the internal architectural and design choices.

Portability

The OS was successfully ported to several 8, 16 and 32 bits architecture, the kernel does not require any special HW feature, it just requires a periodic interrupt source. Currently the ChibiOS/RT is ported to the following architectures:

  • ARM7TDMI-LPC214x, the port to other LPC2000 chips should be very easy. Both ARM and THUMB modes are supported.
  • ARM7TDMI-AT91SAM7X256, this port also supports other Atmel chips: SAM7XC, SAM7S and the various sizes (128, 256, 512) with minimal changes. Both ARM and THUMB modes are supported.
  • ARM Cortex-M3, ST Microelectronics STM32.
  • AVR, AT90CAN128 and ATmega128 demos included.
  • MSP430.
  • x86 within a Win32 process, this port allows to write and run your application on the PC without the need of a development board/simulator/emulator. Communication ports are simulated over sockets, you can telnet on the simulator ports for the debug.
  • M68K, this was the original target but it is currently removed from the source tree because currently I have no way to test it, my old Atari ST is long dead. It should be very easy to revive the port to the M68K or Coldfire CPUs.

License

ChibiOS/RT is licensed under a modified GPL3 license, a linking exception is added to the stable releases that allows the use of the software without being bound by the GPL under certain conditions. Please read carefully the GPL3, the exception text included in the source distribution and the FAQ into the documentation.

ChibiOS/RT is 100% proprietary software free and was created using FOSS tools only. I wish to give credit to the following projects: