Xenomai
Contents
Background
Xenomai is a real-time operating system (RTOS) framework designed to work alongside Linux by providing several APIs for developing and running real-time applications on Linux. Xenomai can be used to add hard real-time performance to a Linux system while operating under the limits of the hardware. The Xenomai design allows for native applications to run side-by-side with real-time applications on the same target hardware. It can also provide a migration path from a proprietary RTOS such as VxWorks, pSOS, VRTX, or uITRON to an embedded Linux environment through the use of skins, providing the required APIs are available.
Xenomai has a mature code base that is under active development. The development of Xenomai traces back to 2001. Xenomai is designed to run on many different target architectures, including x86, ARM, Blackfin, and NIOS2.
General Information
Xenomai 2
Xenomai 2 was the previous Xenomai development version at the time of this writing. It was developed for around 10 years before the development of Xenomai 3 commenced. Xenomai 2 is a dual-kernel-only system design, where the real-time Xenomai core runs alongside the Linux kernel and handles all time-critical tasks. The mechanism for this operation is provided through the Interrupt Pipeline (I-Pipe). The real-time co-kernel runs at a higher priority than all Linux tasks, only allowing Linux to run when no real-time tasks require execution, and preempting Linux tasks as needed.
Xenomai plans official maintenance of the Xenomai 2 branch through January of 2016.
Xenomai 3
Xenomai 3 was a significant new development for the Xenomai platform. Driven by the goals of increased flexibility and improved system design, and enabled by the increasing level of support and development of the native Linux PREEMPT_RT patchset, a single-kernel option was introduced (code named Mercury) while maintaining support for the traditional dual-kernel configuration (code named Cobalt).
Cobalt core
The Cobalt core configuration is the traditional co-kernel configuration and is the evolution of the Xenomai 2 architecture. The Linux kernel is patched to allow the Cobalt core to deal with real-time activities, including interrupts and scheduling. The RTOS APIs provide an interface to the Cobalt core from user-space. The co-kernel configuration relies on the Adeos I-pipe patch for sharing hardware resources between the kernels. EMAC uses the Cobalt configuration by default as it more closely matches our existing Xenomai 2 product orderings and typically offers higher performance and more flexibility for both hardware and software support.
Mercury core
The Mercury core is a single kernel configuration that relies on the Linux kernel for the real-time capabilities. Typically this requires PREEMPT-RT support to be enabled in the kernel to meet timing requirements. The non-POSIX real-times APIs are emulated over a native threading library (preferably NPTL, the Native Posix Threading Library). The Mercury configuration currently requires no Xenomai-specific kernel features, but the kernel should provide CONFIG_HIGH_RES_TIMERS and PREEMPT-RT for bounded latencies.
Licensing
The Xenomai kernel space is licensed under GPL v2 and the user-space libraries are licensed LGPL v2.1.
EMAC Xenomai Package
Xenomai provides several device drivers and user-space utilities in its distribution. The device drivers rely on the Real Time Driver Model (RTDM) skin. Xenomai provides real-time drivers for CAN, serial, IPC, networking, data acquisition, and testing using the RTDM. These drivers can be used as a reference when creating drivers for new devices.
The user-space utilities and examples are used to benchmark the target system and demonstrate the API for the RTDM drivers.
The standard EMAC Xenomai package provides the basic Xenomai build for the desired target. This includes the kernel, filesystem, and SDK add-ons to start Xenomai development.
Standard Features
The EMAC Xenomai base package's features include:
- Pre-installed Xenomai kernel and filesystem utilities
- SDK add-on for Xenomai development
- Basic Alchemy timer example
The EMAC Xenomai package supports real-time features including:
- RTDM, including real-time interrupts and driver API
- Timers
- Real-time UART Serial (HW Dependent)
- Real-time GPIO (HW Dependent)
Additional Features
Additional packages include:
- Real-time CAN (HW Dependent)
- Real-time SPI (HW Dependent)
Development Services
EMAC has extensive experience developing and supporting Xenomai builds for a wide range of hardware platforms, including ARM, x86, Blackfin, and others. Customers rely on this service to offload the core real-time system implementation and testing so that they can focus on more rapidly developing their application. EMAC can provide real-time board-support packages, driver development, and application development.
In one particular instance, a customer required a custom hardware design with software support for hard real-time latencies on several communications interfaces, including CAN Bus, RS-485, and SPI. EMAC used a standard Xenomai build for the target processor and developed drivers for the USART controller and SPI controller in the processor. While the customer began application development and testing, EMAC expanded the real-time BSP to support an SPI-based CAN controller using the newly-developed RTDM SPI driver. EMAC then worked directly with a customer-contracted engineering firm to support compliance with a required communications protocol stack. This development service took the burden off of the customer for many of the complex real-time tasks and allowed them to focus on developing a highly-specialized application to deliver a market-leading product.
For more information on EMAC's development services and to discuss your real-time requirements contact sales: http://emacinc.com/ordering-information