Previous Section
Index
Next Section

An Introduction to Embedding with the iPAQ

This topic will explain what it means to embed an operating system into a device. This includes a brief discussion about what the installation process is actually doing to your iPAQ. Feel free to read this if your unfamiliar with terms such as burning, flashing, images or bootloaders.

Introduction


The iPAQ Reference Platform demonstrates how you can embed the QNX operating system into Compaq's iPAQ handheld device. The complexity of developing an embedded device can vary greatly depending on your hardware, your operating system and the tools at hand. Luckily, this device is affordable, accessible, durable and directly relates to the embedded industry. QNX offers a wide variety of professional tools, but with the iPAQ Reference Platform and a simple terminal program, you can explore embedding your own system.

The remainder of this document will give you a feel for embedded development, using the iPAQ as a model. If you're just looking to play around with QNX (and don't want to know the how's and why's) feel free to skip to the next section.

The iPAQ Hardware - Feature Notes


Before you begin doing any embedded development, you should be aware of the limitations and purpose of the hardware built into your device. The iPAQ is no exception. It contains a powerful processor with many components, yet there are features and limitations which may effect your projects: Ok, so that's a quick look at your hardware. Now let's look at how the iPAQ moves from an inert piece of technology to an interactive QNX research tool!

The iPAQ Startup Process


When the iPAQ is turned on, the ARM processor begins the boot sequence by transferring control to a "boot loader". This is code which was installed into the device's flash memory when it was being made. Once the loader is activated, it collects information about the hardware and prepares to start the operating system.

Compaq has be gracious enough to release an improved bootloader which displays an initial splash screen and is capable of booting the QNX operating system, with a little help. The bootloader is interactive; it talks over the iPAQ serial port at the baud rate of 115200. You can issue commands to this bootloader and it may save settings back to flash. The loader may also receives uploaded data using the XModem protocol.

To install the QNX operating system, two files are copied into flash via the boot loader: the image file system (ifs) and the extended file system (efs). As you will see, the ifs is a small file which contains the next crucial components for booting the iPAQ and the efs has all the large pieces which define our demonstration environment.

Once the boot loader has configured the device, it begins to look for an operating system to boot. The ifs should have been installed into a specific place in memory, otherwise the boot loader will output an error message out the serial port, confused. If all went well, the bootloader begins to transfer control to a tiny piece of code which has been appended to the front of the ifs. This code, written by QNX, is called the initial program loader (ipl).

The ipl does the work to get the actual operating system up and running. It looks at the ifs and begins copying and executing the QNX startup code into DRAM. Control is now passed to startup which decompresses the kernel and the remaining portion of the ifs into DRAM. At this point, the QNX operating system is actually functional.

The kernel begins processing its first initialization script contained in the ifs and the machine begins to really take off. There are now files and a file system to allow the remainder of the device to be functional. First, the serial and the flash drivers are loaded. This allows the efs flash file system to be mounted at root (/).

The contents of efs is what makes up the user environment and acts as a hard drive to store any data you might create as you use your device. In this case, the Photon graphical environment is installed in the usual UNIX directories, like /usr/lib and /usr/bin while some iPAQ-specific software has been placed into the directory, /system. This directory is just an arbitrary place where the ipaq environment can live.

Now that all of your resources have been mounted and the device's peripherals are accessible, the drivers and system services can be started. The script /etc/init runs all the basic services available in the efs.

Summary


At this point, you should generally understand what it takes to boot an embedded device. Continue on to install the iPAQ Reference Platform. The hands on experience is a great starting point for new developers and delivers a practical environment for even experienced engineers. QNX encourages its customers and partners use this environment to experiment with the ARM processor, and to demonstrate their products running on the QNX operating system. QNX also hopes that students and casual developers become interested in embedded development with QNX and join the QNX developer community.
 
 
Previous Section
Index
Next Section