Learning Real-Time Programming Concepts Through Vxworks Lab Experiments
Total Page:16
File Type:pdf, Size:1020Kb
Learning Real-Time Programming Concepts through VxWorks Lab Experiments Andrew J. Kornecki <[email protected]> Embry Riddle Aeronautical University, Daytona Beach, FL Janusz Zalewski <[email protected]> University of Central Florida, Orlando, FL Daniel Eyassu <[email protected]> Lockheed-Martin Information Systems, Orlando, FL Abstract classes. It requires knowledge of software development for the embedded real-time systems. The paper describes activities leading to support of an Examples of such systems are: medical equipment, aircraft academic instruction and industrial training in the area avionics, air traffic control, weapon control, nuclear power of time critical software development. Most of the stations – to name a few. The software developers must modern software deals with external interfaces and has be at ease with the basic concepts distinguishing the to consider various timing implications. Familiarity with real-time applications from the applications where the time real-time concepts and proper use of software criticality, safety, and response to external stimuli is not engineering process to develop real-time software an issue. Such concepts as timing, concurrency, became the critical component of modern software synchronization and communication, resource sharing, engineering. We describe a dedicated real-time and external device handling are of critical importance. laboratory infrastructure, the organization of the coursework, necessary Internet support, and the In an effort to provide students with such knowledge, experiences of over five years offering real-time several universities use industry equipment grants to instruction in the context of software engineering offer courses supporting the missing component. In many focused undergraduate and graduate academic cases the only college level education on embedded programs. systems can be obtained from electrical engineering or hardware-focused computer engineering programs. The students and faculty have good grasp of the designed 1. Introduction system hardware but too often the software component of the system is of marginal quality. The faculty and Proliferation of computer technology affects nearly all students do not have enough background and experience areas of human endeavor. More and more applications to produce quality software. The truth is that the software use computers that interface with various external is responsible for most of the system functionality. devices, react to the external stimuli, and often control the Software became major component of the modern system environment in a closed loop fashion. This feature and the quality of software, more than the hardware is the requires the software to be developed using tools and critical element of the system success. methods beyond the scope of conventional programming University laboratories are usually equipped with general The above mentioned environment can be acquired for a purpose operating systems (Windows or UNIX) on a relatively low cost thanks to the current policies of many network in a multi-user setup. Such configuration may set vendors offering special university programs. Such limits on the type of software to be developed (only a programs provide free unsupported software licenses standard data processing using conventional holding usually heavy price-tag when acquired by input/output devices). However, the industry badly needs industry site. Typical software components of the lab are engineers with knowledge of specialized time-critical CASE tools, development tools (including compilers, reactive systems. Graduates who understand how the debuggers, and integrated developer interfaces), real-time software will interact with the operating system and the kernels, performance analysis tools, etc. There have been environment are in high demand. also possibilities to secure hardware donations from industry partners or an additional funding supported by a grant sponsoring organizations. The hardware usually 2. Laboratory Infrastructure requires standard host development platform (Windows or UNIX based) and an appropriate target systems. A dedicated real-time laboratory supporting the development of real-time software, is the important Both Embry Riddle Aeronautical University and the component of modern computer science and engineering University of Central Florida developed appropriate labs education. Such laboratory has to include a platform for allowing their undergraduate and graduate students to development of embedded system in a host-target develop expertise in host-target real-time software environment. The students shall have access to a development. The selected environment is development environment supporting all lifecycle Tornado/VxWorks, courtesy of the software grant from including requirements, design, implementation, and Wind River System Academic Program. The details of testing. As a critical element of the lab the students must implementation are described below. be able to develop code on the host and download, debug and test on the target. The target run time system 3. Tornado Features must have characteristics of a real-time operating system VxWorks, the run-time component of the Tornado supporting concurrency, synchronization and embedded development environment, is a widely adopted communication primitives, interrupt handling, pre-emptive real-time operating system (RTOS) in the embedded scheduling and deterministic behavior. systems industry. VxWorks is flexible, with powerful Fig 1. Tornado Architecture (from Wind River Systems promotional literature) application programming interfaces (APIs); scalable, from · Browser – to present graphical information and the simplest to the most complex product designs. It is monitor the state of the target operating-system extremely reliable, used in mission-critical applications objects ranging from anti-lock break systems to inter-planetary · Integrated Simulator (VxSim) – to begin developing exploration, and available on the most popular CPU and debugging code even if target hardware is platforms [1] unavailable · Logic Analyzer (WindView) – to provide graphical The VxWorks microkernel supports a full range of real- representation of the application dynamic behavior time features including fast multitasking, hardware displaying the timing diagrams interrupts, and both priority-preemptive and round-robin scheduling. The microkernel design minimizes system The host development environment can be installed on overhead and enables fast, deterministic response to the either WindowNT or UNIX workstation (SOLARIS, HP). external events. The run-time environment also provides The development environment is an integrated suite of efficient intertask communication mechanisms, permitting host tools with Editor, Shell, Debugger, Browser, and independent tasks to coordinate their actions within a Configurator. The Target Server component is real-time system. The developer may design applications responsible for the connection to the target. On the target using shared memory (for simple sharing of data), side, in addition to the CoreOS with microkernel and the message queues and pipes (for intertask messaging Board Support Package (BSP), there is a minimal Debug within a CPU), sockets and remote procedure calls (for Agent responsible for the communication (Fig.1). The network-transparent communication), and signals (for VxWorks kernel and the application run on the target with exception handling). For controlling critical system only minimal interference of the Debug Agent tasks. resources, several types of semaphores are provided – binary, counting, and mutual exclusion with priority 4. Experiment Format inheritance Once such environment is in place, the challenge is to VxWorks powerful Tornado integrated development create an infrastructure to allow students easy access and environment is available for a variety of hardware include the lab experiments in the course sequence. The platforms and widely used by industry. The basic critical task is to teach students basic real-time concepts. components of Tornado include: At ERAU, we created a series of laboratory experiments · Kernel (VxWorks) – to provide task scheduling and to be performed by the students. The sequence addresses configurable real-time operating systems utilities on the issues of timing, multi-tasking, shared resources and the target locking, communication, signals and interrupts, and · Boot ROM – to support target initialization and boot scheduling. As the operating system plays an important procedure role in developing real-time software, the experiments · Network Facilities with Target Server – to provide focus on using the kernel primitives by the application target connection with development environment program. The experiments are designed to be completed · Module Loader and Symbol Table – to incrementally by a student during a single semester, or during a course load object modules into a target system and keep of independent study, while learning the appropriate the operating system and application software theory component in the classroom. The earlier version of information visible to the development environment the course offering used UNIX SystemV as the base, with · Project Facility (Configurator) – to provide graphical the real-time experiments implemented in C/POSIX and interface automating configuration of the operating Ada [2]. system and building VxWorks applications, · Shell (WindSh) – to interpret and execute C- The key issue was