This course is designed for anyone who wants to develop drivers for the QNX® Neutrino® RTOS. By the end of the course, you will have written several sample drivers.
- Familiarize yourself with the methods for writing different types of drivers under the QNX Neutrino RTOS.
- Focus on real-world problems and the techniques for solving them.
- Provide hands-on exercises so you can apply the concepts introduced in the course.
You must have a good working knowledge of C and a general understanding of programming under the QNX Neutrino RTOS.
The course consists of the following sections:
We'll start with an overview of the QNX Neutrino RTOS and QNX drivers, highlighting key features, services, and architecture, giving you a feel for what is involved in writing drivers for the QNX Neutrino RTOS.
A review of basic QNX Neutrino RTOS programming concepts, such as threads, mutexes, message passing, pulses, and timing. This module provides a refresher for students who already have some familiarity with the topics but may be out of practice. The material also provides the background needed for other course topics.
This section provides a quick introduction to editing, compiling, running, and debugging your application from the QNX® Momentics® IDE, giving the minimum needed to do the programming exercises in the programming sections.
A look at the capabilities of resource managers, including pathname-space resolution, IPC message formats, and general structure. We provide several exercises, from a very simple resource manager that implements /dev/null to more complex examples that support multiple devices.
Continuing from the introductory module, this section covers the various ways to return from handlers, manage access and modification times, leave clients blocked, use multi-threaded resource managers, implement combine messages, perform unblock handling, receive pulses, and make select() and ionotify() work. Resource manager concepts are reinforced through a variety of hands-on exercises.
Covers in detail the I/O aspects of a driver, including how to do port I/O and memory-mapped I/O, how to perform DMA memory configuration, and how to use the PCI API.
Compared to conventional operating systems, the QNX Neutrino RTOS makes it relatively easy to write and debug interrupt handlers. We present several approaches to interrupt handlers and discuss how to tie handlers into resource managers. A hands-on exercise helps you apply these concepts to real-world problems.
A collection of challenging exercises that are a must for anyone learning to write drivers. The exercises used depend on the hardware available. You can choose from:
- Screen driver exercise
You'll write an I/O manager that does read()s from, write()s to, and devctl()s for changing the configuration of VGA text mode memory.
- Keyboard driver exercise
You will write a simple driver that handles x86 keyboard input.
A discussion on how to write file system resource managers, which are processes that represent data in the form of files or file systems. During this module, you will write a resource manager that presents a tar file as a file system.
We'll look at using the Neutrino io-char library to write a driver for character devices such as serial chipsets that support the RS-232 protocol.
In each section of the course, you will have an opportunity to put what you learn into practice. After learning each programming technique, you will apply it to situations that may arise in your own applications.