# Presentation: 551109

## RTEMS Past, Present, and Future

- EPICS Collaboration Meeting
- Knoxville Tennessee
- 13 October 2007

- Joel Sherrill, Ph.D.
- Director of R&D
- OAR Corporation

**Notes:**
Introduce the instructors.
Point out that we are the RTEMS developers

Class times are M-Th  8:30 -11:30 , 1:30 -3:30/4:00

Please be sure to register each day.  Those who attend all sessions of the class will get an RTEMS Class Completion Training Certificate.

Actually, this week we are combining 2 classes:
   a Real-Time System Development Primer and the RTEMS Classic API.

## Outline

- Highlights of RTEMS history
- RTEMS features
- What’s new in RTEMS 4.8 releases
- Roadmap for 4.9 releases and beyond

## RTEMS History Highlights – Part I

- 1988 – OAR initiates development under contact to U.S. Army Missile Command (now U.S. AMCOM)
- 1992 –  Superconducting Super Collider (SSC) is first non-Army organization to receive RTEMS.  Evaluated easily and favorably against pSOS+.
- 1992 – Project begins using GNU tools
- 1994 – ESA sponsors OAR development of SPARC port
- 1994 – Publicly available via anonymous ftp from U.S. Army
- 1995 – Oldest date in RTEMS CVS 11 May 1995
- 1996 – rtems.com domain registered
- 1997 – GNAT/RTEMS passes Ada95 ACVC
- 1998 – Eric Norum ports FreeBSD TCP/IP stack
- 1998 – OAR officially takes over development, maintenance and distribution from U.S. Army

## RTEMS History Highlights – Part II

- 1999 – First GNU/Linux RPMs
- 1999 – Motorola powerpc_shared BSP submitted
- 2001 – Steering Committee formed
- 2001 – Public problem tracking database available
- 2001 – Ported to NASA space hardened MIPS
- 2001 – Eric Norum publishes EPICS Porting Retrospective
- 2002 – Till Straumann publishes latency benchmark
- 2004 – Wiki started
- 2006 – Circles Venus and Mars
- 2007 – Launched to the asteroid belt on Dawn probe
- 2008 – Launched with Herschel/Plank missions

## RTEMS Features

- RTEMS is a full featured Real-Time Operating System
- Commercial grade
- All source code for OS, support components, tests, documentation, development environment, and project website is provided
- Truly free in price, liberty, and end user requirements
- High performance, deterministic behavior
- Standards compliant environment
- Highly portable across CPU architectures
- Many Board Support Packages available
- Prebuilt development toolsets for GNU/Linux and MS-Windows

## Processors Supported by RTEMS

| Architecture | 4.6 | 4.7 | 4.8 | CVS |
| --- | --- | --- | --- | --- |
| Altera NIOS II | No | No | Yes | Yes |
| ADI Blackfin | No | No | Yes | Yes |
| ARM with many CPU models | Yes | Yes | Yes | Yes |
| Atmel AVR | No | Partial | Partial | Partial |
| AMD A29K | Yes | No | No | No |
| HP PA-RISC | Yes | No | No | No |
| Intel/AMD x86 (i386 and above) | Yes | Yes | Yes | Yes |
| Intel i960 | Yes | No | No | No |
| MIPS including multiple ISA levels | Yes | Yes | Yes | Yes |

**Notes:**
Models within Family:
	m68k has 9
	powerpc has 6
	i386 has 5

## Processors Supported by RTEMS

| Architecture | 4.6 | 4.7 | 4.8 | CVS |
| --- | --- | --- | --- | --- |
| Freescale MC68xxx | Yes | Yes | Yes | Yes |
| Freescale MC683xx | Yes | Yes | Yes | Yes |
| Freescale Coldfire | Yes | Yes | Yes | Yes |
| OpenCores OR32 | Yes | No | No | No |
| PowerPC including 4xx, 5xx, 6xx, 7xx, 8xx, 52xx, and 74xx | Yes | Yes | Yes | Yes |
| Reneas H8/300 | Yes | Yes | Yes | Yes |
| Reneas SuperH including SH1, SH2, SH3, and SH4 | Yes | Yes | Yes | Yes |
| SPARC including ERC32 and LEON | Yes | Yes | Yes | Yes |
| TI C3x/C4x | Yes | No | No | Yes |

