Recent from talks
Nothing was collected or created yet.
RTEMS
View on WikipediaThis article needs additional citations for verification. (May 2014) |
| RTEMS | |
|---|---|
| Developer | OAR Corporation |
| Written in | C |
| OS family | Real-time operating system |
| Working state | Current |
| Source model | Open source |
| Initial release | 1993 |
| Latest release | 6.1 / January 22, 2025[1] |
| Repository | gitlab |
| Marketing target | Embedded systems |
| Available in | English |
| Supported platforms | ARM, Blackfin, ColdFire, TI C3x/C4x, H8/300, x86, 68k, LatticeMico32, Microblaze, MIPS Nios II, OpenRISC, PowerPC, SuperH, SPARC (ERC32, LEON), SPARC64 |
| Kernel type | Real-time |
| Default user interface | Command-line |
| License | BSD 2 Paragraph |
| Official website | www |
Real-Time Executive for Multiprocessor Systems (RTEMS), formerly Real-Time Executive for Missile Systems, and then Real-Time Executive for Military Systems, is a real-time operating system (RTOS) designed for embedded systems. It is free and open-source software.
Development began in the late 1980s with early versions available via File Transfer Protocol (ftp) as early as 1993. OAR Corporation managed the RTEMS project in cooperation with a steering committee until the early 2000's when project management evolved into a subset of the core developers managing the project. In 2014, hosting was moved from OAR Corporation to the Oregon State University Open Source Lab hosting.
Design
[edit]RTEMS is designed for real-time embedded systems and to support various open application programming interface (API) standards including Portable Operating System Interface (POSIX) and μITRON (dropped in RTEMS 4.10[2]). The API now known as the Classic RTEMS API was originally based on the Real-Time Executive Interface Definition (RTEID) specification. RTEMS includes a port of the FreeBSD Internet protocol suite (TCP/IP stack) and support for various file systems including Network File System (NFS) and File Allocation Table (FAT).
RTEMS provides extensive multi-processing and memory-management services.[3]
Architectures
[edit]RTEMS has been ported to various target processor architectures:
- ARM
- AArch64
- Atmel AVR
- Blackfin
- Freescale, now NXP ColdFire
- Texas Instruments – C3x/C4x DSPs
- Intel – x86 architecture members 80386, Pentium, and above
- LatticeMico32
- Microblaze
- 68k
- MIPS
- Nios II
- OpenRISC
- PowerPC
- Renesas – H8/300, M32C, M32R, SuperH
- RISC-V RV32, RV64 using QEMU
- SPARC – ERC32, LEON, V9
- V850
Uses
[edit]RTEMS is used in many application domains. The Experimental Physics and Industrial Control System (EPICS) community includes multiple people who are active RTEMS submitters. RTEMS is also popular for space uses since it supports multiple microprocessors developed for use in space including SPARC ERC32 and LEON, MIPS, ColdFire, and PowerPC architectures, which are available in space hardened models. RTEMS is currently orbiting Mars as part of the Electra software radio on NASA's Mars Reconnaissance Orbiter,[4] and the ESA's Trace Gas Orbiter.,[5] as well as passing by the sun on the Parker Solar Probe.
License
[edit]RTEMS components are currently licensed under a mixture of licenses including a GPL-2.0[6] derived license with the project working on trying to re-license original components to the project under the two paragraph BSD license.[7][8]
RTEMS was originally distributed under a modified GNU General Public License (GPL), allowing linking RTEMS objects with other files without needing the full executable to be covered by the GPL. This license is based on the GNAT Modified General Public License with the language modified to not be specific to the programming language Ada.
See also
[edit]References
[edit]- ^ "RTEMS 5.3 Released". 2023-02-10. Retrieved 2023-02-10.
- ^ "7.1.1.1. Legacy Test Suites". RTEMS Software Engineering. RTEMS Project. Archived from the original on 2024-12-13. Retrieved 2024-12-13.
- ^ Project, RTEMS. "The RTEMS Documentation Project home". The RTEMS Documentation Project home.
- ^ "Real Time Mars Approach Navigation aided by the Mars Network" (PDF). NASA. Archived from the original (PDF) on 2006-09-30. Retrieved 2008-01-25.
- ^ "NASA radio on Europe's new Mars Orbiter aces relay test". Retrieved 2016-12-01.
- ^ "LICENSE.md · main · RTEMS / RTOS / RTEMS · GitLab". GitLab. Archived from the original on 2024-12-29. Retrieved 2025-02-04.
- ^ "Change RTEMS License to Two Paragraph BSD (#3053) · Issues · RTEMS / RTOS / RTEMS · GitLab". GitLab. Archived from the original on 2024-12-29. Retrieved 2025-02-04.
- ^ Sherrill, Joel (2025-02-05). "Joel Sherrill's avatar cpukit/rtems/src/[a-r]*.c: Change license to BSD-2". rtems.org. Archived from the original on 2025-02-05. Retrieved 2025-02-05.
External links
[edit]RTEMS
View on GrokipediaHistory
Origins and Early Development
RTEMS originated in the late 1980s as a response to the need for a royalty-free, standards-based real-time executive suitable for embedded systems, particularly in military applications. In 1988, the U.S. Army Missile Command, through its Research, Development, and Engineering Center, commissioned a study evaluating real-time executives for distributed Ada applications, highlighting the limitations of existing commercial options in supporting multiprocessing and open standards. This led to the initiation of development for what was initially termed the Real-Time Executive for Missile Systems, aimed at providing deterministic behavior and full source code availability without licensing fees.[4] Development was led by On-Line Applications Research (OAR) Corporation, which began work under contract to the U.S. Army Missile Command in 1988. The project emphasized portability across diverse processor architectures and adherence to emerging standards like POSIX, with an initial focus on military and embedded environments requiring high reliability and predictability. By 1989, an alpha release supported the Motorola MC68020 processor and included a board support package (BSP) for the Motorola MVME136. The first internal versions for U.S. Army use emerged in 1990, incorporating Intel i386 support and the FORCE386 BSP, marking early progress toward multiprocessor capabilities.[5][6] The system's scope expanded beyond missile-specific uses, prompting a rename to Real-Time Executive for Multiprocessor Systems (RTEMS) to reflect its broader applicability. Initial efforts prioritized determinism for real-time tasks, interrupt handling, and communication in multiprocessor configurations, ensuring it could operate in resource-constrained embedded settings. In 1993, RTEMS achieved its first public release (version 3.0 on tape), with version 3.1 made available via anonymous FTP in 1994, signifying a pivotal shift toward open-source distribution and wider accessibility beyond government contracts. This release included C implementations and GNU tools, facilitating adoption by non-military users.[7][6]Key Milestones and Releases
RTEMS originated from research funded by the U.S. Army Missile Command in the 1980s and early 1990s.[7] The first public release, version 3.0, occurred in 1993, establishing RTEMS as an open-source real-time executive for embedded systems.[8] Subsequent versions in the 2.x series, developed throughout the 1990s, introduced POSIX API support, including an initial subset of pthreads to enable compatibility with tools like the GNAT Ada compiler.[8] In the early 2000s, project management transitioned from the On-Line Applications Research Corporation (OAR), which had led development since inception, to a group of core developers responsible for ongoing stewardship. A notable infrastructure evolution came in 2014, when hosting for the project's services and repositories shifted from OAR to the Oregon State University Open Source Lab, enhancing accessibility and community collaboration.[9] Key releases in the 4.x and later series marked periods of stability and modernization. Version 4.10, released in February 2011, emphasized long-term stability through accumulated bug fixes and enhancements from prior iterations.[10] The 5.0 series, initiated with snapshots in late 2019, represented a major refactor of the codebase to improve maintainability and support for contemporary hardware.[11] Most recently, version 6.1 was released on January 22, 2025, incorporating advancements in RISC-V architecture support and symmetric multiprocessing (SMP) capabilities.[12] In March 2024, the project transitioned its repositories and services to GitLab, improving version control and community contributions.[13] Among significant milestones, the integration of the FreeBSD networking stack in 2006 enabled robust TCP/IP functionality, drawing from FreeBSD 4.3 sources to meet POSIX networking requirements.[14] In the 2010s, certification initiatives advanced RTEMS for space applications, with NASA exploring open-source qualification processes in 2017 and the European Space Agency achieving ECSS-compliant certification for SMP configurations by 2022.[15][16]Overview
Core Design Principles
RTEMS is designed as a multi-threaded, single address-space real-time operating system (RTOS) without a kernel-user space divide, enabling applications to run directly in kernel space with unrestricted access to hardware resources.[2] This architecture prioritizes determinism, ensuring predictable response times essential for embedded systems in safety-critical environments.[17] By eliminating the overhead of user-kernel transitions, RTEMS achieves low-latency execution suitable for real-time applications.[2] A key design principle is portability across diverse processor architectures, facilitated by a layered executive model that abstracts hardware dependencies.[18] The core executive services—encompassing tasks, interrupts, and timers—are built atop a hardware abstraction layer, allowing the majority of the codebase to remain independent of specific CPU implementations while minimizing porting efforts.[19] This multi-layered approach maximizes software reuse and supports deployment on a wide range of embedded platforms.[18] RTEMS incorporates support for symmetric multiprocessing (SMP) configurations, enabling multiple processors to efficiently share system resources through mechanisms like clustered scheduling and fine-grained locking.[20] This capability extends its real-time guarantees to multicore systems, balancing performance and predictability in parallel workloads.[20] To maintain a minimal footprint, RTEMS excludes built-in file systems and networking at the core level, instead providing these as optional add-ons such as the libbsd stack.[2] This modular design allows customization based on application needs, reducing resource consumption in resource-constrained embedded environments.[2] As a design goal, RTEMS aims for compliance with the POSIX standard to enhance interoperability with Unix-like APIs.[17]System Components
The RTEMS executive is structured as a modular system comprising a core set of managers that handle essential real-time operations, along with lower-level abstractions and optional extensions.[21] The core executive includes dedicated managers for tasks (providing threading and scheduling), interrupts (managing hardware and software interrupts), clocks and timers (for timekeeping and periodic events), signals (for asynchronous notification to tasks), message queues (enabling inter-task communication), semaphores (supporting synchronization and mutual exclusion), partitions (for fixed-size memory block allocation), regions (for variable-size dynamic memory allocation), and multiprocessor communications (facilitating node-to-node interactions in multiprocessor configurations).[21] These managers operate on a foundation that ensures real-time determinism through priority-based preemptive scheduling.[21] Beneath the core executive lies the SuperCore layer, which provides low-level abstractions for hardware interactions, including CPU model implementations and interrupt handling mechanisms.[22] The SuperCore, residing in the source code'sscore/ directory, serves as a common infrastructure shared across all RTEMS APIs, encapsulating CPU-dependent routines such as context switching, interrupt dispatching, and basic object management to promote portability across architectures.[22] This layer isolates higher-level managers from hardware specifics, allowing the executive to focus on application services without direct dependency on processor details.[23]
RTEMS supports optional components that extend functionality beyond the core executive, such as filesystem implementations including the In-Memory Filesystem (IMFS) for RAM-based storage and the DOS Filesystem (DOSFS) for FAT-compatible media.[24] Networking capabilities are provided through an integrated TCP/IP stack, accessible via the RTEMS Shell, which also serves as a debugging tool for command-line interaction, monitoring, and system inspection. These optional elements are implemented in separate source directories like libfs/ for filesystems and libnetworking/ for network support, enabling selective inclusion based on application needs.[22]
System customization occurs at build time through application-defined constants in a configuration header file, such as CONFIGURE_MAXIMUM_TASKS or CONFIGURE_APPLICATION_NEEDS_SIMPLE_CONSOLE, which dictate the inclusion of specific managers and features.[25] This approach ensures that unused components are excluded from the final binary, eliminating runtime overhead and optimizing resource usage for embedded environments.[25]
Features
Real-Time and Multiprocessing Capabilities
RTEMS employs a priority-based, preemptive scheduling mechanism as its core approach to real-time task management, featuring 256 priority levels ranging from 0 (highest) to 255 (lowest). This design ensures that higher-priority tasks interrupt lower-priority ones immediately upon becoming ready, facilitating predictable execution in time-critical environments. The system supports rate-monotonic scheduling (RMS) through its dedicated Rate Monotonic Manager, which assigns priorities inversely proportional to task periods to optimize schedulability for periodic hard real-time tasks. The Rate Monotonic Manager can also support deadline-driven scheduling when used with the Earliest Deadline First (EDF) scheduler, where tasks announce their deadlines (often set equal to periods), enabling dynamic priority adjustment based on the earliest deadline to meet time constraints. To achieve deterministic responses essential for hard real-time applications, RTEMS bounds interrupt latency by minimizing the duration of interrupt-disabled sections and ensuring constant-time operations in the scheduler. The Deterministic Priority Scheduler, the default for uniprocessor configurations, guarantees O(1) complexity for key operations like enqueue and dequeue, avoiding variable-time behaviors that could introduce jitter. Critical paths, including interrupt service routines and scheduler invocations, prohibit dynamic memory allocation to prevent unbounded delays from heap management, thereby maintaining predictability. RTEMS also supports the Earliest Deadline First (EDF) scheduler, a dynamic priority scheduler that selects the task with the nearest deadline for execution. This O(log n) scheduler uses the Rate Monotonic Manager for tasks to announce their periods and deadlines, ensuring predictable behavior for sporadic or aperiodic workloads in hard real-time environments. As of RTEMS 6 (released 2022), it includes job-level fixed-priority variants with thread-to-processor affinity support.[2] In multiprocessing scenarios, RTEMS provides Symmetric Multiprocessing (SMP) support for configurations with up to 32 processors, utilizing the Deterministic Priority SMP Scheduler by default. This scheduler enables thread affinity control, allowing tasks to be restricted to specific processor subsets via POSIX extensions like pthread_setaffinity_np, which enhances cache locality and reduces migration overhead. Load balancing is achieved through thread migration protocols, where idle processors pull ready tasks from busy ones to distribute workload evenly while preserving priority ordering and real-time guarantees.[26] POSIX real-time extensions further support multiprocessor scheduling with policies such as SCHED_FIFO and SCHED_RR, adapted for SMP to ensure fair and deterministic allocation across cores. For schedulability verification, RTEMS integrates the Rate Monotonic Manager, which collects period statistics—including count, misses, and jitter—for tasks, enabling developers to perform rate monotonic analysis (RMA). This facilitates application of the classic Liu-Layland utilization bound, where the total utilization of tasks must satisfy to guarantee schedulability under RMS assumptions of independent, preemptive periodic tasks with implicit deadlines. These tools allow verification of whether task sets meet hard real-time constraints without runtime overhead beyond periodic announcements.Supported APIs and Services
RTEMS provides two primary application programming interfaces (APIs) for developers: the proprietary Classic RTEMS API and the POSIX API. The Classic API is task-centric, offering services for task management, interrupt handling, and synchronization primitives tailored for real-time embedded applications.[27] It serves as the foundational interface, with managers for objects like tasks, semaphores, and message queues that enable precise control over system resources. Historically, RTEMS also supported the uITRON API for compatibility with legacy Japanese embedded systems, though this interface was removed after version 4.10 to streamline the codebase.[28] The POSIX API in RTEMS conforms to IEEE 1003.1 (base real-time system profile) and 1003.13 (real-time application support), providing standardized services such as threads (pthreads), clocks, timers, and message queues for portable real-time development.[29] These extensions enhance POSIX for embedded environments, supporting real-time extensions like priority inheritance and asynchronous I/O. RTEMS services extend to filesystem operations via POSIX-compliant APIs, including path resolution, file I/O, and directory management, with support for filesystems such as the in-memory filesystem (IMFS), FAT (DOSFS), and NFS through optional packages.[24] Networking services are provided via configurable stacks, including the lightweight lwIP TCP/IP implementation or the more comprehensive FreeBSD-derived LibBSD stack, enabling protocols like UDP, TCP, and HTTP.[30][31] A built-in shell offers command-line runtime management, supporting file operations, process control, and network diagnostics. The APIs are layered atop a shared SuperCore foundation, allowing applications to mix Classic and POSIX calls seamlessly—for instance, a POSIX thread can invoke Classic message queues—while configuration macros enable selective inclusion of API subsets to optimize memory footprint.[32] RTEMS integrates with third-party libraries such as Newlib for C standard library functions, ensuring compatibility with standard C environments.Supported Architectures
Processor Architectures
RTEMS supports a diverse set of processor architectures, enabling its use in embedded systems across various domains. As of 2025, the operating system accommodates 18 architectures, achieved through modular CPU ports that abstract hardware-specific behaviors such as context switching, interrupt handling, and timer management.[33] These ports leverage CPU model variations, including multilib configurations in the GCC toolchain, to ensure portability across processor families while addressing differences in instruction sets, endianness, and application binary interfaces (ABIs).[34] This design allows developers to target specific CPU models without rewriting core RTEMS components, promoting reuse and minimal footprint in resource-constrained environments.[35] The supported processor families include:- ARM: Encompassing Cortex-A (application), Cortex-M (microcontroller), and Cortex-R (real-time) series, with support for ARMv7 and AArch64 variants. This port handles both MMU-enabled and no-MMU configurations, suitable for embedded devices.[35]
- PowerPC: Covering standard and radiation-hardened variants like the RAD750, used in high-reliability applications. The port includes optimizations for PowerPC e500 and e650 cores.[36][33]
- x86: Supporting i386 (32-bit) in protected mode with a flat memory model and x86_64 (64-bit), including interrupt management mapped to the processor's architecture.[37][33]
- SPARC: Focused on the LEON series (LEON2, LEON3, LEON4), derived from SPARC V8, with space-qualified implementations like the ERC32 processor. These ports include support for ECC memory to mitigate radiation effects in orbital environments.[38][35]
- RISC-V: Covering RV32 (32-bit) and RV64 (64-bit) profiles, including base integer (I), multiply (M), atomic (A), floating-point (F/D), and compressed (C) extensions.[39]
- MIPS: Supporting MIPS I through MIPS64, with configurations for embedded and high-performance cores.[33]
- ColdFire/68k: Based on the Motorola 68000 family and NXP ColdFire derivatives, optimized for legacy embedded systems without MMU requirements.[33]
- Blackfin: ADI Blackfin DSP architecture, tailored for signal processing tasks.[33]
- MicroBlaze: Xilinx MicroBlaze soft-core processor, configurable for FPGA-based systems.[33]
- Nios II: Intel/Altera Nios II embedded processor for FPGA implementations.[33]
- OpenRISC: OpenRISC 1000 (OR1K) open-source ISA, emphasizing customizable embedded designs.[33]
- SuperH: Renesas SuperH (SH) family, supporting SH-1 to SH-4 series for consumer and industrial uses.[33]
- Epiphany: Adapteva Epiphany many-core architecture for parallel processing.[40]
- LatticeMicro32: Lattice Semiconductor LM32 soft-core processor for FPGA designs.[40]
- Moxie: Moxie simple 32-bit RISC architecture for educational and embedded use.[40]
- V850: Renesas V850 32-bit microcontroller architecture for automotive and industrial applications.[40]
- RH850: Renesas RH850 automotive microcontroller family with real-time capabilities.[40]
Board Support Packages
Board Support Packages (BSPs) in RTEMS provide the necessary software layer to integrate the operating system with specific hardware platforms, including development boards, flight hardware, and simulators. These packages enable RTEMS to initialize and manage hardware resources, ensuring compatibility across diverse embedded environments. RTEMS currently supports approximately 200 BSPs, spanning 18 processor architectures and targeting a wide range of applications from general-purpose development to specialized mission-critical systems.[1] Representative examples of BSPs include the Xilinx Zynq for ARM-based systems, commonly used in FPGA-integrated designs; the BeagleBone for ARM, suitable for prototyping and education; the PC386 for x86 platforms, facilitating PC-compatible embedded development; and the LEON3 for SPARC, a staple in radiation-hardened aerospace hardware.[41][42] The structure of an RTEMS BSP typically encompasses startup code that initializes the hardware to a quiescent state, sets up the interrupt vector table, disables interrupts, and allocates stacks before invoking the application'sboot_card() function. It also includes essential drivers such as clock tick providers (using counter/timers or real-time clocks for timeslicing and timing management), console I/O for serial or parallel ports via the RTEMS I/O Manager, and network interfaces for controllers supporting multiprocessor communication. BSPs are configurable through RTEMS configuration files, such as the Configuration Table, which allows customization of parameters like microseconds_per_tick to tailor system behavior to hardware constraints.[43]
To ensure reliability, each BSP undergoes rigorous testing using the RTEMS Test Suites, which comprise over 500 tests covering functionality, performance, and edge cases; these tests are compiled and executed specifically for the target BSP, often via simulators or hardware, to validate certification-level compliance.[28][44]
Many BSPs are community-contributed, extending RTEMS support to niche hardware platforms such as CubeSat onboard computers and automotive electronic control units (ECUs), fostering broader adoption in specialized domains like space exploration and vehicular systems.[1]