**Notes:**
Models within Family:
	m68k has 9
	powerpc has 6
	i386 has 5

## RTEMS Architecture

## What’s New in 4.8?Updated  Tools

- Latest version of all tools in the RTEMS Development Environment
- autoconf 2.61
- automake 1.10
- binutils 2.18
- gcc 4.2.1 for C/C++ with newlib 1.15.0
- gdb 6.6
- MinGW tools binaries available
- Install like “normal” MS-Window programs
- Can run them from “command.com”

## What’s New in 4.8?Nanosecond Time Granularity

- Following may be maintained at nanosecond granularity
- Time of day
- System uptime
- CPU Usage of each task and thread
- Rate Monotonic Period statistics
- SuperCore time now in POSIX *struct timespec*
- Requires optional BSP *nanoseconds since tick* handler

## What’s New in 4.8?Priority Change of Blocked Thread

- Impacts the following scenario:
- Thread’s priority is changed, while it is
- Blocked waiting for resource which
- Uses priority discipline for blocked threads, and
- Thread’s priority is changed
- Dynamic thread priority changes occur:
- Upon user request
- Side-effect of Priority Ceiling and Inheritance Protocols
- Side-effect of restarting a thread
- Improves ability to analyze safety critical systems

## What’s New in 4.8?Code Space Reduction

- On SPARC/ERC32, 4.8 branch minimum executable is
- 15% smaller than 4.7.1
- 40% smaller than 4.6.6
- Multiple minor changes with cumulative effect
- Remove unnecessary dependencies in BSPs
- Use *printk* rather than *printf*  for system error messages
- C *malloc* routines now directly use SuperCore Heap
- Avoid making Extension Manager required
- Split a few files into one function per file
- Split data of managers into separate files
- Can be another ~5% smaller if –Os is used for compilation

## What’s New in 4.8?New Ports and BSPs

- New target architectures
- Analog Devices Blackfin
- Altera NIOS II
- New Board Support Packages
- arm/rtl22xx
- bfin/eZKit533
- powerpc/gen5200
- powerpc/mpc8349eads
- powerpc/icecube
- powerpc/virtex
- Many BSPs updated and enhanced
- Multiple BSPs now run on Skyeye simulator

## What’s New in 4.8?New Managers

- POSIX Barriers
*pthread_barrier_XXX()*
- POSIX Spinlocks
*pthread_spin_XXX()*
- POSIX RWLocks
*pthread_rwlock_XXX()*
- Classic API Barriers
*rtems_barrier_XXX()*

## What’s New in 4.8?Important Odds and Ends

- Conversion to C99 types
- More use of inttypes.h for *printf*  format strings
- Integration of Till’s NFS Client
- Many features added to SPARC/Leon2 and Leon3
- PowerPC/gen5200 BSP supports more variants
- Much of *libmisc*  renamed and in User’s Guide
- Added *rtems_iterate_over_all_threads*
- Added obtain object name as string
- Much.. Much.. More

## 4.9 and Beyond – The RTEMS Roadmap

## What Drives RTEMS Requirements?

- ScientificCommunity

- SpaceCommunity

- Research

- Open  Standards

- CommercialUsers

- Pet Projects

- StudentProjects

- IncrementalImprovements

## Already in CVS for 4.9

- More network examples
- Multicast demonstration
- Telnetd example program
- Improved GNAT support
- Ada task stack checking (e.g. –fstack-check)
- Ada sockets binding supported
- DEC Numeric Extensions supported
- More Ada examples
*readv* and *writev* added

## Anticipated for 4.9

- BSD constructor style OS initialization
- Thread exit clean up for newlib extension
- File system critical section rework
- Initial merge of Cexp and gdb stub
- ARM/Thumb support
- Classic API Ada binding and tests updated
- Improved tracking of inherited priority

## Wish List

- RTEMS Lab Update
- Remote access to equipment in OAR RTEMS lab
- Baseline for automated testing on hardware
- Initial work is underway at OAR
- RTEMS Test Coverage Analysis
- Determine current code coverage of RTEMS tests
- Automate gathering this information
- Augment tests based upon coverage analysis
- Initial work is planned at OAR

## Wish List – continued

- USB support
- Port BSD USB stack to RTEMS
- Refactor TCP/IP port to have shared “BSD porting layer”
- OAR has partial port but there is no active work
- TCP/IP stack update
- Update TCP/IP stack code to a late model FreeBSD version
- Key Goal: Make sure future updates are easy
- No active work in this area

## Wish List – continued

- Eclipse support
- Plugins for Eclipse for RTEMS development and debug
- Gaisler Research has plugin for SPARC/RTEMS
- No active work in this area
- Event Capturing and Visualization
- Log events from RTEMS target and analyze on host
- Chris Johns’ capture engine is a baseline
- ESA RTEMS Centre has effort underway on this

## Wish List – continuedOS Web Monitor 

- Web view of RTEMS objects
- Prototyped by Thomas Doerfler
- No active work in this area

## Wish List – continued

- RTEMS Ports Collection
- Provide standard framework for compiling ported third party software packages similar to BSD ports collection
- Chris Johns proposed this and has ideas
- MacOS Tool Binaries
- Provide pre-built toolsets from rtems.com
- No active work in this area
- Tiny RTEMS
- Long term effort, some results in 4.8
- Point  projects to reduce minimum application code size
- Elimination of “dead code” aids in validation efforts
- No active work in this area

## Wish List – continued

- Atmel AVR Port
- Partial port in tree and tools are already provided
- No active work in this area
- Texas Instruments MSP430 Port
- Volunteer working on this, but in early stages
- More BSPs that run on Skyeye
- Some BSPs are close and Skyeye needs tweaks
- Other CPU models will require new BSPs

## Wish List – Continued

- Flash File System
- Multiple free FFS have licenses incompatible with RTEMS
- May be pure GPL or limited hardware
- Jay Monkman has partial JFFS port which appears to meet goals
- Free CANbus Stack
- There are open source implementations
- No active work in this area
- No active work in this area

## Wish List – continued

- POSIX Pipes Support
- Support *mkfifo()* and related calls
- File Descriptor Duplication Support
- Support *dup()*, *dup2()*, and related calls
- No active work in this area
- RTEMS Shell and Monitor Improvements
- More commands available and set available configurable by user
- Add object information services to public API
- No active work in this area

## OAR Services

- RTEMS Support
- Rapid turn around on questions and bugs
- USD1500 per engineer per year, minimum 3
- RTEMS Training
- Open classes held in Huntsville and Munich
- On-site customer specific training available
- RTEMS Application Assistance
- Flexible consulting arrangement
- On-demand RTEMS engineering assistance to address customer issues  as they arise

## OAR Services

- RTEMS Directed Development
- Sponsor a project
- Can include X-Team members from around the world
- X-Team is a network of non-OAR RTEMS specialists from around the globe
- Custom Development
- BSPs and Device Drivers
- Porting packages
- Application design and implementation
- Engineering services

## YOU Are THE Source For RTEMS Improvements!!!

## Contact Information

**Joel Sherrill**
- Director of Research and Development
**OAR Corporation**
- 4910-L Corporate Drive
- Huntsville AL 35805
- Voice: (256) 722-9985
- Fax: (256) 722-0985
- Email: _[joel.sherrill@oarcorp.com](mailto:joel.sherrill@oarcorp.com)_

- RTEMS Project URL
- _[http://www.rtems.org](http://www.rtems.org/)_
- RTEMS Wiki
- _[http://www.rtems.org/wiki](http://www.rtems.org/wiki)_